Skip to content

bootstrap: the publish role starts, reads and ends a check of its own images - #128

Merged
aledbf merged 1 commit into
mainfrom
publish-launch-check
Nov 17, 2026
Merged

aledbf merged 1 commit into
mainfrom
publish-launch-check

Conversation

@aledbf

@aledbf aledbf commented Nov 17, 2026

Copy link
Copy Markdown
Member

For spin-stack/ami#148: a release boots each role's AMI once in its region before the images.json pull request is opened, and reads back from EC2 and the serial console what only EC2 can say: UEFI, NitroTPM, IMDSv2 required, and spin-boot taking its credentials from the real IMDS.

The publish role (<repo>-publish) gains a second inline policy, launch-check:

  • ec2:RunInstances for an instance, volume and network interface only with spin-os:check=true requested as a tag; from an image this account owns (ec2:Owner); into the account's subnets and security groups (the default VPC).
  • ec2:CreateTags only as part of RunInstances (ec2:CreateAction).
  • ec2:DescribeInstances.
  • ec2:GetConsoleOutput and ec2:TerminateInstances only on instances tagged spin-os:check=true. The role can't read or end anything it didn't start.
  • No iam:PassRole: the check runs with no instance profile.

This needs an apply of bootstrap in the publishing account before the ami side can use it. The ami change adding the release step waits for that apply, so no release fails on a missing permission.

task lint green. The deprecation warnings in its output are from modules/controlplane/boot_log.tf (#125), fixed separately.

🤖 Generated with Claude Code

… images

spin-stack/ami#148 boots each role's image once on EC2 before its
images.json pull request is opened: UEFI, NitroTPM and IMDSv2 are only
what EC2 says they are. The role may start an instance of this
account's own images, with no instance profile, tagged spin-os:check as
it starts, and read its console and terminate it by that tag only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf force-pushed the publish-launch-check branch from 79ddd32 to 88f6662 Compare November 17, 2026 11:57
@aledbf
aledbf merged commit d66c185 into main Nov 17, 2026
1 check passed
@aledbf
aledbf deleted the publish-launch-check branch November 17, 2026 12:01
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