Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 217

Define the purpose of state in Terraform.

    Correct Answer: A

    The purpose of state in Terraform is to map real-world resources to your configuration and keep track of metadata. Terraform state plays a crucial role in tracking the relationships between your configuration and the actual resources provisioned in your infrastructure. This allows Terraform to understand the current state of your infrastructure, manage changes over time, and perform operations such as updating, destroying, or importing resources. State helps in planning and applying changes to your infrastructure in a consistent and reliable manner.

Discussion
[Removed]Option: A

Textbook Ans: Terraform must store state about your managed infrastructure and configuration. This state is used by Terraform to map real world resources to your configuration, keep track of metadata, and to improve performance for large infrastructures. https://developer.hashicorp.com/terraform/language/state

March2023Option: A

metadata

FarziWaliMarziOption: A

definitely A

bugalterOption: A

Selected Answer: A

NunyabiznesOption: A

The purpose of state in Terraform is to map real-world resources to your configuration and keep track of metadata. Terraform state plays a crucial role in tracking the relationships between your configuration and the actual resources provisioned in your infrastructure. This allows Terraform to understand the current state of your infrastructure, manage changes over time, and perform operations such as updating, destroying, or importing resources.

campsOption: A

A. State is used to map real world resources to your configuration and keep track of metadata In Terraform, state serves the purpose of mapping real-world resources to your configuration and maintaining metadata about those resources. The state file records the current state of the infrastructure that Terraform manages, allowing Terraform to detect any differences between the actual infrastructure and the desired state defined in the configuration files. This information is crucial for planning and applying changes to the infrastructure in a consistent and reliable manner.

tbhtpOption: A

A. State is used to map real world resources to your configuration and keep track of metadata. The purpose of state in Terraform is to keep track of the current state of your infrastructure as defined by your configuration files. When you apply your configuration, Terraform creates a plan that describes the changes needed to move from the current state to the desired state. Once you apply the plan, Terraform updates the state file to reflect the new state of your infrastructure. The state file maps the resources you have created in the real world to the configuration in your Terraform code, and it also stores metadata such as resource IDs and IP addresses that may be needed for future updates or maintenance. This allows Terraform to manage and modify your infrastructure in a consistent and reliable way, and to ensure that your resources are always in the desired state.

Ravi528Option: B

A is not correct, State try to matches the resources managed by Terraform config files, but not the real world resources/infra. So B is correct

SilentMilliOption: A

The primary purpose of state is to map the desired state of your infrastructure as defined in your configuration to the actual state of your infrastructure in the real world. Terraform uses the state to determine what changes need to be made to bring the actual state of your infrastructure into line with the desired state specified in your configuration.