HashiCorp Certified: Terraform Associate — Question 333
Which of the following is true about terraform apply? (Choose two.)
Answer options
- A. It only operates on infrastructure defined in the current working directory or workspace
- B. You must pass the output of a terraform plan command to it
- C. Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources
- D. By default, it does not refresh your state file to reflect current infrastructure configuration
- E. You cannot target specific resources for the operation
Correct answer: A, C
Explanation
Option A is correct because terraform apply only affects resources defined in the current working directory or workspace. Option C is also correct since Terraform may need to destroy and recreate resources based on the provider's specifications. Options B, D, and E are incorrect as they do not accurately represent the behavior of terraform apply.