Repository navigation
spin_release: a release or channel, its images and the builds its release signed - #2
Merged
Merged
Conversation
…ease signed An installation names a spin release or a channel and nothing else (spin-stack/spin-terraform-aws#130). This reads it from the image catalog and answers each role's images by region, its newest revision, the builds a machine of it may prove it booted, and why a newest build is revoked - believed only as go-tools' catalog verifies it against the release workflow's signatures, or the plan fails. Closes #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #1. Part 3 of spin-stack/spin-terraform-aws#130.
data "spin_release" { version = "edge" | "stable" | "v<YYYYMMDD>.<N>" }reads the image catalog (spin-terraform-aws'scatalogbranch, orcatalog_url's mirror). It answers:release: the release named, or the one the channel names now;images: role → region → AMI, the newest build's;revisions: role → its newest build,r<N>;builds: role → the builds not revoked, oldest first, each withpcr4/pcr7/pcr12and the statement + bundle in base64, which is how the modules hand them to the control plane today;revoked: role → why, when its newest build is revoked.Everything goes through go-tools'
catalog.Verify/VerifyChannelagainstcatalog.Signers()(ami's release/revoke/promote workflows on main, under go-tools' pinned Sigstore root). Anything unsigned, forged, missing or oversized fails the plan; nothing partial is answered.Tests:
internal/resolvewith an httptest catalog (forged PCR, unsigned channel, missing release or channel, a channel naming a missing release, oversized file, upstream errors).internal/providerruns real configurations under OpenTofu (terraform-plugin-testing), and the CI installs OpenTofu so they don't skip. go-tools'mutate: 0 survived.Publishing to registry.terraform.io is yours.
release.yml(GoReleaser on av*tag) needs a GPG key: its private half in theGPG_PRIVATE_KEYandPASSPHRASEsecrets, its public half added to spin-stack's signing keys in the registry, and the org signed in to the registry. Until then, the module can use it through a filesystem mirror ordev_overrides.No licence file: that is your call (open in the licence decision).
🤖 Generated with Claude Code