Skip to content

fix(prod): allow deploy to read ALB target health - #1061

Merged
athvin merged 2 commits into
mainfrom
fix/1043-prod-cutover-health
Nov 9, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/1043-prod-cutover-health

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #1060

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Allow the production deploy role to read ALB target health. This is the Terraform prerequisite for #1043's staged cutover; it grants no AWS mutation.

Why

Proof

Terraform fmt and credential-free production validate pass. Exact-head CI passes; reviewed production plan is 0 add / 1 change / 0 destroy, adding only DescribeTargetHealth to er-ci-deploy-prod. Other stacks report no changes.

Risk & rollback

Post-merge ledger

Closed by: Codex · session 01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-46.lan · 2026-11-09T21:42:32.405488+00:00

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Implementation session 01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-46.lan. Plan: add only DescribeTargetHealth, run Terraform fmt/validate and CI plans, merge, verify applied role before the dependent cutover implementation.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

terraform plan

b8a9d75 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 0 0
prod 0 1 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

prod — 0 to add, 1 to change
module.eks.data.aws_iam_policy_document.node_trust: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.network.data.aws_availability_zones.available: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
module.ses.data.aws_region.current: Reading...
data.aws_caller_identity.current: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
module.network.data.aws_region.current: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.pod_trust: Reading...
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2652188337]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=3960055703]
module.ses.data.aws_iam_policy_document.send: Reading...
module.ses.data.aws_iam_policy_document.send: Read complete after 0s [id=3767633194]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_prod_trust: Reading...
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 1s [id=4060172364]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=2891227359]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # aws_iam_role_policy.ci_deploy_prod will be updated in-place
  ~ resource "aws_iam_role_policy" "ci_deploy_prod" {
        id          = "er-ci-deploy-prod:deploy-prod"
        name        = "deploy-prod"
      ~ policy      = jsonencode(
          ~ {
              ~ Statement = [
                    # (3 unchanged elements hidden)
                    {
                        Action   = [
                            "ecr:ListImages",
                            "ecr:GetAuthorizationToken",
                            "ecr:DescribeImages",
                            "ecr:BatchGetImage",
                        ]
                        Effect   = "Allow"
                        Resource = "*"
                    },
                  ~ {
                      ~ Action   = "elasticloadbalancing:DescribeTargetGroups" -> [
                          + "elasticloadbalancing:DescribeTargetHealth",
                          + "elasticloadbalancing:DescribeTargetGroups",
                        ]
                        # (2 unchanged attributes hidden)
                    },
                ]
                # (1 unchanged attribute hidden)
            }
        )
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

@athvin
athvin marked this pull request as ready for review November 9, 2026 20:12
@athvin
athvin merged commit 3e95a13 into main Nov 9, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow production deploy to verify ALB target health before cutover

2 participants