terraform/config
Martin Atkins 81b0c4b28d config: generate errors for unnamed blocks of various sources
We've been incorrectly validating (or not validating at all) the
requirement that certain blocks be followed by a name string, to prohibit
e.g. this:

    variable {}

and:

    variable = ""

Before this change we were catching this for most constructs only if
there were no _valid_ blocks of the same name in the same file. For
modules in particular, we were not catching this at all.

Now we detect this for all kinds of block (resources had a pre-existing
check, so aren't touched here) and produce a different error message
depending on which of the above incorrect forms are used.

This fixes #13575.
2017-05-02 16:29:57 -07:00
..
module config/module: don't panic when referencing undefined module 2017-03-16 20:14:20 -07:00
test-fixtures config: generate errors for unnamed blocks of various sources 2017-05-02 16:29:57 -07:00
append.go merge config.Terraform fields in config.Append 2017-03-21 15:43:55 -04:00
append_test.go add terraform config merge logic to config.Merge 2017-03-22 09:01:54 -04:00
config.go config: Generate error copy from valid types map 2017-04-20 13:30:22 -07:00
config_string.go config: add "backend" loading to the Terraform section 2017-01-26 14:33:49 -08:00
config_terraform.go add Rehash to terraform.BackendState 2017-03-29 15:53:42 -04:00
config_terraform_test.go config: add "backend" loading to the Terraform section 2017-01-26 14:33:49 -08:00
config_test.go Allow escaped interpolation-like sequences in variable defaults 2017-03-29 09:25:57 -07:00
config_tree.go config: make Merge an exported func 2014-07-18 17:05:22 -07:00
import_tree.go Condense switch fallthroughs into expr lists 2015-05-26 21:52:36 -04:00
interpolate.go config: parse TerraformVariables 2017-03-13 16:09:06 -07:00
interpolate_funcs.go Merge pull request #12537 from Pryz/coalescelist 2017-04-21 15:23:21 -04:00
interpolate_funcs_test.go Merge pull request #12537 from Pryz/coalescelist 2017-04-21 15:23:21 -04:00
interpolate_test.go config: parse TerraformVariables 2017-03-13 16:09:06 -07:00
interpolate_walk.go Fix panic in interpolate_walk 2017-03-07 15:35:40 -05:00
interpolate_walk_test.go config: use ast.TypeUnknown and don't remove computed values 2016-11-09 14:28:15 -08:00
lang.go remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
loader.go command/import: load configurations and allow empty config dirs 2016-11-09 15:08:22 -08:00
loader_hcl.go config: generate errors for unnamed blocks of various sources 2017-05-02 16:29:57 -07:00
loader_hcl_test.go config: HCL loader 2014-08-11 09:58:53 -07:00
loader_test.go config: generate errors for unnamed blocks of various sources 2017-05-02 16:29:57 -07:00
merge.go add terraform config merge logic to config.Merge 2017-03-22 09:01:54 -04:00
merge_test.go add terraform config merge logic to config.Merge 2017-03-22 09:01:54 -04:00
provisioner_enums.go config: parse "when" and "on_failure" on provisioners 2017-01-19 18:10:21 -08:00
raw_config.go config: Merge respects Terraform blocks, provider aliases, and more 2016-12-13 21:48:59 -08:00
raw_config_test.go config: validate that RawConfig.Copy doesn't copy the interpolated 2016-12-02 13:25:32 -05:00
resource_mode.go config: "ResourceMode" concept for resources 2016-05-14 08:26:35 -07:00
resource_mode_string.go Restore stringer-generated files back to new version 2017-04-21 14:49:18 -07:00
testing.go terraform: rename attach config to only attach provider config 2016-10-19 13:38:51 -07:00