Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Your enterprise DevOps team is establishing an automated CI/CD pipeline in Google Cloud Build to produce secure, immutable golden VM images for Compute Engine workloads using HashiCorp Packer.
The pipeline must satisfy the following architectural and security requirements:
Which configuration and IAM permission setup should you implement?
Automating golden machine image creation with HashiCorp Packer inside Google Cloud Build enables declarative, reproducible, and immutable VM image lifecycles. Cloud Build executes containerized build steps, using a prebuilt Packer builder container image stored in Artifact Registry or Container Registry to provision temporary instances, install hardened dependencies, and package the resulting disk into a Compute Engine image.
roles/compute.instanceAdmin.v1) role provides the necessary permissions to create, run, and delete temporary VM build instances and register machine images, without granting overly permissive roles like roles/editor or roles/owner.packer build inside the execution container, passing necessary project, zone, and template parameters directly through cloudbuild.yaml.image_family parameter ensures that downstream deployment tooling (like Terraform, MIG templates, or deployment scripts) can always query and reference the newest active image in the family.This solution implements Google Cloud best practices for image baking by leveraging containerized build steps and scoped predefined IAM roles. It eliminates manual intervention and prevents broad administrative privilege escalation across the cloud environment.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.