Use of Input Variables
Explore how to define and manage input variables in Terraform configurations. Understand variable types, default values, sensitivity settings, and the order in which Terraform evaluates variable submissions to effectively control your infrastructure deployments.
We'll cover the following...
How to define input variables
Variables are defined in a Terraform configuration. We can supply values for those variables at runtime or set a default value for the variable to use. Terraform requires that we supply a default value for a variable at runtime if we haven’t already done so… Failing to supply a value will cause the relevant command to error out.
At its most basic, a variable can be defined with a name label and without any arguments:
Let’s define some more information about our aws_region:
We defined what data type to expect (string) and what value to default to, and we gave a ...