nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #165

You are deploying a Cloud Build job that deploys Terraform code when a Git branch is updated. While testing, you noticed that the job fails. You see the following error in the build logs: Initializing

Sign in or unlock PROFESSIONAL-CLOUD-DEVOPS-ENGINEER to reveal the answer and full explanation for question #165. The question stem and answer options stay visible for context.

Submitted by kavita_s· Apr 18, 2026Building and implementing CI/CD pipelines for a service

Question

You are deploying a Cloud Build job that deploys Terraform code when a Git branch is updated. While testing, you noticed that the job fails. You see the following error in the build logs: Initializing the backend... Error: Failed to get existing workspaces: querying Cloud Storage failed: googleapi: Error 403 You need to resolve the issue by following Google-recommended practices. What should you do?

Options

  • AChange the Terraform code to use local state.
  • BCreate a storage bucket with the name specified in the Terraform configuration.
  • CGrant the roles/owner Identity and Access Management (IAM) role to the Cloud Build service
  • DGrant the roles/storage.objectAdmin Identity and Access Management (1AM) role to the Cloud

Unlock PROFESSIONAL-CLOUD-DEVOPS-ENGINEER to see the answer

You've previewed enough free PROFESSIONAL-CLOUD-DEVOPS-ENGINEER questions. Unlock PROFESSIONAL-CLOUD-DEVOPS-ENGINEER for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Cloud Build#IAM#Terraform state#Permissions
Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice