Skip to content

feat(infra): prod SES identity and observability substrate - #945

Merged
athvin merged 2 commits into
mainfrom
issue/939-prod-ses-obs
Nov 9, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/939-prod-ses-obs

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #939

What

envs/prod/ses.tf and envs/prod/observability.tf, mirroring dev with two deliberate subtractions. SES: apex identity via var.edge_domain, three DKIM CNAMEs + MAIL FROM MX/SPF as cloudflare_dns_record, the configuration set, and the first policy ever on er-prod-api-pod. Observability: /er/prod/containers (INFREQUENT_ACCESS at creation — no destroy trade) + /er/prod/metrics, fluent-bit and otel-collector Pod Identity roles. No openobserve association or secret.

Why

Prod serves traffic but cannot send mail — invites and password resets degrade to the link-in-response fallback — and has no telemetry substrate. The span store is subtracted because its metadata DSN names the dev Aurora and prod's VPC has no route there; that topology decision is #944. The values-prod.yaml backend flip is #943, gated on the SES production-access grant (#939's owner action): a sandbox MessageRejected would lose the link fallback the log backend currently preserves. Also refreshes two comments that this change makes stale: pod_identity.tf's "carries NO policy yet" and deploy.yml's prod obs skip.

Proof

tf-validate-all.sh — all five stacks Success (terraform 1.11.4); terraform fmt -check -recursive clean; tf-static-credentials-check.sh clean; workflow-shell-check.sh and scripts-home-check.sh clean. The PR's prod plan tier exercises the credential-free-Cloudflare property this file relies on (resources only, no data sources — edge.tf's established pattern).

Risk & rollback

Risk: low — every construct here is one edge.tf/dev already runs; nothing running references these resources yet. Rollback: git revert <merge-sha>; the apply only ever adds.

Post-merge ledger

Closed by: agent · codex session on Athvins-MacBook-Pro · 2026-11-09T01:35:00Z

  • main is green with this change on it — merge f7491ab4; rust run 42543893672 success, frontend 42543893740 success, devcontainer 42543893678 success, infra 42543893680 success, images 42543893710 success, deploy 42543912149 success.
  • images ran (the deploy.yml comment is on one of its push paths) with both build legs correctly skipped — no image inputs changed. Run 42543893710.
  • deploy converged — run 42543912149 success, prod leg included; the running process's own line: GET /api/healthz → {"ready":true,"upstream":"ok"} at 01:14Z.
  • the push-only surface no pull request can pre-test — infra run 42543893680: apply (core), (dev), (prod) all success; the prod apply created exactly the 17 resources the plan promised, 0 destroys. Last scheduled drift run 42453080846 green.
  • the board card — Prod SES + observability: envs/prod has neither — invites and password resets drop silently #939 closed by the merge at 01:07:56Z via the body's Closes.
  • follow-ups are open for everything deferred here — Flip prod mail backend to SES in values-prod.yaml — gated on the production-access grant #943 (values-prod.yaml SES flip, gated on the production-access grant) and Prod observability install: span-store topology decision + prod shipper values #944 (span-store topology + prod shipper values + obs_up.sh prod step).
  • what was learned is written down — the aws-footprint reference is generated from a count of aws_* resources, so any infra PR that adds resources owes a skills-check.sh regen commit; the drift gate caught the omission here and the fix landed as 6c26a9b1. Nothing beyond what the gate already enforces.

Specific to this change

  • terraform prod apply ran green with 0 destroys — run 42543893680, apply (prod) success; 17 added matching the plan comment exactly (ses module x3, 5 DNS records, mail policy, 2 log groups, 2 roles, 2 policies, 2 associations).
  • post-apply acceptance — aws sesv2 get-email-identity --email-identity dupezero.com: VerifiedForSendingStatus true, DKIM SUCCESS (3 tokens), MAIL FROM mail.dupezero.com status SUCCESS (the Cloudflare records resolved within minutes of the apply). /er/prod/containers INFREQUENT_ACCESS 30d and /er/prod/metrics STANDARD 30d both exist. Pod Identity associations for fluent-bit and otel-collector in observability are live. er-prod-api-pod carries send-transactional-mail with statements [SendTransactionalMail, UseTheConfigurationSet].
