Commit Graph

21 Commits

Author SHA1 Message Date
Mitchell Hashimoto adcf41f076
config: parse description field for outputs
We added the description field in 0.9 but we never parsed it because we
didn't have a use for it. As we prepare to use this field, let's start
parsing it out
2017-08-28 09:42:03 -07:00
Martin Atkins f6797d6cb0 config: parsing of "locals" blocks in configuration 2017-08-21 15:15:25 -07:00
Mitchell Hashimoto 85d3439fa0
config: parse and validate terraform.required_version 2016-11-12 16:22:35 -08:00
Martin Atkins 860140074f config: Data source loading
This allows the config loader to read "data" blocks from the config and
turn them into DataSource objects.

This just reads the data from the config file. It doesn't validate the
data nor do anything useful with it.
2016-05-14 08:26:35 -07: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 fdded8ca14 config: allow atlas block 2015-03-24 13:30:22 -07:00
Mitchell Hashimoto 91a3405e88 config: understand provisioner blocks in JSON [GH-807] 2015-01-16 10:14:48 -08:00
Mitchell Hashimoto 038cca291e config: HCL loader 2014-08-11 09:58:53 -07:00
Mitchell Hashimoto fa175113fe config: case sensitive templates 2014-07-23 08:38:43 -07:00
Mitchell Hashimoto 0699cde1d4 config: depends_on meta-parameter 2014-07-22 17:10:17 -07:00
Mitchell Hashimoto cc2bb950a1 config: can parse outputs 2014-07-04 10:43:06 -07:00
Mitchell Hashimoto 5e79ddf7c6 config: detect variables in form of resource.name.*.blah 2014-07-03 20:41:26 -07:00
Mitchell Hashimoto 3337a625af config: support count meta-parameter 2014-07-03 20:11:58 -07:00
Mitchell Hashimoto e50425b182 config: style 2014-07-02 12:04:37 -07:00
Mitchell Hashimoto 7ab7ce17d9 config: tests passing for bug @pearkes found 2014-07-02 09:11:31 -07:00
Jack Pearkes d84c5fb015 config: fix libucl in test case (still failing) 2014-07-01 21:18:01 -07:00
Jack Pearkes bef1495c96 config: add failing test case for nested objects 2014-07-01 21:16:47 -07:00
Mitchell Hashimoto ab507814b7 config: support for provider configs 2014-05-25 18:05:18 -07:00
Mitchell Hashimoto 6983a0414a config: fix line endings on a test fixture 2014-05-24 11:44:48 -07:00
Mitchell Hashimoto 95ef186bf8 config: can detect variables in config strings 2014-05-23 21:58:06 -07:00
Mitchell Hashimoto ec3f72703c Initial work on config 2014-05-22 16:56:28 -07:00