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
sensitiveargument 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
descriptionargument is optional and provides a human-readable explanation of the output's purpose, but it is not required. - C. The
defaultargument is not a valid argument for anoutputblock; it is used specifically withvariableblocks 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.