Parent
Sub-issue 3 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-template → targets feat/bootstrap-policies
Estimated review time: ~30 min
Summary
Generate a custom CDK bootstrap CloudFormation template that replaces AdministratorAccess with the three IaCRole-ABCA policies, and adds version/hash outputs for preflight validation.
Deliverables
Key design decisions
- Template is generated (not hand-edited) so it stays in sync with policy source code
- Uses CF pseudo-parameters (
AWS::AccountId, AWS::Region) for account/region — no hardcoding
- Managed policies are created inline in the template (not referencing external ARNs) — eliminates the "create policies first, then bootstrap" two-step
- Qualifier remains
hnb659fds (CDK default) for compatibility with existing deployments
Acceptance criteria
mise //cdk:bootstrap:generate produces a valid CF template
- Template passes
cfn-lint validation (if available)
- Existing
mise //cdk:synth and mise //cdk:test still pass (no regression)
- An operator can bootstrap a fresh account with a single command:
mise //cdk:bootstrap
Parent
Sub-issue 3 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-template→ targetsfeat/bootstrap-policiesEstimated review time: ~30 min
Summary
Generate a custom CDK bootstrap CloudFormation template that replaces
AdministratorAccesswith the three IaCRole-ABCA policies, and adds version/hash outputs for preflight validation.Deliverables
cdk/src/bootstrap/bootstrap-template.ts— programmatically generates the custom CF template:AdministratorAccesson the CloudFormation execution role with the three managed policiesBootstrapPolicyVersion,BootstrapPolicyHashcdk/test/bootstrap/bootstrap-template.test.ts:BootstrapPolicyVersionandBootstrapPolicyHashoutputs are presentcdk/bootstrap/bootstrap-template.yaml— the operator-consumable artifactmise //cdk:bootstrap:generatetask incdk/mise.toml— regenerates allcdk/bootstrap/artifactsmise //cdk:bootstraptask — wrapscdk bootstrap --template cdk/bootstrap/bootstrap-template.yamlKey design decisions
AWS::AccountId,AWS::Region) for account/region — no hardcodinghnb659fds(CDK default) for compatibility with existing deploymentsAcceptance criteria
mise //cdk:bootstrap:generateproduces a valid CF templatecfn-lintvalidation (if available)mise //cdk:synthandmise //cdk:teststill pass (no regression)mise //cdk:bootstrap