Skip to content

Commit fc058a8

Browse files
rainkwanaustinvalle
andcommitted
Update internal/fwserver/server_moveresourcestate.go
Co-authored-by: Austin Valle <[email protected]>
1 parent d7d1d94 commit fc058a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

internal/fwserver/server_moveresourcestate.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ func (s *Server) MoveResourceState(ctx context.Context, req *MoveResourceStateRe
246246
resp.TargetIdentity = moveStateResp.TargetIdentity
247247
}
248248

249+
if resp.TargetIdentity != nil && req.IdentitySchema == nil {
250+
resp.Diagnostics.AddError(
251+
"Unexpected Move State Response",
252+
"An unexpected error was encountered when creating the move state response. New identity data was returned by the provider move state operation, but the resource does not indicate identity support.\n\n"+
253+
"This is always a problem with the provider and should be reported to the provider developer.",
254+
)
255+
256+
return
257+
}
258+
249259
if moveStateResp.TargetPrivate != nil {
250260
resp.TargetPrivate.Provider = moveStateResp.TargetPrivate
251261
}

0 commit comments

Comments
 (0)