Repository navigation
Recreate catalog entities deleted outside Terraform - #127
Merged
ryanduffin merged 1 commit intoOct 6, 2026
Merged
ryanduffin merged 1 commit into
ryanduffin merged 1 commit into
Conversation
ryanduffin
added this pull request to stack #128
October 6, 2026 15:30
ryanduffin
force-pushed
the
rduffin/recreate-deleted-catalog-entity
branch
from
October 6, 2026 18:47
2d7ccb8 to
39b1364
Compare
When an entity managed by cortex_catalog_entity was deleted in the UI or through the API, Read returned the "not found" error, so every plan that included the resource failed until someone recreated the entity by hand. Read now removes the resource from state when the API answers 404, so the plan creates the entity again. This is the same handling as cortex_catalog_entity_openapi and cortex_integration_configuration. The API also answers 404 for an entity that the token cannot see, so Read adds a warning that names the entity. Other read errors still fail the plan and keep the entity in state, and the error now names the entity. A destroy after an outside delete now succeeds, and an import of a missing entity fails with Terraform's "Cannot import non-existent remote object". The catalog fake answers unexpected requests with 500, so that a wrong route in a test is not read as a deleted entity. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ryanduffin
force-pushed
the
rduffin/recreate-deleted-catalog-entity
branch
from
October 6, 2026 19:26
39b1364 to
3314b32
Compare
ryanduffin
marked this pull request as ready for review
October 6, 2026 20:24
gvillenave
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a
cortex_catalog_entityis deleted outside Terraform, the plan now creates it again instead of failing with "not found".Claude Details