From 39ef97beff463e8fe6cccd849c748027cfab1b09 Mon Sep 17 00:00:00 2001 From: Kristin Laemmert Date: Mon, 1 Apr 2019 07:51:17 -0400 Subject: [PATCH] website: adding examples of complex variables on the command line (#20871) --- website/docs/configuration/variables.html.md | 2 ++ website/intro/getting-started/variables.html.md | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/website/docs/configuration/variables.html.md b/website/docs/configuration/variables.html.md index 2c7bf4129..1a076eb9d 100644 --- a/website/docs/configuration/variables.html.md +++ b/website/docs/configuration/variables.html.md @@ -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. diff --git a/website/intro/getting-started/variables.html.md b/website/intro/getting-started/variables.html.md index 76302d937..007fe5f44 100644 --- a/website/intro/getting-started/variables.html.md +++ b/website/intro/getting-started/variables.html.md @@ -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