Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 140


Terraform variable names are saved in the state file.

Show Answer
Correct Answer: B

Terraform variable names are not saved in the state file. The state file contains information about the resources that Terraform manages, such as their current state and metadata. Variables are used in your Terraform configuration to parameterize your code and make it more reusable, but they are not saved in the state file. Instead, variable values are provided at runtime, either by passing them on the command line, through environment variables, or by using default values defined in your configuration.

Discussion

6 comments
Sign in to comment
keiffo2
Mar 6, 2024

terraform state is a representation of your infrastructure, not of your config file, so variables wouldn't be stored in state. FALSE

campsOption: B
Sep 30, 2024

B. False. Terraform variable names are not saved in the state file. The state file contains information about the resources that Terraform manages, such as their current state and metadata. Variables are used in your Terraform configuration to parameterize your code and make it more reusable, but they are not saved in the state file. Instead, variable values are provided at runtime, either by passing them on the command line, through environment variables, or by using default values defined in your configuration.

RVivekOption: B
Mar 26, 2024

I checked in my lab. variable name is not stored in state file

depal_dhirOption: B
Mar 7, 2024

Terraform stores information about your infrastructure in a state file. This state file keeps track of resources created by your configuration and maps them to real-world resources. https://learn.hashicorp.com/tutorials/terraform/state-cli

dani88geOption: B
Mar 20, 2024

I choose B! For sure.

NunyabiznesOption: B
Oct 2, 2024

B. False. Terraform variable names are not saved in the state file. The state file contains the actual values of the resources that were created or modified by Terraform.