terraform/config/module
Mitchell Hashimoto 095b7e7831
config/module: disallow root modules named "root"
Fixes #11038

This is a **short term fix**.

Terraform core doesn't currently handle root modules named "root" well
because the prefix `[]string{"root"}` has special meaning and Terraform
core [currently] can't disambiguate between the root module and a module
named "root" in the root module.

This PR introduces a short term fix by simply disallowing root modules
named "root". This shouldn't break any BC because since 0.8.0 this
didn't work at all in many broken ways (including crashes).

Longer term, this should be fixed by removing the special prefix at all
and having empty paths be root. I started down this path but the core
changes necessary are far too scary for a patch release. We can aim for
0.9.
2017-01-08 15:39:57 -08:00
..
test-fixtures config/module: disallow root modules named "root" 2017-01-08 15:39:57 -08:00
copy_dir.go Add proper build constraints for GH-7273 2016-06-23 08:02:32 -04:00
get.go Don't try to copy files over themselves 2016-06-22 11:25:42 -04:00
inode.go build: Opt-in to building rather than opt-out 2016-07-29 18:40:31 -05:00
inode_freebsd.go build: Opt-in to building rather than opt-out 2016-07-29 18:40:31 -05:00
inode_windows.go build: Opt-in to building rather than opt-out 2016-07-29 18:40:31 -05:00
module.go
module_test.go
tree.go config/module: disallow root modules named "root" 2017-01-08 15:39:57 -08:00
tree_gob.go
tree_gob_test.go
tree_test.go config/module: disallow root modules named "root" 2017-01-08 15:39:57 -08:00
validate_provider_alias.go config: smarter provider alias usage validation 2016-12-16 16:47:32 -08:00