nerdexam
HashiCorp

TA-002-P · Question #349

Terraform variable names are saved in the state file.

The correct answer is B. False. False. The Terraform state file stores the current state of your managed infrastructure - resource IDs, attributes, and metadata. It does not store variable names or their definitions. Variable values may indirectly appear in state as part of resource attribute values (e.g., a…

Implement and maintain state

Question

Terraform variable names are saved in the state file.

Options

  • ATrue
  • BFalse

How the community answered

(42 responses)
  • A
    12% (5)
  • B
    88% (37)

Explanation

False. The Terraform state file stores the current state of your managed infrastructure - resource IDs, attributes, and metadata. It does not store variable names or their definitions. Variable values may indirectly appear in state as part of resource attribute values (e.g., a name tag derived from a variable), but the variable definitions and names themselves are not persisted in the state file. This is why you can rename a variable without impacting existing state as long as the resource configuration produces the same result.

Topics

#Terraform state file#State file contents#Input variables

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice