Commit Graph

20 Commits

Author SHA1 Message Date
Mitchell Hashimoto 14b371d533
config: validate that RawConfig.Copy doesn't copy the interpolated
values
2016-12-02 13:25:32 -05:00
Mitchell Hashimoto b3f80b9469
config: maintain slice index accounting for computed keys
Fixes #10075
Fixes #10013

When interpolating, we were only maintaining the last known slice index.
If you had sibling slices then you could lose your slice index when
exiting the slice. The resulting behavior was that no some runs the
computed key would be: "slice.0.attr" and on others would be
"slice.attr", the latter being incorrect.

We now maintain a list of slice indexes so that as we unnest, we
properly restore the old value.

Surprisingly unrelated to the graph but the shadow graph caught this
which is great. :)
2016-11-14 18:33:29 -08:00
Mitchell Hashimoto 2d656b484c
config: test that partial interpolation in a list works properly 2016-11-09 14:28:15 -08:00
Mitchell Hashimoto b979d8927e
config: use ast.TypeUnknown and don't remove computed values 2016-11-09 14:28:15 -08:00
Mitchell Hashimoto 5cd6898109
config: fix a conflicting test name
A public API TestNewRawConfig was added to easily create a raw config
for testing, but this conflicted with the test. Just rename it.
2016-10-19 13:39:28 -07:00
James Bardin 14138fc449 Add test for RawMap
Ensure that RawMap() returns an identical copy, and not a reference to
the original map.
2016-08-31 14:00:59 -04:00
Mitchell Hashimoto 5f3de02fa9 remove config/lang, use hashicorp/hil 2016-02-03 13:24:04 -05:00
Mitchell Hashimoto f223be15cd config: eval HEL as long as the result changes [GH-2909] 2016-01-19 12:51:56 -08:00
Mitchell Hashimoto 5e25dc54a7 config: if any var is computed, the entire interpolation is computed 2015-02-27 22:47:43 -08:00
Mitchell Hashimoto 0a68576746 config: add RawConfig.Merge 2015-02-19 12:07:59 -08:00
Mitchell Hashimoto 2abeb2d9ac config: use new API 2015-01-14 22:03:15 -08:00
Mitchell Hashimoto 8ae14f06b3 config: variables must be typed 2015-01-14 10:40:43 -08:00
Mitchell Hashimoto 8e2315599f config: Count can be a string (for interpolation) 2014-10-02 11:14:50 -07:00
Mitchell Hashimoto da2e221628 terraform: Interpolate if there are any interpolations [GH-159] 2014-08-21 15:05:56 -07:00
Mitchell Hashimoto d2001275dc terraform: initial Plan structure
This is REALLY heavy and would be really hard to maintain any sort
of compatibility with, but it is what we're going to do during dev
initially (if we don't ship with it) in order to just get stuff working.
2014-06-20 10:33:26 -07:00
Mitchell Hashimoto 69841c22e6 config: RawConfig.Config returns raw if no interpolate 2014-06-12 17:47:05 -07:00
Mitchell Hashimoto bbca28a0ef config: test double interpolating 2014-06-12 17:26:05 -07:00
Mitchell Hashimoto e445f8db38 config: RawConfig works, plus tests 2014-06-12 17:24:55 -07:00
Mitchell Hashimoto 0ad9d9ddc7 config: keep track of unknown keys during interpolate 2014-06-12 17:00:50 -07:00
Mitchell Hashimoto 1af5aee146 config: remove unknown variable elements from the config 2014-06-12 16:40:53 -07:00