Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
HashiCorp Certified: Terraform Associate (003) · HashiCorp
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
From https://developer.hashicorp.com/terraform/tutorials/cli/apply When you apply this configuration, Terraform will: 1) Lock your project's state 2) Create a plan, and wait for you to approve it. 3) Execute the steps defined in the plan using the providers you installed when you initialized your configuration. Terraform executes steps in parallel when possible, and sequentially when one resource depends on another. 4) Update your project's state file with a snapshot of the current state of your resources. 5) Unlock the state file. 6) Print out a report of the changes it made, as well as any output values defined in your configuration. Changes in the cloud environment are made on step 3, before updating the state file
I vote for B. The difference between B and C is that we have to count on timeout cases in the real world, e.g. provision GCP DataProc cluster, MongoDB Atlas, etc. It's possible the provisioner timeout but the provider keeps going till the job finish. In this case the local terraform state file does not sync with the physical infra - terraform did try to update but timeout. Then we run `terraform apply` again and the state file reconciles with the physical infra.
BBBBBBBBBBB