Context — plan, discoveries, measurements, files

Plan

  1. Mirror envs/dev/ses.tf as always-on (no opt-in — prod's plan tier is credential-free by edge.tf's design).
  2. Mirror envs/dev/observability.tf minus the openobserve half.
  3. Refresh the two comments this makes stale; leave the install and the backend flip to Prod observability install: span-store topology decision + prod shipper values #944/Flip prod mail backend to SES in values-prod.yaml — gated on the production-access grant #943.
  4. Watch the terraform prod apply on merge; run the acceptance probes.

Discoveries

Measurements

  • bash scripts/ci/tf-validate-all.sh → 5 x Success.
  • Live state before this change: apex 200, /api/healthz {"ready":true}, nodepools app/runner-l/runner-sm/system all Ready.

Files

  • infra/terraform/envs/prod/ses.tf — new: identity, 5 DNS records, send policy, 2 outputs.
  • infra/terraform/envs/prod/observability.tf — new: 2 log groups, 2 roles + policies + associations.
  • infra/terraform/envs/prod/pod_identity.tf — comment: the role now carries its first policy.
  • .github/workflows/deploy.yml — comment: the prod obs skip now names Prod observability install: span-store topology decision + prod shipper values #944.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

terraform plan

922b9c5 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 2
dev 0 0 0
prod 17 0 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.

Warning

This plan DESTROYS resources in: core. Merging applies it unattended.
The apply refuses to run unless the merge commit message carries
ALLOW-DESTROY. Retitling is not enough on a single-commit PR — GitHub
uses the commit message there, not the title. Merge with
gh pr merge <n> --squash --subject '<subject> ALLOW-DESTROY'.

