GCP Associate Cloud Engineer Practice Question

You manage Google Cloud infrastructure with Terraform, storing the state file in a Cloud Storage bucket configured as the backend. A teammate accidentally deleted a Cloud Storage bucket that is still declared in your Terraform configuration. You must restore the bucket and keep the state file accurate while minimizing manual work. What should you do next?

  • Use gsutil to recreate the bucket manually, then run "terraform refresh" to sync the state file.

  • Delete the remote state file in Cloud Storage and run "terraform init" so Terraform can re-import existing resources.

  • Run "terraform apply" in the working directory, review the plan, and confirm the action so Terraform recreates the missing bucket and updates state.

  • Delete the bucket resource block from the configuration, run "terraform apply" to remove it from state, then add the block back and apply again.

GCP Associate Cloud Engineer
Planning and implementing a cloud solution
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot