Skip to content

fix: idempotent lifecycle ops#1303

Open
DominikPildner wants to merge 3 commits intostackitcloud:mainfrom
intive:fix/idempotent-lifecycle-ops
Open

fix: idempotent lifecycle ops#1303
DominikPildner wants to merge 3 commits intostackitcloud:mainfrom
intive:fix/idempotent-lifecycle-ops

Conversation

@DominikPildner
Copy link

Description

This PR brings resource lifecycle operations in line with Terraform plugin framework best practices (see Read and Delete guidelines):

  1. Read with missing ID: When Read is called before Create (e.g. by tools that observe existing infrastructure), resource IDs that are server-assigned will be empty. Previously this caused API errors from requests with empty IDs. Now the resource is gracefully removed from state instead.

  2. Delete of already-deleted resource: When a resource has already been deleted outside of Terraform, Delete now handles the not-found response gracefully instead of returning an error.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@DominikPildner DominikPildner requested a review from a team as a code owner March 18, 2026 08:03
@DominikPildner DominikPildner changed the title Fix: idempotent lifecycle ops fix: idempotent lifecycle ops Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant