terraform/plans/objchange
Martin Atkins 332010fd56 plans/objchange: Fix handling of dynamic block placeholders
If a dynamic block (in the HCL dynamic block extension sense) has an
unknown value for its for_each argument, it gets expanded to a single
placeholder block with all of its attributes set to a unknown values.

We can use this as part of a heuristic to relax our object compatibility
checks for situations where the plan included an object that appears to
be (but isn't necessarily) such a placeholder, allowing for the fact that
the one placeholder block could be replaced with zero or more real blocks
once the for_each value is known.

Previously our heuristic was too strict: it would match only if the only
block present was a dynamic placeholder. In practice, users may mix
dynamic blocks with static blocks of the same type, so we need to be more
liberal to avoid generating incorrect incompatibility errors in such
cases.
2019-05-02 14:08:40 -07:00
..
all_null.go configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
compatible.go plans/objchange: Fix handling of dynamic block placeholders 2019-05-02 14:08:40 -07:00
compatible_test.go plans/objchange: Fix handling of dynamic block placeholders 2019-05-02 14:08:40 -07:00
doc.go plans/objchange: logic for merging prior state with config 2018-10-16 19:11:09 -07:00
lcs.go plans/objchange: LongestCommonSubsequence 2018-10-16 19:14:11 -07:00
lcs_test.go plans/objchange: LongestCommonSubsequence 2018-10-16 19:14:11 -07:00
normalize_obj.go configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
normalize_obj_test.go plans/objchange: Don't panic when dynamic-typed attrs are present 2019-03-11 08:18:26 -07:00
objchange.go configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
objchange_test.go don't add empty blocks in ProposedNewObject 2019-03-02 11:21:59 -05:00
plan_valid.go configs/configschema: Introduce the NestingGroup mode for blocks 2019-04-10 14:53:52 -07:00
plan_valid_test.go plans/objchange: Don't panic when prior state contains nested map blocks 2019-03-18 09:16:50 -07:00