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

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

Define the purpose of state in Terraform.

  • A. State is used to map real world resources to your configuration and keep track of metadata
  • B. State is a method of codifying the dependencies of related resources
  • C. State is used to enforce resource configurations that relate to compliance policies
  • D. State is used to store variables and quickly reuse existing code
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
[Removed]
1 year, 5 months ago
Selected Answer: 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
upvoted 4 times
...
March2023
1 year, 5 months ago
Selected Answer: A
metadata
upvoted 1 times
...
FarziWaliMarzi
1 year, 7 months ago
Selected Answer: A
definitely A
upvoted 1 times
...
bugalter
1 year, 7 months ago
Selected Answer: A
Selected Answer: A
upvoted 1 times
...
Nunyabiznes
1 year, 7 months ago
Selected 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.
upvoted 1 times
...
camps
1 year, 7 months ago
Selected Answer: 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.
upvoted 1 times
...
tbhtp
1 year, 7 months ago
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.
upvoted 1 times
...
Ravi528
1 year, 8 months ago
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
upvoted 1 times
...
SilentMilli
1 year, 8 months ago
Selected Answer: 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.
upvoted 1 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 ...