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

This commit is contained in:
Kristin Laemmert 2019-04-01 07:51:17 -04:00 committed by GitHub
parent 6bad319187
commit 39ef97beff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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_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.

View File

@ -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
Terraform.
-> **Note**: UI Input is only supported for string variables. List and map
variables must be populated via one of the other mechanisms.
-> **Note**: In Terraform versions 0.11 and earlier, UI Input is only supported
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