Modular, production-grade AWS infrastructure as code with GitHub Actions CI/CD.
A reusable Terraform platform for AWS that demonstrates DevOps best practices:
- Modular design — VPC, EKS, RDS, and IAM as composable modules
- Environment separation —
dev/staging/prodvia workspaces - Remote state — S3 backend with DynamoDB locking
- CI/CD —
terraform fmt,validate,planon PR;applyon merge - Security — Least-privilege IAM, encrypted state, no hardcoded secrets
┌─────────────────────────────────────────────────────────┐
│ AWS Account │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ VPC │──▶│ EKS │──▶│ App Workloads │ │
│ │ 3 AZs │ │ Cluster │ │ (via GitOps) │ │
│ └────┬─────┘ └──────────┘ └──────────────────┘ │
│ │ │
│ ┌────▼─────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ RDS │ │ S3 │ │ IAM / IRSA │ │
│ │ Postgres │ │ State │ │ Roles │ │
│ └──────────┘ └──────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘
# Bootstrap remote state (one-time)
cd bootstrap && terraform init && terraform apply
# Deploy dev environment
cd environments/dev
terraform init
terraform plan
terraform applyterraform-aws-platform/
├── bootstrap/ # S3 + DynamoDB for remote state
├── modules/
│ ├── vpc/ # VPC, subnets, NAT, IGW
│ ├── eks/ # EKS cluster + node groups
│ ├── rds/ # PostgreSQL RDS
│ └── iam/ # IRSA roles, CI/CD roles
├── environments/
│ ├── dev/
│ ├── staging/
│ └── prod/
└── .github/workflows/
| Module | Resources | Purpose |
|---|---|---|
vpc |
VPC, subnets, NAT, route tables | Network foundation |
eks |
EKS cluster, node groups, add-ons | Container orchestration |
rds |
PostgreSQL, security groups | Managed database |
iam |
IRSA roles, OIDC provider | Workload identity |
| Event | Action |
|---|---|
| Pull Request | fmt check, validate, plan (comment on PR) |
| Merge to main | apply to dev |
Tag v* |
apply to staging/prod (manual approval) |
- Terraform >= 1.7
- AWS CLI configured
- S3 bucket for remote state (created by bootstrap)
MIT © almightymoon