nerdexam
HashiCorpHashiCorp

TA-002-P · Question #431

TA-002-P Question #431: Real Exam Question with Answer & Explanation

The correct answer is D: value. The value argument is the only required component when defining a Terraform output, as it specifies the actual data to be exposed.

Read, generate, and modify configuration

Question

Which of the following arguments are required when declaring a Terraform output?

Options

  • Asensitive
  • Bdescription
  • Cdefault
  • Dvalue

Explanation

The value argument is the only required component when defining a Terraform output, as it specifies the actual data to be exposed.

Common mistakes.

  • A. The sensitive argument is optional and is used to mark an output's value as sensitive, preventing it from being displayed in plain text in the CLI.
  • B. The description argument is optional and provides a human-readable explanation of the output's purpose, but it is not required.
  • C. The default argument is not a valid argument for an output block; it is used specifically with variable blocks to provide a fallback value.

Concept tested. Terraform output block arguments

Reference. https://developer.hashicorp.com/terraform/language/values/outputs

Topics

#Terraform outputs#HCL syntax#Required arguments#Configuration language

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions