nerdexam
HashiCorp

TA-002-P · Question #272

In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?

The correct answer is A. Input Parameters. Input variables (called 'Input Parameters' in this question) are the mechanism used to make Terraform configurations dynamic and reusable. By replacing hardcoded static values with variable blocks, you allow the same configuration to be used across different environments (dev…

Read, generate, and modify configuration

Question

In order to make a Terraform configuration file dynamic and/or reusable, static values should be converted to use what?

Options

  • AInput Parameters
  • BModule
  • CRegular Expressions
  • DOutput Value

How the community answered

(36 responses)
  • A
    86% (31)
  • B
    3% (1)
  • C
    3% (1)
  • D
    8% (3)

Explanation

Input variables (called 'Input Parameters' in this question) are the mechanism used to make Terraform configurations dynamic and reusable. By replacing hardcoded static values with variable blocks, you allow the same configuration to be used across different environments (dev, staging, prod) by simply supplying different variable values. Modules (B) are a way to package and reuse configurations, but they rely on input variables to accept dynamic values. Regular expressions (C) are not a Terraform construct for this purpose. Output values (D) expose data from a configuration for use elsewhere, but they don't make the configuration itself dynamic.

Topics

#Input variables#Configuration reusability#Dynamic configurations

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice