TERRAFORM-ASSOCIATE-004 · Question #155
Define the purpose of state in Terraform.
The correct answer is A. State maps real world resources to your configuration and keeps track of metadata. The purpose of state in Terraform is to keep track of the real-world resources managed by Terraform, mapping them to the configuration. The state file contains metadata about these resources, such as resource IDs and other important attributes, which Terraform uses to plan and ma
Question
Options
- AState maps real world resources to your configuration and keeps track of metadata
- BState lets you enforce resource configurations that relate to compliance policies
- CState stores variables and lets you quickly reuse existing code
- DState codifies the dependencies of related resources
How the community answered
(27 responses)- A93% (25)
- B4% (1)
- C4% (1)
Explanation
The purpose of state in Terraform is to keep track of the real-world resources managed by Terraform, mapping them to the configuration. The state file contains metadata about these resources, such as resource IDs and other important attributes, which Terraform uses to plan and manage infrastructure changes. The state enables Terraform to know what resources are managed by which configurations and helps in maintaining the desired state of the infrastructure.
Topics
Community Discussion
No community discussion yet for this question.