ExamGecko
Question list
Search
Search

Question 130 - Terraform Associate 003 discussion

Report
Export

If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

A.
Run terraform refresh
Answers
A.
Run terraform refresh
B.
It will happen automatically
Answers
B.
It will happen automatically
C.
Manually update the state fire
Answers
C.
Manually update the state fire
D.
Run terraform import
Answers
D.
Run terraform import
Suggested answer: B

Explanation:

If you manually destroy infrastructure, Terraform will automatically detect the change and update the state file during the next plan or apply. Terraform compares the current state of the infrastructure with the desired state in the configuration and generates a plan to reconcile the differences. If a resource is missing from the infrastructure but still exists in the state file, Terraform will attempt to recreate it. If a resource is present in the infrastructure but not in the state file, Terraform will ignore it unless you use the terraform import command to bring it under Terraform's management.Reference= [Terraform State]

asked 18/09/2024
Albaladejo Joffrey
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first