Commit Graph

14 Commits

Author SHA1 Message Date
Wang Guoliang 9a97c348f0
optimization:Merge slices 2017-09-13 21:08:41 +08:00
Martin Atkins 8cd0ee80e5 config: merge/append for local values
It seems that this somehow got lost in the commit/rebase shuffle and
wasn't caught by the tests that _did_ make it because they were all using
just one file.

As a result of this bug, locals would fail to work correctly in any
configuration with more than one .tf file.

Along with restoring the append/merge behavior, this also reworks some of
the tests to exercise the multi-file case as better insurance against
regressions of this sort in future.

This fixes #15969.
2017-09-01 17:51:13 -07:00
James Bardin bcbcc65f7d add terraform config merge logic to config.Merge 2017-03-22 09:01:54 -04:00
Mitchell Hashimoto 3878b8b093
config: Merge respects Terraform blocks, provider aliases, and more
Fixes #10715

`config.Merge` was not updated to support a number of new features. This
updates the codepath to merge various fields, including the `terraform`
block which was the issue in #10715.

The `Merge` API is called when an `_override` file is present to _merge_
configurations. Normally configurations are _appended_. Only an override
file triggers a _merge_.

I started working on a generic library to do this automatically awhile
back but never finished it. This might motivate me to do so. In the
interest of getting a fix out though, we'll continue the manual
approach.
2016-12-13 21:48:59 -08:00
Mitchell Hashimoto fdded8ca14 config: allow atlas block 2015-03-24 13:30:22 -07:00
Mitchell Hashimoto dd6f536fab config: Merge for modules works 2014-09-11 19:54:02 -07:00
Carlos Diaz-Padron 47529f829e Fix maps race in append and merge tests 2014-07-28 23:17:48 -07:00
Mitchell Hashimoto 9d2e83d56d config: Merge works properly 2014-07-20 17:17:03 -07:00
Mitchell Hashimoto 7bd7e4218f config: make ProviderConfigs slice 2014-07-19 16:05:48 -07:00
Mitchell Hashimoto 3834846418 config: Outputs is now a slice 2014-07-18 22:21:52 -07:00
Mitchell Hashimoto a19e2983de terraform: tests passing for Config change 2014-07-18 22:13:15 -07:00
Mitchell Hashimoto e4bcd3c448 config: Variables is now a slice 2014-07-18 17:48:30 -07:00
Mitchell Hashimoto a583b800a4 config: add unknownKeys to Merge 2014-07-18 17:20:56 -07:00
Mitchell Hashimoto 3d67c967aa config: make Merge an exported func 2014-07-18 17:05:22 -07:00