Conversation
…#30) The admin-removal / CLI-recreate flow changes the user's sub, so sub-keyed ownership rows (reports, chat threads) do not follow the recreated identity; prefer admin-disable-user on stacks holding real user data.
* docs: state rm, not disable, preserves the TF-managed admin from the planned destroy admin-disable-user cannot stop a planned Terraform destroy — the correct preservation mechanism is 'terraform state rm aws_cognito_user.admin' before the first post-merge apply; disable remains the revocation tool for manually-provisioned users. * fix: address review feedback — -chdir on the state rm command (copy-paste-ready)
#32) The self-hosted runner image ships no terraform binary — every job that reaches a real terraform invocation died with 'terraform: command not found' (exit 127); earlier green Plan runs had merely skipped on missing stack secrets. terraform_wrapper: false keeps 'terraform output -raw' captures clean.
The ci-build role is ECR-push-only by design and has no S3 tfstate access —
the build job's 'terraform init' for a single 'terraform output' died with a
403 on HeadObject. The web ECR repository is deterministically
"${project}-web" (ecr.tf), so the job now reads 'project' from the stack's
tfvars blob and joins it with the ECR login action's registry output; no
backend.hcl, no terraform, no state read in the build job at all (the deploy
job, under the deployer role, still reads outputs as before).
…#34) Build was push-only, so a stack whose web-<sha> image was never built (or was lost) could only be recovered with a dummy commit. dispatch build=true runs the build job for the dispatched HEAD and the deploy job pins that sha; it is mutually exclusive with image_sha (fail-closed).
…#35) The ci-terraform-plan role is ReadOnlyAccess by design and cannot write the S3 lock object (use_lockfile → <key>.tflock needs s3:PutObject) — the first real branch plan failed 'Error acquiring the state lock' right after its OIDC trust landed. A read-only plan needs no lock; apply (deployer role) still locks. The workflow file joins the push path filter so a workflow change self-tests with a real plan.
#36) * terraform: fresh-VPC bootstrap for the CloudFront VPC-origin SG lookup The singular data.aws_security_group for CloudFront-VPCOrigins-Service-SG hard-failed every plan on a brand-new VPC ('no matching EC2 Security Group found'): that managed SG only appears once the FIRST VPC origin in the VPC exists — this stack's own, which needs this very ALB. The live env never hit it because it reused a VPC that already had another stack's VPC origin. Plural lookup (empty list instead of error) + ALB ingress that falls back to the VPC CIDR only while the SG is absent; the next plan after the VPC origin exists tightens the rule in place. A check block surfaces bootstrap mode as a plan warning. * fix: address review feedback — no CIDR fallback while the CF SG is absent The bootstrap VPC-CIDR ingress served no CloudFront traffic (VPC-origin ENIs match the managed SG, not CIDR) and only opened an unauthenticated in-VPC path that nothing would auto-close. While the managed SG is absent the ALB now has no 443 ingress at all; the second apply adds the managed-SG rule. * fix: address review feedback — data-source comment matches the no-fallback behavior
🤖 AI Code Review (Claude Fable 5 chair · lens×model matrix)_Cells (model/lens): codex/L2 codex/L3 codex/L4 codex/L5 _ Status: BLOCKED — CRITICAL/MAJOR issues must be resolved before merge 🛑 Forced FAIL due to coverage collapse: at most one vendor survived, so cross-verification across the lens x model matrix cannot happen — fail-closed regardless of the chair's judgment. All verification is complete — no dangling references to the removed singular data source, the deploy job's fail-safe PR #37 — Chair Review: runner tooling, stateless build job, dispatch build,
|
Promotes #30–#36: sub-ownership docs, setup-terraform, build job derives the ECR URI without state, deploy-web dispatch
buildinput, read-only plan with-lock=false+ terraform.yml self-trigger, and the fresh-VPC CloudFront-SG bootstrap fix.🤖 Generated with Claude Code