Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Terraform
Commits
39ef97be
Unverified
Commit
39ef97be
authored
6 years ago
by
Kristin Laemmert
Committed by
GitHub
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
website: adding examples of complex variables on the command line (#20871)
parent
6bad3191
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
website/docs/configuration/variables.html.md
+2
-0
website/docs/configuration/variables.html.md
website/intro/getting-started/variables.html.md
+4
-2
website/intro/getting-started/variables.html.md
with
6 additions
and
2 deletions
+6
-2
website/docs/configuration/variables.html.md
+
2
-
0
View file @
39ef97be
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
website/intro/getting-started/variables.html.md
+
4
-
2
View file @
39ef97be
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment