File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,15 @@ func (n *NodePlannableResourceInstance) managedResourceExecute(ctx EvalContext)
386
386
}
387
387
388
388
if importing {
389
- change .Importing = & plans.Importing {Target : n .importTarget }
389
+ // There is a subtle difference between the import by identity
390
+ // and the import by ID. When importing by identity, we need to
391
+ // make sure to use the complete identity return by the provider
392
+ // instead of the (potential) incomplete one from the configuration.
393
+ if n .importTarget .Type ().IsObjectType () {
394
+ change .Importing = & plans.Importing {Target : instanceRefreshState .Identity }
395
+ } else {
396
+ change .Importing = & plans.Importing {Target : n .importTarget }
397
+ }
390
398
}
391
399
392
400
// FIXME: here we udpate the change to reflect the reason for
You can’t perform that action at this time.
0 commit comments