nerdexam
HashiCorp

TA-002-P · Question #12

Terraform variables and outputs that set the "description" argument will store that description in the state file.

The correct answer is B. False. Descriptions for Terraform variables and outputs are metadata for human readability and documentation, and are not stored in the sensitive terraform.tfstate file which focuses on resource attributes and dependencies.

Implement and maintain state

Question

Terraform variables and outputs that set the "description" argument will store that description in the state file.

Options

  • ATrue
  • BFalse

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    96% (27)

Why each option

Descriptions for Terraform variables and outputs are metadata for human readability and documentation, and are not stored in the sensitive `terraform.tfstate` file which focuses on resource attributes and dependencies.

ATrue

The state file's primary purpose is to map real-world resources to your configuration and track their attributes, not to store documentation metadata like descriptions for variables or outputs.

BFalseCorrect

The `description` argument for input variables and outputs is purely for documentation and user guidance, primarily visible in `terraform plan` output or the Terraform Registry, and this descriptive metadata is not persisted within the `terraform.tfstate` file itself.

Concept tested: Terraform state file content (variable/output descriptions)

Source: https://developer.hashicorp.com/terraform/language/values/variables#argument-reference

Topics

#Terraform state#Variables description#Outputs description#Configuration metadata

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice