nerdexam
HashiCorp

TA-002-P · Question #164

Which of the following is the right substitute for static values that can make Terraform configuration file more dynamic and reusable?

The correct answer is B. Input parameters. Input variables (declared with the variable block) are the correct substitute for static values, making Terraform configurations dynamic and reusable. Instead of hardcoding values like region, instance type, or bucket names, you define input variables that can be supplied at…

Understand Terraform basics

Question

Which of the following is the right substitute for static values that can make Terraform configuration file more dynamic and reusable?

Options

  • AOutput value
  • BInput parameters
  • CFunctions
  • DModules

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    90% (36)
  • C
    5% (2)
  • D
    3% (1)

Explanation

Input variables (declared with the variable block) are the correct substitute for static values, making Terraform configurations dynamic and reusable. Instead of hardcoding values like region, instance type, or bucket names, you define input variables that can be supplied at runtime via .tfvars files, CLI flags, or environment variables. Output values expose data after provisioning; functions transform data; and modules are reusable configuration units - none of these directly replace static values the way input variables do.

Topics

#Variables#Input Parameters#Dynamic Configuration#Reusability

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice