Difference between revisions of "Terraform variables"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
* [[Terraform Cloud]]: https://www.terraform.io/cloud-docs/workspaces/variables | * [[Terraform Cloud]]: https://www.terraform.io/cloud-docs/workspaces/variables | ||
− | * [[Terraform variables: variables.tf]] | + | * Terraform variable definition: <code>[[Terraform variables: variables.tf|variables.tf]]</code> |
== Examples == | == Examples == |
Revision as of 06:03, 6 September 2022
- https://www.terraform.io/language/values/variables:
string, number, bool, any
- Terraform Cloud: https://www.terraform.io/cloud-docs/workspaces/variables
- Terraform variable definition:
variables.tf
Examples
Using command line parameters:
terraform apply -var="image_id=ami-abc123"
terraform apply -var="image_id=ami-abc123 -var="your_second_var=yourvalue"
Using a file:
Related
- Terraform variable types:
string, number, bool, any
- Terraform environment variables
- Terraform types
- Terraform: variables.tf
auto.tfvars
nullable
Terraform v1.1.0 (Dec 2021)validation
block introduced in terraform CLI v0.13.0 (August 2020)output
-var-file
terraform plan
locals
: https://www.terraform.io/language/values/locals- Terragrunt: inputs:
See also
Advertising: