Wire extension deletion into Terraform - #68
Open
IlyaasK wants to merge 1 commit into
Open
Conversation
IlyaasK
requested review from
Sayan- and
tnsardesai
and removed request for
Sayan- and
tnsardesai
July 11, 2026 07:18
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 13, 2026 13:34
e8f49fd to
33d82ee
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
from
July 13, 2026 13:34
1441404 to
e8c3978
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 13, 2026 14:32
33d82ee to
d60c9e5
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
from
July 13, 2026 14:32
e8c3978 to
c65cc5f
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 13, 2026 15:39
d60c9e5 to
1ed2fbb
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
from
July 13, 2026 15:39
c65cc5f to
14b2fa6
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 20, 2026 19:38
1ed2fbb to
a5debe6
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
3 times, most recently
from
July 21, 2026 18:10
3cd8e7e to
e4d77bc
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 21, 2026 18:10
25f8375 to
c7cd2bc
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
from
July 21, 2026 19:51
e4d77bc to
d168bc8
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-core
branch
from
July 21, 2026 20:15
1f105b7 to
cb4e287
Compare
IlyaasK
force-pushed
the
hypeship/extension-delete-framework
branch
from
July 21, 2026 20:15
d168bc8 to
6b1210f
Compare
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.
Summary
kernel_extensionstate in the Terraform Framework Delete boundaryResource scope
This PR covers only the Terraform Framework adapter for
kernel_extensionDelete. The resource remains unregistered until Create, Read, Delete, and Import are assembled as a complete lifecycle.API contract notes
The underlying core issues one project-scoped SDK DELETE with mutation retries disabled. It treats coded extension
not_foundas converged success and coded HTTP 400resource_in_useas a durable browser-pool dependency. This adapter does not duplicate that policy.Terraform state semantics
A diagnostic-free Delete lets Terraform remove state automatically. Any malformed state, dependency conflict, project failure, transport failure, or generic API error returns diagnostics, so Terraform keeps the canonical ID and retries later.
Sensitive fields
This slice introduces no sensitive fields and never reads, stores, or logs archive bytes, API keys, credentials, or runtime data.
Import behavior
Import is intentionally unchanged in this PR and will land as a separate reviewed slice before resource registration.
Verification
gofmt -l cmd internalgo test -count=20 ./internal/resources/extensiongo test -race -count=1 ./internal/resources/extensiongo test -count=1 -short -timeout=2m ./...go vet ./...go mod verifygo mod tidy -diffterraform fmt -check -recursive examplesbash scripts/check-docs.shbash scripts/check-examples.shbash scripts/check-markdown-links.shgit diff --checkAll commands passed locally. Tests are fake-client based, deterministic, network-free, and container-free.
Acceptance status
No registered complete resource exists yet, so live acceptance testing is not applicable to this adapter-only slice. Extension acceptance remains a required pre-release gate after registration.
Deferred concerns
GitHub issues
This PR does not resolve #24 or #25. Force-delete remains intentionally excluded, and provider code remains handwritten under the documented codegen decision.
Note
Low Risk
Adapter-only slice with no resource registration; behavior is delegated to reviewed delete core and covered by fake-client unit tests.
Overview
Adds the Terraform Plugin Framework Delete boundary for
kernel_extension: decode state fromDeleteRequest, then call the existingdeleteExtensioncore (no duplicated API policy).deleteExtensionResourcereturns early on state decode errors so the API is never invoked with bad state; successful deletes rely on Terraform’s normal diagnostic-free Delete to drop state, while dependency/API errors surface as diagnostics so state is retained.New unit tests cover project/id delegation to
DeleteExtension, propagation ofresource_in_usedependency messaging, and ensuring malformed state never triggers a delete call.Reviewed by Cursor Bugbot for commit 6b1210f. Bugbot is set up for automated code reviews on this repo. Configure here.