-
Notifications
You must be signed in to change notification settings - Fork 46
feat(bootstrap): resource-action-map for synth-time validation #124
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestinfra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownsecurityCedar/HITL, IAM least-privilege, secrets, PII/DLP, guardrails, supply-chain/CVECedar/HITL, IAM least-privilege, secrets, PII/DLP, guardrails, supply-chain/CVEv1Version 1Version 1
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestinfra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownsecurityCedar/HITL, IAM least-privilege, secrets, PII/DLP, guardrails, supply-chain/CVECedar/HITL, IAM least-privilege, secrets, PII/DLP, guardrails, supply-chain/CVEv1Version 1Version 1
Parent
Sub-issue 4 of #120 (RFC: Least-privilege CDK bootstrap policies as code)
Branch strategy
feat/bootstrap-action-map→ targetsfeat/bootstrap-templateEstimated review time: ~25 min
Summary
Create a mapping from CloudFormation resource types to the IAM actions required to manage them (CRUD lifecycle), scoped to the ~30 resource types used by this app. This map powers the synth-time Aspect (Sub-issue 5) and informs the preflight validator (Sub-issue 6).
Deliverables
cdk/src/bootstrap/preflight/resource-action-map.ts:Record<string, { create: string[], read: string[], update: string[], delete: string[] }>cdk.out/after synth (e.g.,AWS::DynamoDB::Table,AWS::Lambda::Function,AWS::ApiGateway::RestApi,AWS::EC2::VPC,AWS::Cognito::UserPool,AWS::WAFv2::WebACL,AWS::Bedrock::Guardrail, etc.)cdk/src/bootstrap/preflight/index.ts— barrel exportcdk/test/bootstrap/resource-action-map.test.ts:service:ActionName)Key design decisions
Acceptance criteria
mise //cdk:synthfollowed by resource-type extraction shows 100% map coverage of current templatepreflight/andpolicies/