Commit Graph

20 Commits

Author SHA1 Message Date
Mitchell Hashimoto da418b2582
website: note about map/var merging 2016-12-10 15:05:58 -05:00
Mitchell Hashimoto bac66430cb
terraform: consistent variable values for booleans
Fixes #6447

This ensures that all variables of type string are consistently
converted to a string value upon running Terraform.

The place this is done is in the `Variables()` call within the
`terraform` package. This is the function responsible for loading and
merging the variables from the various sources and seems ideal for
proper conversion to consistent values for various types. We actually
already had tests to this effect.

This also adds docs that talk about the fake-ish boolean variables
Terraform currently has and about how in future versions we'll likely
support them properly, which can cause BC issues so beware.
2016-10-31 11:22:26 -07:00
James Turnbull 18b3736ba4 Pass over the Interpolation page (#9703)
* Pass over the Interpolation page

Fixes some grammar, typos and structure. Updated some headings and fixed
a couple of spelling mistakes.

* Added proper note syntax

* Turned some notes into actual notes

* Couple of minor typos just noticed
2016-10-29 01:13:09 +01:00
James Turnbull 0d5f86bd0d Cleanup of the resources and variables pages
1. Added a heredoc example to the variables page.
2. Tidied up and added headers.
3. Some minor whitespace and grammar edits.
2016-10-24 20:05:25 +11:00
James Turnbull 68b88f273e Some edits to the variables sections
1. Fixes a duplicate word.
2. Fixes a variety of formatting.
3. Re-structures variable assignment section.
4. Sets Notes to consistent style.
2016-10-18 04:35:39 +11:00
James Nugent d12b637602 docs: Clarify terraform.tfvars file additions 2016-10-17 11:39:12 -05:00
John Bruett 08ef4c0dd3 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.
2016-10-17 12:29:57 -04:00
Nick Walke 10419405a7
Corrected a plural 2016-10-07 10:23:11 -05:00
Paul Hinze d50aeeef0d
website: Docs sweep for lists & maps 2016-07-28 15:49:53 -05:00
amangoel f891ab81f4 Update variables.html.md (#6869) 2016-05-25 16:38:32 +01:00
Mårten Gustafson 5b7f12ecd7 Tweak docs to properly document .tfvars format (#6415)
As reported and described in hashicorp/terraform#3292
2016-04-29 14:06:36 +01:00
gamename c6b350b98e docs(variables): describe order of evaluation with files 2016-03-01 17:08:57 -06:00
James Nugent cb6cb8b96a core: Support explicit variable type declaration
This commit adds support for declaring variable types in Terraform
configuration. Historically, the type has been inferred from the default
value, defaulting to string if no default was supplied. This has caused
users to devise workarounds if they wanted to declare a map but provide
values from a .tfvars file (for example).

The new syntax adds the "type" key to variable blocks:

```
variable "i_am_a_string" {
    type = "string"
}

variable "i_am_a_map" {
    type = "map"
}
```

This commit does _not_ extend the type system to include bools, integers
or floats - the only two types available are maps and strings.

Validation is performed if a default value is provided in order to
ensure that the default value type matches the declared type.

In the case that a type is not declared, the old logic is used for
determining the type. This allows backwards compatiblity with previous
Terraform configuration.
2016-01-24 11:40:02 -06:00
Mitchell Hashimoto 316afd8964 website: update docs with environment variables for vars 2015-04-22 06:37:03 +02:00
Seth Vargo 073a0f76c5 Add meta descriptions to all pages 2014-10-21 23:21:56 -04:00
Mitchell Hashimoto 3cf4f57fe8 website: update docs for new mappings format 2014-08-30 16:20:45 -07:00
Mitchell Hashimoto f7022711c0 website: fix syntax of variables 2014-08-28 09:17:27 -07:00
Alex Gaynor 46154ca1d3 Fixed a ton of typos in docs and comments 2014-08-07 00:19:56 -07:00
Mitchell Hashimoto d28e5a1638 dos2unix 2014-07-28 10:43:00 -07:00
Mitchell Hashimoto c27b2cd9b9 website: providers and variables 2014-07-25 14:51:26 -07:00