diff --git a/linode/firewall/framework_resource.go b/linode/firewall/framework_resource.go index e9b9ce97a..b71254a84 100644 --- a/linode/firewall/framework_resource.go +++ b/linode/firewall/framework_resource.go @@ -100,6 +100,11 @@ func (r *Resource) Read( ctx = populateLogAttributes(ctx, state) + // TODO: cleanup when Crossplane fixes it + if helper.FrameworkAttemptRemoveResourceForEmptyID(ctx, state.ID, resp) { + return + } + id := helper.FrameworkSafeStringToInt(state.ID.ValueString(), &resp.Diagnostics) if resp.Diagnostics.HasError() { return @@ -127,11 +132,6 @@ func (r *Resource) Read( refreshRules(ctx, client, id, &state, &resp.Diagnostics, false) refreshDevices(ctx, client, id, &state, &resp.Diagnostics, false) - // TODO: cleanup when Crossplane fixes it - if helper.FrameworkAttemptRemoveResourceForEmptyID(ctx, state.ID, resp) { - return - } - resp.Diagnostics.Append(resp.State.Set(ctx, &state)...) }