Skip to content

Commit 624dbc4

Browse files
committed
Remove null check
1 parent 5d68910 commit 624dbc4

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

internal/fwserver/server_upgraderesourcestate.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,5 @@ func (s *Server) UpgradeResourceState(ctx context.Context, req *UpgradeResourceS
264264
}
265265
upgradeResourceStateResponse.State.Raw = modifiedState
266266

267-
// If the write-only nullification results in a null state, then this is a provider error
268-
if upgradeResourceStateResponse.State.Raw.Type() == nil || upgradeResourceStateResponse.State.Raw.IsNull() {
269-
resp.Diagnostics.AddError(
270-
"Missing Upgraded Resource State",
271-
fmt.Sprintf("After attempting a resource state upgrade to version %d, the provider did not return any state data. ", req.Version)+
272-
"Preventing the unexpected loss of resource state data. "+
273-
"This is always an issue with the Terraform Provider and should be reported to the provider developer.",
274-
)
275-
return
276-
}
277-
278267
resp.UpgradedState = &upgradeResourceStateResponse.State
279268
}

0 commit comments

Comments
 (0)