core — 0 to add, 0 to change, 2 to DESTROY
data.aws_iam_policy_document.ci_tf_drift_refresh: Reading...
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.ci_tf_drift_refresh: Read complete after 0s [id=2350222434]
module.identity_center.data.aws_ssoadmin_instances.this: Reading...
data.aws_iam_policy_document.ci_tf_apply_no_prod_state: Reading...
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.ci_tf_apply_no_prod_state: Read complete after 0s [id=2395007408]
data.aws_iam_policy_document.ci_tf_plan_state: Reading...
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.ci_tf_plan_state: Read complete after 0s [id=2883378100]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2662704728]
data.aws_iam_policy_document.sccache_read: Reading...
data.aws_iam_policy_document.sccache_write: Reading...
data.aws_iam_policy_document.sccache_write: Read complete after 0s [id=786296009]
data.aws_iam_policy_document.sccache_read: Read complete after 0s [id=2701062528]
module.github_oidc.data.aws_iam_policy_document.trust: Reading...
module.github_oidc.data.aws_iam_policy_document.trust: Read complete after 0s [id=4060172364]
data.aws_iam_policy_document.cur_delivery: Reading...
data.aws_iam_policy_document.cur_delivery: Read complete after 0s [id=2207400467]
data.aws_iam_policy_document.audit_bucket: Reading...
data.aws_iam_policy_document.config_bucket: Reading...
data.aws_iam_policy_document.audit_bucket: Read complete after 0s [id=3031279952]
data.aws_iam_policy_document.config_bucket: Read complete after 0s [id=4067691321]
data.aws_iam_policy_document.ci_tf_apply_trust: Reading...
data.aws_iam_policy_document.sccache_trust_write: Reading...
module.github_oidc.data.aws_iam_policy_document.push: Reading...
data.aws_iam_policy_document.sccache_trust_write: Read complete after 0s [id=4060172364]
data.aws_iam_policy_document.ci_tf_plan_trust: Reading...
module.github_oidc.data.aws_iam_policy_document.push: Read complete after 0s [id=2177873069]
data.aws_iam_policy_document.ci_tf_drift_trust: Reading...
data.aws_iam_policy_document.sccache_trust_read: Reading...
data.aws_iam_policy_document.ci_tf_plan_trust: Read complete after 0s [id=1630650595]
data.aws_iam_policy_document.ci_tf_drift_trust: Read complete after 0s [id=2357770959]
data.aws_iam_policy_document.sccache_trust_read: Read complete after 0s [id=1630650595]
data.aws_iam_policy_document.ci_tf_apply_trust: Read complete after 0s [id=2538345208]
data.aws_iam_policy_document.ci_tf_apply_prod_trust: Reading...
data.aws_iam_policy_document.ci_tf_apply_prod_trust: Read complete after 0s [id=3513372776]
module.identity_center.data.aws_ssoadmin_instances.this: Read complete after 0s [id=us-east-2]
module.identity_center.data.aws_identitystore_user.admin: Reading...
module.identity_center.data.aws_identitystore_user.admin: Read complete after 0s [id=b17b2500-e0b1-7046-405b-23c088cf392b]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # cloudflare_r2_bucket.sccache[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "cloudflare_r2_bucket" "sccache" {
      - account_id    = "9eefbe6bc92d11b2bb4e962494765a4c" -> null
      - creation_date = "2026-11-08T20:59:18.644Z" -> null
      - id            = "er-ci-sccache" -> null
      - jurisdiction  = "default" -> null
      - location      = "ENAM" -> null
      - name          = "er-ci-sccache" -> null
      - storage_class = "Standard" -> null
    }

  # cloudflare_r2_bucket_lifecycle.sccache[0] will be destroyed
  # (because index [0] is out of range for count)
  - resource "cloudflare_r2_bucket_lifecycle" "sccache" {
      - account_id   = "9eefbe6bc92d11b2bb4e962494765a4c" -> null
      - bucket_name  = "er-ci-sccache" -> null
      - jurisdiction = "default" -> null
      - rules        = [
          - {
              - abort_multipart_uploads_transition = {
                  - condition = {
                      - max_age = 86400 -> null
                      - type    = "Age" -> null
                    } -> null
                } -> null
              - conditions                         = {
                    # (1 unchanged attribute hidden)
                } -> null
              - delete_objects_transition          = {
                  - condition = {
                      - max_age = 1209600 -> null
                      - type    = "Age" -> null
                    } -> null
                } -> null
              - enabled                            = true -> null
              - id                                 = "expire-cache-objects" -> null
            },
        ] -> null
    }

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

Changes to Outputs:
  - r2_sccache_bucket         = "er-ci-sccache" -> null
  - r2_sccache_endpoint       = "https://9eefbe6bc92d11b2bb4e962494765a4c.r2.cloudflarestorage.com" -> null

Warning: Resource Destruction Considerations

  with cloudflare_r2_bucket_lifecycle.sccache[0],
  on r2.tf line 96, in resource "cloudflare_r2_bucket_lifecycle" "sccache":
  96: resource "cloudflare_r2_bucket_lifecycle" "sccache" {

Applying this resource destruction will remove the resource from the
Terraform state but will not change it in the API. If you would like to
destroy or reset this resource in the API, refer to the documentation for how
to do it manually.
prod — 17 to add, 0 to change
module.eks.data.aws_iam_policy_document.node_trust: Reading...
data.aws_iam_policy_document.pod_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
module.ses.data.aws_region.current: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
module.network.data.aws_region.current: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
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]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=3734071059]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
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.ci_deploy_prod_trust: Reading...
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 0s [id=4060172364]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=3634844169]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
 <= read (data resources)

