What is a key benefit of the Terraform state file?
A.
A state file represents a source of truth for resources provisioned with a public cloud console
B.
A state file represents a source of truth for resources provisioned with Terraform
C.
A state file represents the desired state expressed by the Terraform code files D A state file can be used to schedule recurring infrastructure tasks
Answer:
C
User Votes:
A
50%
B 2 votes
50%
C
50%
Discussions
0/ 1000
nassimaelferkhsi
3 months, 3 weeks ago
The Terraform state file (terraform.tfstate) is critical because it acts as the single source of truth for resources managed by Terraform. It stores information about the actual infrastructure state, including resource attributes and metadata, allowing Terraform to track resource changes and manage updates, deletions, or additions effectively.
Aamir_Ahmed
3 weeks, 5 days ago
B is the correct answer. Why Not the Other Options? A. Incorrect – The state file does not track resources provisioned outside Terraform (e.g., created manually via a cloud console) unless they are imported. C. Incorrect – The state file reflects the actual state of infrastructure, not just the desired state from code. The desired state is defined in Terraform configuration (.tf files). D. Incorrect – Terraform state is not used to schedule recurring tasks. That would be done using Terraform Cloud, external schedulers, or automation tools like cron or AWS Lambda.
Want to join our community?
Please log in or signup in order to use this feature
The Terraform state file (terraform.tfstate) is critical because it acts as the single source of truth for resources managed by Terraform. It stores information about the actual infrastructure state, including resource attributes and metadata, allowing Terraform to track resource changes and manage updates, deletions, or additions effectively.
B is the correct answer.
Why Not the Other Options?
A. Incorrect – The state file does not track resources provisioned outside Terraform (e.g., created manually via a cloud console) unless they are imported.
C. Incorrect – The state file reflects the actual state of infrastructure, not just the desired state from code. The desired state is defined in Terraform configuration (.tf files).
D. Incorrect – Terraform state is not used to schedule recurring tasks. That would be done using Terraform Cloud, external schedulers, or automation tools like cron or AWS Lambda.