Repository navigation
feat(infra): bootstrap scoped DuckFleet development CI - #1083
Merged
Merged
Conversation
Contributor
terraform plan
dev — 6 to add, 0 to changedata.aws_iam_policy_document.efs_csi_trust: Reading...
data.aws_caller_identity.current: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.er_api_pod_trust: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_region.current: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_region.current: Read complete after 0s [id=us-east-2]
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.network.data.aws_region.current: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
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=2205495074]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
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_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
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_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_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:
# module.duckfleet_ci.aws_eks_access_entry.ci will be created
+ resource "aws_eks_access_entry" "ci" {
+ access_entry_arn = (known after apply)
+ cluster_name = "er-dev"
+ created_at = (known after apply)
+ id = (known after apply)
+ kubernetes_groups = [
+ "duckfleet:deploy",
]
+ modified_at = (known after apply)
+ principal_arn = (known after apply)
+ region = "us-east-2"
+ tags = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ type = "STANDARD"
+ user_name = (known after apply)
}
# module.duckfleet_ci.aws_eks_pod_identity_association.worker will be created
+ resource "aws_eks_pod_identity_association" "worker" {
+ association_arn = (known after apply)
+ association_id = (known after apply)
+ cluster_name = "er-dev"
+ disable_session_tags = false
+ external_id = (known after apply)
+ id = (known after apply)
+ namespace = "duckfleet-dev"
+ region = "us-east-2"
+ role_arn = (known after apply)
+ service_account = "duckfleet-worker"
+ tags = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
}
# module.duckfleet_ci.aws_iam_role.ci will be created
+ resource "aws_iam_role" "ci" {
+ 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/duck-fleet@1452020329: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 = 7200
+ name = "duckfleet-ci-dev"
+ name_prefix = (known after apply)
+ path = "/"
+ tags = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.duckfleet_ci.aws_iam_role.worker will be created
+ resource "aws_iam_role" "worker" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "sts:AssumeRole",
+ "sts:TagSession",
]
+ Condition = {
+ StringEquals = {
+ "aws:RequestTag/eks-cluster-arn" = "arn:aws:eks:us-east-2:797781631727:cluster/er-dev"
+ "aws:RequestTag/kubernetes-namespace" = "duckfleet-dev"
+ "aws:RequestTag/kubernetes-service-account" = "duckfleet-worker"
}
}
+ 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 = "duckfleet-dev-worker"
+ name_prefix = (known after apply)
+ path = "/"
+ tags = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Project" = "duckfleet"
}
+ unique_id = (known after apply)
+ inline_policy (known after apply)
}
# module.duckfleet_ci.aws_iam_role_policy.ci will be created
+ resource "aws_iam_role_policy" "ci" {
+ id = (known after apply)
+ name = "duckfleet-dev-deploy"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "eks:DescribeCluster",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:eks:us-east-2:797781631727:cluster/er-dev",
]
+ Sid = "DiscoverDev"
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "duckfleet/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-terraform-state-797781631727",
]
+ Sid = "ListOwnState"
},
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-terraform-state-797781631727/duckfleet/dev.tfstate",
+ "arn:aws:s3:::er-terraform-state-797781631727/duckfleet/dev.tfstate.tflock",
]
+ Sid = "OwnState"
},
+ {
+ Action = [
+ "s3:DeleteObject",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::er-terraform-state-797781631727/duckfleet/dev.tfstate.tflock",
]
+ Sid = "ReleaseOwnLock"
},
+ {
+ Action = [
+ "s3:CreateBucket",
+ "s3:ListBucket",
+ "s3:GetBucket*",
+ "s3:GetEncryptionConfiguration",
+ "s3:GetLifecycleConfiguration",
+ "s3:GetReplicationConfiguration",
+ "s3:GetAccelerateConfiguration",
+ "s3:GetObjectLockConfiguration",
+ "s3:PutBucketTagging",
+ "s3:PutBucketPublicAccessBlock",
+ "s3:PutBucketOwnershipControls",
+ "s3:PutEncryptionConfiguration",
+ "s3:PutBucketVersioning",
+ "s3:PutBucketPolicy",
+ "s3:PutLifecycleConfiguration",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::duckfleet-dev-797781631727-us-east-2",
]
+ Sid = "OwnBucket"
},
+ {
+ Action = [
+ "ecr:GetAuthorizationToken",
]
+ Effect = "Allow"
+ Resource = [
+ "*",
]
+ Sid = "RegistryLogin"
},
+ {
+ Action = [
+ "ecr:CreateRepository",
+ "ecr:DescribeRepositories",
+ "ecr:ListTagsForResource",
+ "ecr:TagResource",
+ "ecr:UntagResource",
+ "ecr:PutImageTagMutability",
+ "ecr:PutImageScanningConfiguration",
+ "ecr:DescribeImages",
+ "ecr:ListImages",
+ "ecr:BatchCheckLayerAvailability",
+ "ecr:BatchGetImage",
+ "ecr:GetDownloadUrlForLayer",
+ "ecr:InitiateLayerUpload",
+ "ecr:UploadLayerPart",
+ "ecr:CompleteLayerUpload",
+ "ecr:PutImage",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:ecr:us-east-2:797781631727:repository/duckfleet-dev/worker",
+ "arn:aws:ecr:us-east-2:797781631727:repository/duckfleet-dev/dbt",
]
+ Sid = "OwnImages"
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
# module.duckfleet_ci.aws_iam_role_policy.lake will be created
+ resource "aws_iam_role_policy" "lake" {
+ id = (known after apply)
+ name = "duckfleet-lake-only"
+ name_prefix = (known after apply)
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "s3:GetObject",
+ "s3:PutObject",
+ "s3:DeleteObject",
+ "s3:AbortMultipartUpload",
+ "s3:ListMultipartUploadParts",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::duckfleet-dev-797781631727-us-east-2/lake/*",
]
},
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Condition = {
+ StringLike = {
+ "s3:prefix" = [
+ "lake/*",
]
}
}
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::duckfleet-dev-797781631727-us-east-2",
]
},
+ {
+ Action = [
+ "s3:GetBucketLocation",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::duckfleet-dev-797781631727-us-east-2",
]
},
]
+ Version = "2012-10-17"
}
)
+ role = (known after apply)
}
Plan: 6 to add, 0 to change, 0 to destroy.
|
This was referenced Nov 10, 2026
athvin
force-pushed
the
feat/duckfleet-ci-bootstrap
branch
from
November 10, 2026 21:38
1116f7c to
0cc8cad
Compare
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 #1082
What
Bootstrap a separate DuckFleet deployment identity and restricted development namespace on er-dev. The platform owns worker IAM/Pod Identity, namespace security, quotas and RBAC; DuckFleet CI can deploy only its application and manage its own bucket, images and state.
Why
DuckFleet cannot use ER's repository-bound OIDC roles. This supplies a reviewed CI deployment path without granting it IAM/EKS writes, ER state access, or permissions in ER namespaces.
Proof
Terraform dev stack validates; mocked IAM/trust tests pass. Six bootstrap objects pass kubeconform. Positive/negative RBAC tests, infra detector fixtures and actionlint pass. Shared skills/workflow/static-credential gates pass. The CI plan adds 6 dev identity resources, with zero changes/deletions and no core/prod changes. Live convergence must be verified after merge; no AWS writes were performed locally.
Risk & rollback
Adds a main-only identity for a separate trusted development product in the shared account. The namespace is not a customer SQL sandbox. Revert stops future convergence; removing live identities/resources requires an explicit retention/cleanup decision. No existing resource is intentionally changed or destroyed.
Post-merge ledger
Closed by: Codex · session
01a1c2cf-3c1c-7850-96f1-501a0189fca1onMac-100.lan· 2026-11-10T21:56:54.982903+00:00fcf0a1f55e5c6f6ca3f55c3295b92471cab2fe6c; Rust, infra, frontend and devcontainer all succeeded on that SHA./readyz -> 200and web previews/api/healthz -> 200; production public readiness stayed healthy through the three-minute cutover window.Specific to this change
duckfleet:deploygroup andduckfleet-dev/duckfleet-workerassociation.scripts/aws/check-access.shsucceeded in run 42908611160, including denied ER secret/RBAC/quota access, before any application apply.