Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

153 Commits

Repository files navigation

Javabin Platform

Terraform-managed AWS infrastructure for javaBin, the Norwegian Java User Group.

What This Repo Does

This is the central infrastructure repo. It provisions shared AWS resources (VPC, ALB, ECS cluster, IAM, monitoring) and provides reusable Terraform modules and GitHub Actions workflows that app repos consume.

CI Pipeline

Push to main → terraform plan → LLM risk review → terraform apply
  • No-change plans skip review and apply automatically
  • HIGH risk changes block auto-apply and notify Slack; a board member can override
  • Plan artifacts are stored in S3, SHA-verified before apply

See docs/ci-workflow.md for details.

Repository Structure

terraform/
platform/ 7 sub-modules (networking, ingress, iam, compute, monitoring, lambdas, identity)
modules/ 12 reusable modules for app repos
lambda-src/ Python handlers for 6 Lambda functions
org/ AWS Organizations (human-applied, no CI)
state/ State backend bootstrap config
scripts/ Bootstrap, code generation, plan review, block notification
docs/ Architecture docs, runbooks, references
.github/workflows/ 13 workflows (platform CI + reusable app workflows)

Platform Sub-Modules

ModulePurpose
networkingVPC, subnets, NAT gateway, security groups
ingressALB, ACM certificates, Route53 DNS
iamGitHub OIDC provider, CI roles, permission boundary
computeECS Fargate cluster, ECR base config
monitoringSNS topics, EventBridge rules, Config, GuardDuty, Security Hub
lambdasSlack alerts, cost reports, compliance, override cleanup, team provisioner
identityIAM Identity Center (SAML + Google), Cognito user pools, 2FA

How App Repos Use the Platform

  1. Register your team in javaBin/registry
  2. Add app.yaml to your repo root (reference)
  3. Call the reusable workflow from your repo's CI:
    jobs:
    platform:
    uses: javaBin/platform/.github/workflows/javabin.yml@main
  4. The workflow detects your repo contents, builds, plans infra, reviews, and deploys

Reusable Modules

App repos source these via git:: URLs:

ModuleWhat
app-stackGolden path — reads app.yaml, creates all infra
ecr-repoECR repository with lifecycle policy
ecs-serviceECS Fargate service definition
service-routingALB target group + listener rule + DNS
service-roleECS task IAM role with composable policies
service-bucketS3 bucket with IAM policy output
service-databaseDynamoDB table with IAM policy output
service-secretSSM Parameter Store SecureString with IAM policy output
service-queueSQS queue + DLQ with IAM policy output
service-alarmCloudWatch alarms for ECS service
platform-dataRead-only data sources for shared infra
cognito-app-clientCognito app client registration

Documentation

Related Repos

About

Platform drift repo

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages