HashiCorp Certified: Terraform Associate (003) — Question 20
Which of the following is true about terraform apply? (Choose two.)
Answer options
- A. You cannot target specific resources for the operation.
- B. Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources.
- C. It only operates on infrastructure defined in the current working directory or workspace.
- D. By default, it does not refresh your state file to reflect the current infrastructure configuration.
- E. You must pass the output of a terraform plan command to it.
Correct answer: B, C
Explanation
Answer B is correct because Terraform may need to recreate resources depending on how they are defined by the provider. Answer C is also correct as terraform apply only works on the infrastructure specified in the current directory or workspace. The other options either misrepresent how terraform apply functions or present incorrect requirements.