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 272 discussion

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

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

  • A. When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply
  • B. Changing resources via the Azure Cloud Console records the change in the current state file
  • C. When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file
  • D. Changing resources via the Azure Cloud Console does not update current state file
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Jas14
Highly Voted 1 year, 1 month ago
AD is the correct answer
upvoted 6 times
...
Mattt
Most Recent 2 months ago
Selected Answer: AD
AD are correct
upvoted 1 times
...
ogerber
6 months, 2 weeks ago
Selected Answer: AD
100% 2 answers are required
upvoted 2 times
...
dankositzke
9 months ago
Selected Answer: D
Should not be a “choose two” because (D) is the only answer.
upvoted 3 times
AkaAka4
6 months, 4 weeks ago
Refer to an earlier question #98. Answer should be A and D. I honestly suggest anyone who is not that knowledgeable (like me) to not be over-confident and mislead others. Thank you.
upvoted 1 times
azurebot123
6 months, 1 week ago
Yes if you refer to an earlier question #19. Answer should be AD only. LOL I hope you didn't look up Q19. Okay, reasons I'm not sure about A: - you change a Terraform-managed resource via the Azure Cloud Console, - when you run Terraform plan or apply, Terraform will first do a refresh and update the metadata to what you've changed in cloud console. BUT Terraform will subsequently start applying what's in the config file and revert the change you've made via cloud console. Finally it updates the state file with what's in terraform config.
upvoted 2 times
azurebot123
6 months, 1 week ago
oh look i cleared my own doubt - reason why it's A: terraform plan or terraform apply without approval is basically a terraform state refresh. State file will be updated with the changes made on cloud console.
upvoted 1 times
...
...
...
...
Spandrop
11 months, 1 week ago
Selected Answer: D
Only D is the correct one, Terraform will never update the state file to reflect changes that occurred in the environment manually (outside Terraform), it will do the opposity, if the your code is not updated accordingly with what was manually changed, Terraform will bring your environment back to what it is in the state file.
upvoted 2 times
...
Tronko86
1 year ago
Selected Answer: D
Only D
upvoted 3 times
...
nuridgsn
1 year, 4 months ago
Selected Answer: D
A. It is not correct, terraform plan doesn't reflect the changes, it only shows the changes to you when you run terraform apply it reflects the change. B. When you do manual change in resource, Terraform doesn't imply changes automatically C. Terraform never creates a new state file for the new changes and it uses the existing one unless you don't specify a different backend. D. Correct. You can only update tfstate file with either terraform apply (suggested) or terraform apply -refresh-only (not suggested though). Option A has probably typo issue, terraform plan shouldn't be in there.
upvoted 3 times
...
DevoteamAnalytix
1 year, 4 months ago
Selected Answer: AD
For me B and C is wrong, so it's A and D
upvoted 2 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 ...