GCP Professional Cloud Architect Practice Question
Your security team forbids storing any service-account key files on your on-premises CI server. You must write a Bash script that, from this server, provisions a regional Standard GKE cluster in each of 15 production projects. The script must run unattended, ensure every API call is attributed to a dedicated deploy-service account in the target project, and must not alter the global gcloud configuration between loop iterations. Which gcloud command structure satisfies these constraints?
The --impersonate-service-account flag allows gcloud to obtain a short-lived access token for the specified service account without needing a downloaded key file. Because the flag is supplied on each invocation, it leaves the caller's active configuration unchanged and guarantees that Cloud Audit Logs record the deploy-service account as the principal that performed the action in the target project. Using the --project flag in the same command isolates each loop iteration from global gcloud state. The other options either rely on exported environment variables or gcloud config changes that persist between iterations, or they require a service-account key file, which violates the security requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the --impersonate-service-account flag do in gcloud commands?
Open an interactive chat with Bash
Why is using the --project flag preferred over exporting an environment variable for looping iterations?
Open an interactive chat with Bash
What are the benefits of short-lived access tokens in cloud operations?
Open an interactive chat with Bash
What does the --impersonate-service-account flag do?
Open an interactive chat with Bash
Why is the --project flag important in this context?
Open an interactive chat with Bash
What are Cloud Audit Logs and why are they critical here?
Open an interactive chat with Bash
GCP Professional Cloud Architect
Managing implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .