TERRAFORM-ASSOCIATE-003 · Question #193
When do you need to explicitly execute Terraform in refresh-only mode?
The correct answer is C. Before every terraform import. Purpose of Refresh-Only Mode: Running Terraform in refresh-only mode updates Terraform's state file with the current state of resources in your infrastructure without making changes to the resources themselves. Context of Terraform Import: When using terraform import, you're…
Question
When do you need to explicitly execute Terraform in refresh-only mode?
Options
- ABefore every terraform plan.
- BBefore every terraform apply.
- CBefore every terraform import.
- DNone of the above.
How the community answered
(26 responses)- A8% (2)
- B15% (4)
- C73% (19)
- D4% (1)
Explanation
Purpose of Refresh-Only Mode: Running Terraform in refresh-only mode updates Terraform's state file with the current state of resources in your infrastructure without making changes to the resources themselves. Context of Terraform Import: When using terraform import, you're adding existing resources to the state file, and running Terraform in refresh-only mode before this operation can ensure that any initial configuration syncs precisely with the actual state.
Topics
Community Discussion
No community discussion yet for this question.