Skip to content

Commit

Permalink
Remove null check
Browse files Browse the repository at this point in the history
  • Loading branch information
SBGoods committed Feb 11, 2025
1 parent 5d68910 commit 624dbc4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions internal/fwserver/server_upgraderesourcestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,5 @@ func (s *Server) UpgradeResourceState(ctx context.Context, req *UpgradeResourceS
}
upgradeResourceStateResponse.State.Raw = modifiedState

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

resp.UpgradedState = &upgradeResourceStateResponse.State
}

0 comments on commit 624dbc4

Please sign in to comment.