HashiCorp Certified: Terraform Associate — Question 268
You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully.
What will happen if you terraform apply again immediately afterwards without changing any Terraform code?
Answer options
- A. Terraform will terminate and recreate the VM
- B. Terraform will create another duplicate VM
- C. Terraform will apply the VM to the state file
- D. Nothing
Correct answer: D
Explanation
The correct answer is D because Terraform tracks the state of resources and recognizes that no changes have been made to the configuration. As a result, it will not take any action again. Options A, B, and C are incorrect as they imply changes will occur when no modifications have been made.