nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #172

A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.

The correct answer is A. True. A Terraform output that sets the "sensitive" argument to true will store that value in the state file. The purpose of setting sensitive = true is to prevent the value from being displayed in the CLI output during terraform plan and terraform apply, and to mask it in the…

Submitted by priya_blr· Apr 18, 2026Manage Terraform State

Question

A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.

Options

  • ATrue
  • BFalse

How the community answered

(27 responses)
  • A
    85% (23)
  • B
    15% (4)

Explanation

A Terraform output that sets the "sensitive" argument to true will store that value in the state file. The purpose of setting sensitive = true is to prevent the value from being displayed in the CLI output during terraform plan and terraform apply, and to mask it in the Terraform UI. However, it does not affect the storage of the value in the state file. Sensitive outputs are still written to the state file to ensure that Terraform can manage resources correctly during subsequent operations.

Topics

#sensitive outputs#Terraform state#state file security#output values

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice