Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 60 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 60
Topic #: 1
[All Terraform Associate Questions]

What is terraform refresh intended to detect?

  • A. Terraform configuration code changes
  • B. Empty state files
  • C. State file drift
  • D. Corrupt state files
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
camps
Highly Voted 1 year, 7 months ago
Selected Answer: C
C. State file drift. The terraform refresh command is used to reconcile the state Terraform has stored in the state file with the real-world infrastructure. When you run terraform apply, Terraform updates the state file to reflect the current state of the infrastructure it manages. However, if changes are made to the infrastructure outside of Terraform, such as via the web console or API, the state file will become out-of-date and will not accurately reflect the current state of the infrastructure.
upvoted 6 times
...
LunarPhobia
Most Recent 1 year, 4 months ago
This command is now deprecated
upvoted 4 times
...
Power123
1 year, 7 months ago
Answer is C
upvoted 1 times
...
Nunyabiznes
1 year, 8 months ago
Selected Answer: C
Terraform refresh is intended to detect state file drift. It updates the Terraform state file with the real-world state of the resources being managed, which allows Terraform to detect any changes that might have been made outside of Terraform. This is useful when the state file is out of sync with the actual resources in the cloud provider, which can happen if someone manually modifies a resource outside of Terraform. By running terraform refresh, Terraform can identify those differences and update the state file to reflect the real-world state of the resources being managed.
upvoted 3 times
...
chimons
1 year, 11 months ago
Selected Answer: C
C. State file drift terraform refresh is a command in the Terraform infrastructure as code tool that is used to update the state file with the current real-world infrastructure. It compares the resources described in the state file to the actual resources in the infrastructure and updates the state file to match the infrastructure. One of the things that terraform refresh is intended to detect is state file drift, which is a difference between the infrastructure and the resources described in the state file.
upvoted 1 times
...
lucitama
2 years, 4 months ago
Selected Answer: C
C is correct
upvoted 4 times
...
Eltooth
2 years, 5 months ago
Selected Answer: C
C is the closet correct answer, however this command is no longer in use. "The terraform refresh command reads the current settings from all managed remote objects and updates the Terraform state to match. Warning: This command is deprecated, because its default behavior is unsafe if you have misconfigured credentials for any of your providers. See below for more information and recommended alternatives." https://www.terraform.io/cli/commands/refresh
upvoted 3 times
...
amrith501
2 years, 5 months ago
Selected Answer: C
State file drift for sure
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...