Terraform will perform the following actions:

  # data.aws_iam_policy_document.fluent_bit will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "fluent_bit" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "logs:CreateLogStream",
              + "logs:DescribeLogStreams",
              + "logs:PutLogEvents",
            ]
          + effect    = "Allow"
          + resources = [
              + (known after apply),
              + (known after apply),
            ]
          + sid       = "ShipContainerLogs"
        }
    }

  # data.aws_iam_policy_document.otel_collector will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "otel_collector" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "logs:CreateLogGroup",
              + "logs:CreateLogStream",
              + "logs:DescribeLogStreams",
              + "logs:PutLogEvents",
              + "logs:PutRetentionPolicy",
            ]
          + effect    = "Allow"
          + resources = [
              + (known after apply),
              + (known after apply),
            ]
          + sid       = "EmfMetricEvents"
        }
      + statement {
          + actions   = [
              + "xray:GetSamplingRules",
              + "xray:GetSamplingStatisticSummaries",
              + "xray:GetSamplingTargets",
              + "xray:PutTelemetryRecords",
              + "xray:PutTraceSegments",
            ]
          + effect    = "Allow"
          + resources = [
              + "*",
            ]
          + sid       = "XrayTraces"
        }
      + statement {
          + actions   = [
              + "cloudwatch:PutMetricData",
            ]
          + effect    = "Allow"
          + resources = [
              + "*",
            ]
          + sid       = "PutMetricDataErProd"

          + condition {
              + test     = "StringEquals"
              + values   = [
                  + "ER/Prod",
                ]
              + variable = "cloudwatch:namespace"
            }
        }
    }

  # aws_cloudwatch_log_group.containers will be created
  + resource "aws_cloudwatch_log_group" "containers" {
      + arn                         = (known after apply)
      + deletion_protection_enabled = (known after apply)
      + id                          = (known after apply)
      + log_group_class             = "INFREQUENT_ACCESS"
      + name                        = "/er/prod/containers"
      + name_prefix                 = (known after apply)
      + region                      = "us-east-2"
      + retention_in_days           = 30
      + skip_destroy                = false
      + tags_all                    = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
    }

  # aws_cloudwatch_log_group.metrics will be created
  + resource "aws_cloudwatch_log_group" "metrics" {
      + arn                         = (known after apply)
      + deletion_protection_enabled = (known after apply)
      + id                          = (known after apply)
      + log_group_class             = (known after apply)
      + name                        = "/er/prod/metrics"
      + name_prefix                 = (known after apply)
      + region                      = "us-east-2"
      + retention_in_days           = 30
      + skip_destroy                = false
      + tags_all                    = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
    }

  # aws_eks_pod_identity_association.fluent_bit will be created
  + resource "aws_eks_pod_identity_association" "fluent_bit" {
      + association_arn      = (known after apply)
      + association_id       = (known after apply)
      + cluster_name         = "er-prod"
      + disable_session_tags = false
      + external_id          = (known after apply)
      + id                   = (known after apply)
      + namespace            = "observability"
      + region               = "us-east-2"
      + role_arn             = (known after apply)
      + service_account      = "fluent-bit"
      + tags_all             = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
    }

  # aws_eks_pod_identity_association.otel_collector will be created
  + resource "aws_eks_pod_identity_association" "otel_collector" {
      + association_arn      = (known after apply)
      + association_id       = (known after apply)
      + cluster_name         = "er-prod"
      + disable_session_tags = false
      + external_id          = (known after apply)
      + id                   = (known after apply)
      + namespace            = "observability"
      + region               = "us-east-2"
      + role_arn             = (known after apply)
      + service_account      = "otel-collector"
      + tags_all             = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
    }

  # aws_iam_role.fluent_bit will be created
  + resource "aws_iam_role" "fluent_bit" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = [
                          + "sts:TagSession",
                          + "sts:AssumeRole",
                        ]
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "pods.eks.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "er-prod-fluent-bit"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
      + unique_id             = (known after apply)

      + inline_policy (known after apply)
    }

  # aws_iam_role.otel_collector will be created
  + resource "aws_iam_role" "otel_collector" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = [
                          + "sts:TagSession",
                          + "sts:AssumeRole",
                        ]
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "pods.eks.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "er-prod-otel-collector"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
      + unique_id             = (known after apply)

      + inline_policy (known after apply)
    }

  # aws_iam_role_policy.fluent_bit will be created
  + resource "aws_iam_role_policy" "fluent_bit" {
      + id          = (known after apply)
      + name        = "ship-container-logs"
      + name_prefix = (known after apply)
      + policy      = (known after apply)
      + role        = (known after apply)
    }

  # aws_iam_role_policy.mail will be created
  + resource "aws_iam_role_policy" "mail" {
      + id          = (known after apply)
      + name        = "send-transactional-mail"
      + name_prefix = (known after apply)
      + policy      = (known after apply)
      + role        = "er-prod-api-pod"
    }

  # aws_iam_role_policy.otel_collector will be created
  + resource "aws_iam_role_policy" "otel_collector" {
      + id          = (known after apply)
      + name        = "export-metrics-traces"
      + name_prefix = (known after apply)
      + policy      = (known after apply)
      + role        = (known after apply)
    }

  # cloudflare_dns_record.ses_dkim[0] will be created
  + resource "cloudflare_dns_record" "ses_dkim" {
      + content                 = (known after apply)
      + created_on              = (known after apply)
      + id                      = (known after apply)
      + include_shadow_metadata = false
      + meta                    = (known after apply)
      + modified_on             = (known after apply)
      + name                    = (known after apply)
      + proxiable               = (known after apply)
      + proxied                 = false
      + settings                = (known after apply)
      + tags                    = (known after apply)
      + tags_modified_on        = (known after apply)
      + ttl                     = 600
      + type                    = "CNAME"
      + zone_id                 = "2f036e2791d0b695a23145e5f4ae1fb7"
    }

  # cloudflare_dns_record.ses_dkim[1] will be created
  + resource "cloudflare_dns_record" "ses_dkim" {
      + content                 = (known after apply)
      + created_on              = (known after apply)
      + id                      = (known after apply)
      + include_shadow_metadata = false
      + meta                    = (known after apply)
      + modified_on             = (known after apply)
      + name                    = (known after apply)
      + proxiable               = (known after apply)
      + proxied                 = false
      + settings                = (known after apply)
      + tags                    = (known after apply)
      + tags_modified_on        = (known after apply)
      + ttl                     = 600
      + type                    = "CNAME"
      + zone_id                 = "2f036e2791d0b695a23145e5f4ae1fb7"
    }

  # cloudflare_dns_record.ses_dkim[2] will be created
  + resource "cloudflare_dns_record" "ses_dkim" {
      + content                 = (known after apply)
      + created_on              = (known after apply)
      + id                      = (known after apply)
      + include_shadow_metadata = false
      + meta                    = (known after apply)
      + modified_on             = (known after apply)
      + name                    = (known after apply)
      + proxiable               = (known after apply)
      + proxied                 = false
      + settings                = (known after apply)
      + tags                    = (known after apply)
      + tags_modified_on        = (known after apply)
      + ttl                     = 600
      + type                    = "CNAME"
      + zone_id                 = "2f036e2791d0b695a23145e5f4ae1fb7"
    }

  # cloudflare_dns_record.ses_mail_from_mx will be created
  + resource "cloudflare_dns_record" "ses_mail_from_mx" {
      + content                 = "feedback-smtp.us-east-2.amazonses.com"
      + created_on              = (known after apply)
      + id                      = (known after apply)
      + include_shadow_metadata = false
      + meta                    = (known after apply)
      + modified_on             = (known after apply)
      + name                    = "mail.dupezero.com"
      + priority                = 10
      + proxiable               = (known after apply)
      + proxied                 = false
      + settings                = (known after apply)
      + tags                    = (known after apply)
      + tags_modified_on        = (known after apply)
      + ttl                     = 600
      + type                    = "MX"
      + zone_id                 = "2f036e2791d0b695a23145e5f4ae1fb7"
    }

  # cloudflare_dns_record.ses_mail_from_spf will be created
  + resource "cloudflare_dns_record" "ses_mail_from_spf" {
      + content                 = "v=spf1 include:amazonses.com ~all"
      + created_on              = (known after apply)
      + id                      = (known after apply)
      + include_shadow_metadata = false
      + meta                    = (known after apply)
      + modified_on             = (known after apply)
      + name                    = "mail.dupezero.com"
      + proxiable               = (known after apply)
      + proxied                 = false
      + settings                = (known after apply)
      + tags                    = (known after apply)
      + tags_modified_on        = (known after apply)
      + ttl                     = 600
      + type                    = "TXT"
      + zone_id                 = "2f036e2791d0b695a23145e5f4ae1fb7"
    }

  # module.ses.data.aws_iam_policy_document.send will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "send" {
      + id            = (known after apply)
      + json          = (known after apply)
      + minified_json = (known after apply)

      + statement {
          + actions   = [
              + "ses:SendEmail",
            ]
          + effect    = "Allow"
          + resources = [
              + (known after apply),
            ]
          + sid       = "SendTransactionalMail"

          + condition {
              + test     = "StringLike"
              + values   = [
                  + "*@dupezero.com",
                ]
              + variable = "ses:FromAddress"
            }
        }
      + statement {
          + actions   = [
              + "ses:SendEmail",
            ]
          + effect    = "Allow"
          + resources = [
              + (known after apply),
            ]
          + sid       = "UseTheConfigurationSet"
        }
    }

  # module.ses.aws_sesv2_configuration_set.this will be created
  + resource "aws_sesv2_configuration_set" "this" {
      + arn                    = (known after apply)
      + configuration_set_name = "er-prod"
      + id                     = (known after apply)
      + region                 = "us-east-2"
      + tags_all               = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }

      + delivery_options {
          + tls_policy = "REQUIRE"
        }

      + reputation_options {
          + last_fresh_start           = (known after apply)
          + reputation_metrics_enabled = true
        }

      + sending_options {
          + sending_enabled = true
        }

      + suppression_options {
          + suppressed_reasons = [
              + "BOUNCE",
              + "COMPLAINT",
            ]
        }
    }

  # module.ses.aws_sesv2_email_identity.this will be created
  + resource "aws_sesv2_email_identity" "this" {
      + arn                         = (known after apply)
      + configuration_set_name      = "er-prod"
      + email_identity              = "dupezero.com"
      + id                          = (known after apply)
      + identity_type               = (known after apply)
      + region                      = "us-east-2"
      + tags_all                    = {
          + "Environment" = "prod"
          + "ManagedBy"   = "terraform"
          + "Project"     = "entity-resolution"
        }
      + verification_status         = (known after apply)
      + verified_for_sending_status = (known after apply)

      + dkim_signing_attributes {
          + current_signing_key_length    = (known after apply)
          + last_key_generation_timestamp = (known after apply)
          + next_signing_key_length       = "RSA_2048_BIT"
          + signing_attributes_origin     = (known after apply)
          + status                        = (known after apply)
          + tokens                        = (known after apply)
        }
    }

  # module.ses.aws_sesv2_email_identity_mail_from_attributes.this will be created
  + resource "aws_sesv2_email_identity_mail_from_attributes" "this" {
      + behavior_on_mx_failure = "REJECT_MESSAGE"
      + email_identity         = "dupezero.com"
      + id                     = (known after apply)
      + mail_from_domain       = "mail.dupezero.com"
      + region                 = "us-east-2"
    }

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

Changes to Outputs:
  + ses_configuration_set_name = "er-prod"
  + ses_identity_arn           = (known after apply)

@athvin
athvin marked this pull request as ready for review November 9, 2026 01:07
@athvin
athvin merged commit f7491ab into main Nov 9, 2026
47 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.

Prod SES + observability: envs/prod has neither — invites and password resets drop silently

2 participants