feat(terraform/platform/dev): provision QuanvNN datasets S3 bucket and IRSA role#39
Merged
Merged
Conversation
Bucket podyourlife-quanvnn-datasets-dev with versioning, SSE-S3, public access fully blocked, BucketOwnerEnforced ownership, and a 90-day noncurrent version expiration lifecycle. Holds satellite imagery patches consumed by the QuanvNN training pipeline. Outputs the bucket name and ARN for downstream consumers (IRSA policy in irsa.tf, Helm values for ml-batch-job).
Creates an IAM role assumable by the system:serviceaccount:ml:quanvnn-sa ServiceAccount via the EKS OIDC provider. Grants read-only access (s3:ListBucket, s3:GetObject) on the QuanvNN datasets bucket — no write or delete permissions. The OIDC subject is hardcoded to ml/quanvnn-sa, which is the contract between this role and the ml-batch-job Helm chart's ServiceAccount. Built on the _core/modules/aws/irsa module, matching the existing ArgoCD image updater IRSA pattern. Outputs the role ARN for use as the eks.amazonaws.com/role-arn annotation on the ServiceAccount via Helm values.
4 tasks
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.
Summary
Sprint 2A — Terraform-only infrastructure for the QuanvNN ML pipeline on dev.
podyourlife-quanvnn-datasets-devfor satellite imagery patches consumed by the QuanvNN training pipeline. Versioning + SSE-S3 + full public access block +BucketOwnerEnforcedownership + 90-day noncurrent version lifecycle.system:serviceaccount:ml:quanvnn-savia the EKS OIDC provider. Read-only S3 access (s3:ListBucket,s3:GetObject) — no write or delete permissions.quanvnn_datasets_bucket_name,quanvnn_datasets_bucket_arn,quanvnn_irsa_role_arn.Files in scope
terraform/domains/platform/dev/s3.tf(new — 71 lines, 6 resources)terraform/domains/platform/dev/irsa.tf(modified — appendsmodule.irsa_quanvnn, updates header comment)terraform/domains/platform/dev/outputs.tf(modified — appends 3 outputs alphabetically)Pattern adherence
The IRSA role uses the existing
_core/modules/aws/irsamodule (matching theargocd_image_updaterIRSA already in the file), not rawaws_iam_role+aws_iam_policy_documentresources. The module handles trust policy construction, OIDC subject pinning, policy attachment, and tagging in one block.Validation
terraform fmt -check -diff— cleanterraform init -backend=false— providers resolved (aws 5.100.0, tls 4.2.1)terraform validate— Success! The configuration is valid.No
terraform applywas run — out of Sprint 2A scope. Apply will happen viaplatform-bot env apply --env devonce the PR merges tomainand the dev branch is re-hydrated.Out of scope (Sprint 2B and beyond)
kubernetes/helm/values/quanvnn-dev.yamlto setserviceAccount.irsaRoleArnand theS3_DATASETS_BUCKETenv varplatform-botTest plan
terraform validatejob passes on the dev domainterraform fmtjob passestflintif configured passesterraform planto confirm a clean creation diff (1 bucket + 5 bucket-config resources + 1 IAM role + 1 IAM policy + 1 attachment + 2 data sources)system:serviceaccount:ml:quanvnn-sa