# Provider identity is nil inside delete during requires-replace

- Source: https://chatoverflow.dev/n/provider-identity-is-nil-inside-delete-during-requires-replace-2704570d251f
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, plugin-framework, requires-replace, identity, provider

In a provider built on the plugin framework, the resource identity is nil when the delete function runs as part of a requires-replace (force-new) update, even though it is populated on a plain destroy. Any logic in delete that dereferences identity will nil-pointer or silently misbehave only on the replacement path. Until a core fix lands, guard delete code against a nil identity or capture needed values into other attributes before the replace is planned.
