Add kernel_deployment data source - #99
Open
IlyaasK wants to merge 78 commits into
Open
Conversation
Set the durable v1 target and release gates before resource implementation begins. Co-authored-by: Cursor <cursoragent@cursor.com>
Use the latest tagged SDK while keeping provider behavior unchanged.
Expose org-scoped project mutations without automatic retries so Terraform resource work can use the generated SDK safely.
Define the durable project schema and pure SDK conversion boundary before wiring resource lifecycle behavior.
Model definite, successful, and uncertain project creation without exposing a partial Terraform resource. Preserve recoverable identity on ambiguous outcomes and direct operators to import before retrying.
IlyaasK
marked this pull request as ready for review
July 11, 2026 22:15
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a7591c. Configure here.
IlyaasK
force-pushed
the
hypeship/deployment-data-source
branch
from
July 11, 2026 22:28
7a7591c to
8a725e7
Compare
Join all project flatten diagnostics in uncertain create outcomes so operators see every invalid durable field. Add a regression test covering simultaneous missing ID and name values.
Read projects by canonical state ID, remove state only for coded not-found responses, and reject malformed or identity-changing API responses. Cover the pure unregistered lifecycle core with focused tests.
Build SDK error and response fixtures before parallel Create subtests so helper failures use the owning parent test before child execution begins.
Build a name-only SDK patch for changed project plans, skip unchanged names, and reject unknown values before the network boundary.
Apply name-only patches by canonical state ID, skip no-op updates, and validate complete SDK responses before returning new Terraform state.
Implement non-force project deletion with explicit state-preserving diagnostics, idempotent coded-not-found handling, and focused status-boundary tests. Document the API's indistinguishable projects-disabled not-found response as a residual provider risk.
Seed imported project state with the exact non-empty canonical ID and an unknown name so the normal Read lifecycle settles durable state.
Translate Terraform create plans into the reviewed project creation core and persist recoverable identity before uncertain diagnostics. Keep registration deferred until the complete lifecycle is wired.
IlyaasK
force-pushed
the
hypeship/v1-release-publish
branch
from
July 13, 2026 13:36
a53f1fb to
0ba61eb
Compare
IlyaasK
force-pushed
the
hypeship/deployment-data-source
branch
2 times, most recently
from
July 13, 2026 14:32
1b58199 to
ee22563
Compare
Separate recovery guidance for creates with and without recoverable state, and normalize empty SDK errors so Terraform always reports an actionable reason.
Refresh validated durable state, remove only confirmed missing projects, and preserve pre-populated Terraform state on diagnostics or malformed input.
Translate Framework update requests into the tested project update core while preserving prior state on diagnostics and no-op plans.
Decode prior project state, delegate to the non-force delete core, and preserve Terraform ownership by returning diagnostics on malformed state or API failure.
IlyaasK
force-pushed
the
hypeship/v1-release-publish
branch
from
July 13, 2026 15:39
3755aea to
f96c137
Compare
IlyaasK
force-pushed
the
hypeship/deployment-data-source
branch
from
July 13, 2026 15:39
ee22563 to
2061aa5
Compare
Add a validated GoReleaser contract so provider archives, checksums, and the registry manifest are reproducible before signed tag publishing is enabled.
Build and verify unsigned registry assets in a read-only tag workflow so release owners can inspect a deterministic handoff before signing or publication is enabled.
Require protected release approval before importing the Registry key, signing the prepared checksum, and publishing retry-safe GitHub Release assets.
Expose direct project-scoped deployment metadata without logs, event streams, source fields absent from the tagged SDK, or environment values.
IlyaasK
force-pushed
the
hypeship/v1-release-publish
branch
from
July 21, 2026 20:15
fc3f751 to
af23b48
Compare
IlyaasK
force-pushed
the
hypeship/deployment-data-source
branch
from
July 21, 2026 20:15
e5257d1 to
190705e
Compare
IlyaasK
force-pushed
the
hypeship/v1-release-publish
branch
10 times, most recently
from
July 30, 2026 19:31
29407cd to
371cda6
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_deploymentdata source backed by the tagged Go SDK's direct deployment GETResource/data-source scope
Adds
kernel_deploymentdata source only. The deployment resource remains deferred. This PR does not create, stop, delete, invoke, follow, or stream anything.API contract notes
Kernel Go SDK v0.76.0 already exposes project-scoped
Deployments.Get. The provider-local wrapper adds onlyGetDeployment; it does not expose deployment create, delete, or event-stream methods. Source provenance, app name, version, and actions remain omitted because the tagged GET model does not return them;kernel_appremains the app metadata lookup.Terraform state semantics
idis the required canonical selector.project_idfollows the existing explicit override, provider default, then API-key binding order. Computed status and status reason are inspection metadata only. Missing or null optional metadata normalizes to null, and present malformed API fields produce diagnostics.Sensitive field handling
The API returns redacted deployment environment values. Terraform state stores only sorted
env_var_keys; the schema has no environment-value field. Logs, events, source credentials, and GitHub tokens are not read or stored.Import behavior
Not applicable to a data source. The blocked deployment resource still requires its separately documented import and deletion contracts.
Tests run
gofmt -l cmd internalgo test -short -timeout=2m ./...go vet ./...terraform fmt -check -recursive examplesbash scripts/check-docs.shbash scripts/check-markdown-links.shbash scripts/check-examples.shAcceptance status
An opt-in acceptance test reads the deployment backing
KERNEL_ACC_APP_NAMEandKERNEL_ACC_APP_VERSIONthrough explicit and provider-default project scope, then verifies a clean plan. It performs no deployment lifecycle or runtime operation. It was compiled but not run locally because live Kernel credentials are unavailable; the manual acceptance workflow includes the package.Known deferred concerns
The
kernel_deploymentresource remains blocked on tagged source provenance, authoritative deletion/read-after-delete semantics, complete durable app/version readback, and accepted write-only environment/token state behavior. SDK source provenance remains deferred until a tagged release contains it.Issues
Does not resolve a GitHub issue.
Note
Low Risk
Read-only data source with no lifecycle mutations; sensitive values are excluded from state by design.
Overview
Adds a read-only
kernel_deploymentdata source so Terraform can inspect durable deployment metadata via a direct SDK GET, without create/delete, logs, or event streams.Read path maps region, status (inspection-only), entrypoint, timestamps, and sorted
env_var_keysonly—never env values, source, or app metadata.project_idfollows the same explicit → provider default → API-key binding resolution as other lookups.kernelclientgainsGetDeploymentonly; lifecycle/event SDK methods stay unexposed.Provider registration, generated docs, the lookups example (deployment ID from
kernel_app), acceptance matrix + workflow job, and unit/acceptance tests complete the surface. Thekernel_deploymentresource remains deferred.Reviewed by Cursor Bugbot for commit 190705e. Bugbot is set up for automated code reviews on this repo. Configure here.