aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go b/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
index 8b7ef43..d85086c 100644
--- a/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
+++ b/vendor/github.com/hashicorp/terraform/plans/objchange/compatible.go
@@ -84,7 +84,7 @@ func assertObjectCompatible(schema *configschema.Block, planned, actual cty.Valu
84 // whether there are dynamically-typed attributes inside. However, 84 // whether there are dynamically-typed attributes inside. However,
85 // both support a similar-enough API that we can treat them the 85 // both support a similar-enough API that we can treat them the
86 // same for our purposes here. 86 // same for our purposes here.
87 if !plannedV.IsKnown() || plannedV.IsNull() || actualV.IsNull() { 87 if !plannedV.IsKnown() || !actualV.IsKnown() || plannedV.IsNull() || actualV.IsNull() {
88 continue 88 continue
89 } 89 }
90 90
@@ -169,6 +169,16 @@ func assertObjectCompatible(schema *configschema.Block, planned, actual cty.Valu
169 }) 169 })
170 errs = append(errs, setErrs...) 170 errs = append(errs, setErrs...)
171 171
172 if maybeUnknownBlocks {
173 // When unknown blocks are present the final number of blocks
174 // may be different, either because the unknown set values
175 // become equal and are collapsed, or the count is unknown due
176 // a dynamic block. Unfortunately this means we can't do our
177 // usual checks in this case without generating false
178 // negatives.
179 continue
180 }
181
172 // There can be fewer elements in a set after its elements are all 182 // There can be fewer elements in a set after its elements are all
173 // known (values that turn out to be equal will coalesce) but the 183 // known (values that turn out to be equal will coalesce) but the
174 // number of elements must never get larger. 184 // number of elements must never get larger.