backport of commit eaad183819 (#36993)

Co-authored-by: Daniel Banck <daniel@dbanck.de>
pull/36995/head
github-actions[bot] 1 year ago committed by GitHub
parent b937e12d04
commit 66023c7c64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -778,7 +778,7 @@ func (n *NodePlannableResourceInstance) importState(ctx EvalContext, addr addrs.
}
importedState := states.NewResourceInstanceObjectFromIR(imported[0])
if deferred == nil && importedState.Value.IsNull() {
if deferred == nil && !importTarget.Type().IsObjectType() && importedState.Value.IsNull() {
// It's actually okay for a deferred import to have returned a null.
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,

Loading…
Cancel
Save