Infrastructure · Flashcard

What is the purpose of an input variable in Terraform?

  • ATo parameterize a configuration so the same code can be reused with different values
  • BTo expose a configuration's results so other tools and modules can consume them
  • CTo name a computed expression so it can be reused throughout the configuration
  • DTo store the configuration's current state so Terraform can track real resources

Why this is the answer

Variables are inputs you pass in, letting one config serve many environments. Outputs do the opposite — they expose values out of the config.

Official docs
Study in Gnoseed →