plans/objchange: Don't panic if old or new values are null
This commit is contained in:
parent
972b28745b
commit
8048e9a585
|
@ -176,6 +176,16 @@ func assertValueCompatible(planned, actual cty.Value, path cty.Path) []error {
|
||||||
return errs
|
return errs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if actual.IsNull() {
|
||||||
|
if planned.IsNull() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
errs = append(errs, path.NewErrorf("was %#v, but now null", planned))
|
||||||
|
}
|
||||||
|
if planned.IsNull() {
|
||||||
|
errs = append(errs, path.NewErrorf("was null, but now %#v", actual))
|
||||||
|
}
|
||||||
|
|
||||||
ty := planned.Type()
|
ty := planned.Type()
|
||||||
switch {
|
switch {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue