Add examples/setup-aws.sh: one-command AWS provisioning#3
Merged
Conversation
12 TDD-paced tasks: scaffold + arg parsing + preflight, then one task per AWS resource (OIDC provider, bucket, CORS, bucket policy, IAM role, inline policy), then summary output, doc updates, and a manual smoke test checklist. Tests stub the aws CLI on PATH and assert on recorded argv. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code-review feedback: imports go at module level alongside other imports, not appended below the first test function. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `# --- 3. Bucket CORS ---` and `# --- 4. Bucket policy ---` section headers so readers don't see a confusing 2 → 5 jump in the section numbering. - Drop the dead `oidc_provider_arn` variable; the trust policy uses the deterministic ARN format directly. Comment explains why. - Mention re-running with a different --branch in --help (per spec's "trust policy too narrow" mitigation). - Fix smoke-test step 2 expected-substring to match the actual stderr emitted by the role-update path. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
examples/setup-aws.sh: idempotent, OIDC-only bash script that provisions every AWS resource the dora GitHub Actions S3 variant needs in one command — IAM OIDC provider, S3 bucket (+ Block Public Access, CORS, public-read bucket policy ondora-report.jsononly), and an IAM role with a repo-scoped trust policy plus inline policy grantings3:GetObject/s3:PutObjecton exactly two keys (dora.db,dora-report.json).--existing-bucket NAMEskips bucket creation/CORS/policy and only configures IAM, for teams reusing a shared bucket.--branch NAME(optional, no default) locks the trust policy to a specific ref. Re-running with a new--branchupdates the trust policy in place.examples/workflows/dora-report.ymlandREADME.md§ S3 variant now point at the script. Drops the now-redundant--public-readflag from the documenteddora uploadline — the bucket policy supersedes the per-object ACL.awsCLI on PATH (NUL-delimited argv log, robust to multiline JSON heredocs).shellcheckclean.Spec:
docs/superpowers/specs/2026-04-27-aws-setup-script-design.md. Plan:docs/superpowers/plans/2026-04-27-aws-setup-script.md. Manual smoke-test checklist:docs/superpowers/plans/2026-04-27-aws-setup-script-smoke-test.md.Test plan
tests/test_setup_aws.py+ existing).🤖 Generated with Claude Code