Repository navigation
feat(infra): prod deploy identity — CI role, EKS access entry, /app EFS access point (#929) - #930
Merged
Merged
Conversation
…FS access point (#929)
Contributor
terraform plan
Warning This plan DESTROYS resources in: core. Merging applies it unattended. core — 0 to add, 0 to change, 2 to DESTROYdata.aws_iam_policy_document.ci_tf_apply_no_prod_state: Reading...
data.aws_iam_policy_document.ci_tf_apply_no_prod_state: Read complete after 0s [id=2395007408]
data.aws_iam_policy_document.obs_pod_trust: Reading...
module.identity_center.data.aws_ssoadmin_instances.this: Reading...
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.ci_tf_plan_state: Reading...
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.ci_tf_plan_state: Read complete after 0s [id=2883378100]
data.aws_iam_policy_document.ci_tf_drift_refresh: Reading...
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.ci_tf_drift_refresh: Read complete after 0s [id=2350222434]
data.aws_iam_policy_document.cur_delivery: Reading...
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.cur_delivery: Read complete after 0s [id=2207400467]
data.aws_iam_policy_document.sccache_write: Reading...
data.aws_iam_policy_document.sccache_read: Reading...
data.aws_iam_policy_document.config_bucket: Reading...
data.aws_iam_policy_document.sccache_read: Read complete after 0s [id=2701062528]
data.aws_iam_policy_document.sccache_write: Read complete after 0s [id=786296009]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.sccache_trust_read: Reading...
data.aws_iam_policy_document.config_bucket: Read complete after 0s [id=4067691321]
data.aws_iam_policy_document.ci_tf_plan_trust: Reading...
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2662704728]
data.aws_iam_policy_document.ci_tf_plan_trust: Read complete after 0s [id=1630650595]
data.aws_iam_policy_document.sccache_trust_write: Reading...
data.aws_iam_policy_document.sccache_trust_read: Read complete after 0s [id=1630650595]
data.aws_iam_policy_document.sccache_trust_write: Read complete after 0s [id=4060172364]
data.aws_iam_policy_document.audit_bucket: Reading...
data.aws_iam_policy_document.ci_tf_apply_trust: Reading...
data.aws_iam_policy_document.audit_bucket: Read complete after 0s [id=3031279952]
data.aws_iam_policy_document.ci_tf_apply_trust: Read complete after 0s [id=2538345208]
data.aws_iam_policy_document.ci_tf_drift_trust: Reading...
data.aws_iam_policy_document.ci_tf_drift_trust: Read complete after 0s [id=2357770959]
module.github_oidc.data.aws_iam_policy_document.push: Reading...
module.github_oidc.data.aws_iam_policy_document.push: Read complete after 0s [id=2177873069]
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 — 5 to add, 0 to changedata.aws_rds_engine_version.aurora_pg: Reading...
module.network.data.aws_availability_zones.available: Reading...
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.cluster_trust: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
module.network.data.aws_region.current: 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.pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.efs_csi_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_openid_connect_provider.github: Reading...
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_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=3734071059]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_rds_engine_version.aurora_pg: Read complete after 1s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 1s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 0s [id=3634844169]
data.aws_iam_openid_connect_provider.github: Read complete after 1s [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 0s [id=4060172364]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_efs_access_point.app will be created
+ resource "aws_efs_access_point" "app" {
+ arn = (known after apply)
+ file_system_arn = (known after apply)
+ file_system_id = "fs-05ee4143366be7722"
+ id = (known after apply)
+ owner_id = (known after apply)
+ region = "us-east-2"
+ tags = {
+ "Name" = "er-prod-config-app"
}
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Name" = "er-prod-config-app"
+ "Project" = "entity-resolution"
}
+ posix_user {
+ gid = 1001
+ uid = 1001
}
+ root_directory {
+ path = "/app"
+ creation_info {
+ owner_gid = 1001
+ owner_uid = 1001
+ permissions = "0750"
}
}
}
# aws_iam_role.ci_deploy_prod will be created
+ resource "aws_iam_role" "ci_deploy_prod" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRoleWithWebIdentity"
+ Condition = {
+ StringEquals = {
+ "token.actions.githubusercontent.com:aud" = "sts.amazonaws.com"
+ "token.actions.githubusercontent.com:sub" = "repo:athvin@273880343/entity-resolution-engine@1334344510:ref:refs/heads/main"
}
}
+ Effect = "Allow"
+ Principal = {
+ Federated = "arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.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-ci-deploy-prod"
+ 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.ci_deploy_prod will be created
+ resource "aws_iam_role_policy" "ci_deploy_prod" {
+ id = (known after apply)
+ name = "deploy-prod"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "eks:DescribeCluster"
+ Effect = "Allow"
+ Resource = "arn:aws:eks:us-east-2:797781631727:cluster/er-prod"
},
+ {
+ Action = [
+ "elasticfilesystem:DescribeFileSystems",
+ "elasticfilesystem:DescribeAccessPoints",
]
+ Effect = "Allow"
+ Resource = "*"
},
+ {
+ Action = [
+ "secretsmanager:GetSecretValue",
+ "secretsmanager:DescribeSecret",
]
+ Effect = "Allow"
+ Resource = "arn:aws:secretsmanager:us-east-2:797781631727:secret:er/prod/app/*"
},
+ {
+ Action = [
+ "ecr:ListImages",
+ "ecr:GetAuthorizationToken",
+ "ecr:DescribeImages",
+ "ecr:BatchGetImage",
]
+ Effect = "Allow"
+ Resource = "*"
},
+ {
+ Action = "elasticloadbalancing:DescribeTargetGroups"
+ Effect = "Allow"
+ Resource = "*"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.eks.aws_eks_access_entry.admin["ci_deploy"] will be created
+ resource "aws_eks_access_entry" "admin" {
+ access_entry_arn = (known after apply)
+ cluster_name = "er-prod"
+ created_at = (known after apply)
+ id = (known after apply)
+ kubernetes_groups = (known after apply)
+ modified_at = (known after apply)
+ principal_arn = (known after apply)
+ region = "us-east-2"
+ tags_all = {
+ "Environment" = "prod"
+ "ManagedBy" = "terraform"
+ "Project" = "entity-resolution"
}
+ type = "STANDARD"
+ user_name = (known after apply)
}
# module.eks.aws_eks_access_policy_association.admin["ci_deploy"] will be created
+ resource "aws_eks_access_policy_association" "admin" {
+ associated_at = (known after apply)
+ cluster_name = "er-prod"
+ id = (known after apply)
+ modified_at = (known after apply)
+ policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
+ principal_arn = (known after apply)
+ region = "us-east-2"
+ access_scope {
+ type = "cluster"
}
}
Plan: 5 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ app_efs_access_point_id = (known after apply)
+ ci_deploy_prod_role_arn = (known after apply)
|
13 tasks done
This was referenced Nov 8, 2026
athvin
marked this pull request as ready for review
November 8, 2026 22:43
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.
Closes #929
What
The Terraform half of #556's prod deploy path:
er-ci-deploy-prod(GitHub OIDC,main-pinned trust;eks:DescribeCluster, read-onlyer/prod/app/*secrets, ECR digest reads, EFS + ELBv2 describes for discovery), its EKS access entry oner-prod, and the/appEFS access point nothing created until now.Why
The role must exist in the account before any workflow assumes it — dev set that precedent (role applied first, first rollout via
workflow_dispatch). Merging role and deploy leg together would race on merge and put reddeployruns onmain. Verified live: prod EFSfs-05ee4143366be7722has zero access points.Proof
bash scripts/ci/tf-validate-all.sh— all stacks valid (Terraform 1.11.4);terraform fmt -checkclean;bash scripts/ci/tf-static-credentials-check.shclean.Risk & rollback
Risk: the access entry grants the CI role cluster-admin on er-prod — bounded by the
main-only OIDC trust; mirrors dev. Rollback:git revert, merge — CI applies the removal.Post-merge ledger
Closed by: agent · codex session on
Athvins-MacBook-Pro· 2026-11-08T23:15:00Zmainis green with this change on it — merge SHAff5b416a; rust run 42531622702 completed/success, frontend + devcontainer success on the same SHAimagescorrectly never ran — terraform-only diff, no image inputs changed (no images run exists for ff5b416)deploy— n/a; no images run means no deploy trigger for this SHA. The deploy path itself was proven the same day on b5f2cba (both legs green, run 42532909229)infraapply (prod) on ff5b416: success, and the created objects verified live: roleer-ci-deploy-prodpresent, EKS access entry on er-prod present, access pointfsap-05ba9d7f29cf2773eat/apponfs-05ee4143366be7722.drift/kindare scheduled, unchanged by this diffCloses #929; board automation moves the cardscripts/cluster_objects.sh(pinned 2.12.0) via ci(cluster): apply infra/k8s cluster objects from CI, one code path with make (#927) #931, which is where the next session will find itSpecific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files