Your team is deploying a Compute Engine VM that must read objects from an internal Cloud Storage bucket. Security policy forbids using default service accounts or unnecessary permissions. Which approach satisfies the requirements before the VM is created?
Attach no service account and instead add a signed URL for each object as a custom metadata entry on the VM; this removes the need for IAM roles.
Reactivate the project's Compute Engine default service account and grant it the Storage Admin role at the project level; any new VM automatically inherits those permissions.
Generate a new service account key file, store it in instance metadata, and use application default credentials inside the VM; no IAM role changes are required.
Create a user-managed service account with "gcloud iam service-accounts create", grant it the Storage Object Viewer role on the bucket, and specify that service account when you create the VM.
Creating a user-managed service account lets you control exactly which permissions the instance will have. After the account is created with "gcloud iam service-accounts create", granting the Storage Object Viewer role on the target bucket provides the least-privilege access needed. Specifying the service account with the "--service-account" flag when you create the VM ensures the workload runs with that identity. The other options either over-provision permissions, use default service accounts against policy, or bypass IAM entirely.
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 is a user-managed service account in GCP?
Open an interactive chat with Bash
What is the purpose of the Storage Object Viewer role in GCP?
Open an interactive chat with Bash
How is the --service-account flag used when creating a VM in GCP?
Open an interactive chat with Bash
What is a user-managed service account in GCP?
Open an interactive chat with Bash
What is the Storage Object Viewer role in GCP IAM?
Open an interactive chat with Bash
How do you specify a service account when creating a VM in GCP?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Configuring access and security
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 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .