mirror of
https://github.com/Sea-Haven-Industries/procurement-ingest.git
synced 2026-10-07 16:08:54 +00:00
docs(deploy-role): fold in cross-review NITs (DescribeStacks maintenance note, warn-only drift rationale)
This commit is contained in:
parent
c8450458e3
commit
3bbf6247bf
2 changed files with 6 additions and 3 deletions
|
|
@ -10,9 +10,11 @@ stays untouched until decommission as the emergency mgmt deploy path.
|
||||||
| File | Purpose |
|
| File | Purpose |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `trust-policy.json` | OIDC trust: `repo:Sea-Haven-Industries/procurement-ingest:ref:refs/heads/main` only |
|
| `trust-policy.json` | OIDC trust: `repo:Sea-Haven-Industries/procurement-ingest:ref:refs/heads/main` only |
|
||||||
| `permissions-policy.json` | `sts:AssumeRole` on the four `cdk-hnb659fds-*` bootstrap roles, `cloudformation:DescribeStacks` (cd-cdk health check), and `lambda:InvokeFunction` on exactly the two email-processor function ARNs (post-deploy smoke gate) |
|
| `permissions-policy.json` | `sts:AssumeRole` on the four `cdk-hnb659fds-*` bootstrap roles, `cloudformation:DescribeStacks` scoped to this repo's stacks + `CDKToolkit` (cd-cdk health check), and `lambda:InvokeFunction` on exactly the two email-processor function ARNs (post-deploy smoke gate) |
|
||||||
| `create-deploy-role.sh` | Idempotent create-or-update from the two JSON files, profile `seahaven-prod` |
|
| `create-deploy-role.sh` | Idempotent create-or-update from the two JSON files, profile `seahaven-prod` |
|
||||||
|
|
||||||
|
> **Maintenance note:** `DescribeStacks` is scoped to `stack/po-ingest/*`, `stack/WorkorderIngestStack/*`, and `stack/CDKToolkit/*`. If a third stack is ever added to this CDK app, add its ARN pattern here and re-run the review-then-apply flow — otherwise the cd-cdk health check on the new stack will `AccessDenied`.
|
||||||
|
|
||||||
## Why the SmokeInvokeLambda statement exists
|
## Why the SmokeInvokeLambda statement exists
|
||||||
|
|
||||||
`deploy.yaml` runs `scripts/post-deploy-smoke.sh` under the deploy role's own
|
`deploy.yaml` runs `scripts/post-deploy-smoke.sh` under the deploy role's own
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,9 @@ aws --profile "${PROFILE}" iam put-role-policy \
|
||||||
|
|
||||||
# Drift check: this script only reconciles the single inline policy above, so
|
# Drift check: this script only reconciles the single inline policy above, so
|
||||||
# any OTHER inline or attached policy on the role is an unreviewed grant that
|
# any OTHER inline or attached policy on the role is an unreviewed grant that
|
||||||
# diverges the live role from these artifacts. Warn loudly (do not auto-delete
|
# diverges the live role from these artifacts. Warn-only (never auto-delete) is
|
||||||
# -- an operator decides).
|
# deliberate: this is a shared prod-tenant account and an extra policy might be
|
||||||
|
# a legitimate out-of-band grant an operator must adjudicate, not blindly strip.
|
||||||
echo "==> Checking for unexpected policies on the role..."
|
echo "==> Checking for unexpected policies on the role..."
|
||||||
EXTRA_INLINE="$(aws --profile "${PROFILE}" iam list-role-policies \
|
EXTRA_INLINE="$(aws --profile "${PROFILE}" iam list-role-policies \
|
||||||
--role-name "${ROLE_NAME}" --query "PolicyNames[?@!='${POLICY_NAME}']" --output text)"
|
--role-name "${ROLE_NAME}" --query "PolicyNames[?@!='${POLICY_NAME}']" --output text)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue