Introduction
Terraform uses variables to customize infrastructure. Sometimes, the same variable can be set in different places. Knowing which setting Terraform uses helps avoid confusion and errors.
When you want to override a default variable value without changing the code.
When you run Terraform on different machines and want different settings on each.
When you want to test changes by temporarily changing a variable value.
When you use automation tools that pass variables to Terraform.
When you want to keep sensitive values out of your main configuration files.