terraform/config/test-fixtures
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
..
count-int
count-string
count-var
dir-basic
dir-empty
dir-merge
dir-override config: HCL loader 2014-08-11 09:58:53 -07:00
dir-temporary-files
import
interpolations
validate-bad-depends-on
validate-bad-multi-resource
validate-count-bad-context
validate-count-below-zero
validate-count-count-var
validate-count-int
validate-count-module-var
validate-count-not-int
validate-count-resource-var
validate-count-user-var
validate-count-var
validate-count-var-invalid
validate-count-zero
validate-depends-on-var
validate-dup-module
validate-dup-resource
validate-good
validate-module-name-bad
validate-module-source-var
validate-module-var-int
validate-module-var-map
validate-module-var-self
validate-output-bad-field
validate-output-missing-equals
validate-path-var
validate-path-var-invalid
validate-prov-conn-splat-other config: test we can ref splat of other resources 2015-02-20 09:19:13 -08:00
validate-prov-conn-splat-self
validate-prov-splat-other
validate-prov-splat-self
validate-provider-multi
validate-provider-multi-good
validate-provider-multi-ref-bad
validate-provider-multi-ref-good
validate-resource-prov-self
validate-resource-self
validate-unknown-resource-var
validate-unknown-resource-var-output
validate-unknownthing
validate-unknownvar
validate-unknownvar-count
validate-var-default
validate-var-default-bad-type
validate-var-default-interpolate
validate-var-module
validate-var-module-invalid
validate-var-multi-exact-non-slice
validate-var-multi-func
validate-var-multi-non-slice
validate-var-multi-non-slice-provisioner
.gitattributes
attributes.tf
attributes.tf.json
bad-variable-type.tf core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
bad_type.tf.nope
basic.tf core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
basic.tf.json core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
connection.tf
create-before-destroy.tf
empty.tf
escapedquotes.tf
heredoc.tf
ignore-changes.tf
import.tf
lifecycle_cbd_typo.tf
modules.tf
prevent-destroy-string.tf
provisioners.tf
resource-arity-mistake.tf
variable-mismatched-type.tf core: Support explicit variable type declaration 2016-01-24 11:40:02 -06:00
variables.tf
windows-line-endings.tf