From 08ef4c0dd352b0d858ecd4c460f4a475c06834da Mon Sep 17 00:00:00 2001 From: John Bruett Date: Mon, 17 Oct 2016 12:29:57 -0400 Subject: [PATCH] Update variables.html.md regarding variable files Add information under Variable Files to explain how terraform.tfvars file is used. currently that documenation only exists in the getting started guide. The added information was taken directly from the getting started guide. --- website/source/docs/configuration/variables.html.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/website/source/docs/configuration/variables.html.md b/website/source/docs/configuration/variables.html.md index fe2027475..8f0167a6a 100644 --- a/website/source/docs/configuration/variables.html.md +++ b/website/source/docs/configuration/variables.html.md @@ -195,10 +195,15 @@ $ TF_VAR_somemap='{foo = "bar", baz = "qux"}' terraform plan Variables can be collected in files and passed all at once using the -`-var-file=foo.tfvars` flag. The format for variables in `.tfvars` -files is [HCL](/docs/configuration/syntax.html#HCL), with top level key/value -pairs: +`-var-file=foo.tfvars` flag. +If a "terraform.tfvars" file is present in the current directory, Terraform +automatically loads it to populate variables. If the file is named something +else, you can use the -var-file flag directly to specify a file. These files +are the same syntax as Terraform configuration files. And like Terraform +configuration files, these files can also be JSON. The format for variables in +`.tfvars` files is [HCL](/docs/configuration/syntax.html#HCL), with top level +key/value pairs: ``` foo = "bar"