Unverified Commit 39ef97be authored by Kristin Laemmert's avatar Kristin Laemmert Committed by GitHub
Browse files

website: adding examples of complex variables on the command line (#20871)

parent 6bad3191
Showing with 6 additions and 2 deletions
+6 -2
...@@ -172,6 +172,8 @@ when running the `terraform plan` and `terraform apply` commands: ...@@ -172,6 +172,8 @@ when running the `terraform plan` and `terraform apply` commands:
``` ```
terraform apply -var="image_id=ami-abc123" terraform apply -var="image_id=ami-abc123"
terraform apply -var='image_id_list=["ami-abc123","ami-def456"]'
terraform apply -var='image_id_map={"us-east-1":"ami-abc123","us-east-2":"ami-def456"}'
``` ```
The `-var` option can be used any number of times in a single command. The `-var` option can be used any number of times in a single command.
......
...@@ -122,8 +122,10 @@ values are not saved, but this provides a convenient workflow when getting ...@@ -122,8 +122,10 @@ values are not saved, but this provides a convenient workflow when getting
started with Terraform. UI Input is not recommended for everyday use of started with Terraform. UI Input is not recommended for everyday use of
Terraform. Terraform.
-> **Note**: UI Input is only supported for string variables. List and map -> **Note**: In Terraform versions 0.11 and earlier, UI Input is only supported
variables must be populated via one of the other mechanisms. for string variables. List and map variables must be populated via one of the
other mechanisms. Terraform 0.12 introduces the ability to populate complex
variable types from the UI prompt.
#### Variable Defaults #### Variable Defaults
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment