feat(bootstrap): resource-action-map for synth-time validation#165
Draft
scottschreckengaust wants to merge 9 commits into
Draft
feat(bootstrap): resource-action-map for synth-time validation#165scottschreckengaust wants to merge 9 commits into
scottschreckengaust wants to merge 9 commits into
Conversation
…v1.1.0 Move bedrock-agentcore:* from observability policy into dedicated compute-agentcore policy. Add compute-ecs policy from DEPLOYMENT_ROLES.md. This enables per-compute-variant bootstrap configuration. Closes: part of #123 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…upport Generates a custom CDK bootstrap template that replaces AdministratorAccess with inline least-privilege policies. Supports per-compute-variant selection via ComputeTypes parameter. Adds PolicyVersion/Hash/Set CF outputs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…p command mise //cdk:bootstrap now uses the custom least-privilege template. mise //cdk:bootstrap:generate regenerates all artifacts (policies JSON, template YAML, version/hash files) from source. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI yarn install deduplicates transitive deps (yaml, uuid) which mutates the lockfile if it wasn't committed in deduplicated form. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace comment toggle with proper context gate. ECS resources only synthesize when compute_type=ecs is passed. Default (agentcore) behavior unchanged. Closes #164 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d31fd4d to
d3a9804
Compare
…are policy selection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Maps all CloudFormation resource types used by the ABCA stack to their required IAM actions per lifecycle phase (create/read/update/delete). Actions are sourced from CloudTrail-validated policies in DEPLOYMENT_ROLES.md. Tests validate structure, format, and policy coverage (with known gaps for SQS, S3 bucket lifecycle, and Lambda ESM/Layer actions documented). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Validates that all resource types in the synthesized CloudFormation template have entries in the resource-action-map. Tests agentcore from existing cdk.out and attempts ECS synth gracefully skipping when AWS credentials are unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
Note: this branch currently sits on top of feat/bootstrap-template (#162). When #162 merges to main, I'll retarget and rebase per ADR-001 §8 — the scaffold commit |
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
Closes #124
Closes #164
Creates a mapping from CloudFormation resource types to required IAM actions (CRUD lifecycle), scoped to all resource types in this app's synthesized template. Introduces
getRequiredBootstrapPolicies()for downstream consumption by the Aspect (#125) and preflight validator (#126). Gates ECS construct oncompute_typecontext variable (replaces comment toggle).Stack position
PR 5 for #120 — least-privilege CDK bootstrap policies as code
Prior: Custom template generator + compute variants (PR #162, #123)
This PR: Resource-action-map + ECS context gate + required-policies module
Next: CDK Aspect for policy envelope checking (#125)
Key decisions
Deliverables
Test plan
Open questions
Implementation plan
See: docs/superpowers/plans/2026-05-21-resource-action-map.md
Blocked by: #123 (PR #162)
References: RFC #120, ADR-002
🤖 Generated with Claude Code