workshop-db owns PostgreSQL infrastructure for the workshop service.
It provisions and names managed database resources, but it does not own schema
evolution or application behavior.
- Terraform composition for
stagandprod - managed PostgreSQL infrastructure in AWS
- database-focused CI validation and deployment workflow
This repository does not own migrations, seeds, application runtime code, or shared runtime platform logic.
The Terraform stack now provisions:
- one PostgreSQL RDS instance per environment
- one DB subnet group
- one database security group with controlled ingress
- one PostgreSQL parameter group
- one Secrets Manager secret with credentials and connection metadata
Formal outputs exposed by the root module:
db_hostdb_portdb_namedb_secret_arndb_security_group_iddb_instance_identifierdb_subnet_group_namedb_parameter_group_name
Minimal validation without touching remote state:
cd terraform
terraform fmt -check -recursive
terraform init -backend=false
terraform validateEnvironment plan with real backend and AWS access:
cd terraform
terraform init -reconfigure -backend-config=environments/stag/backend.hcl.example
terraform plan -var-file=environments/stag/terraform.tfvars.examplefeature/* -> stag: Pull Request validated by Terraform formatting, initialization, and validationstag -> prod: promotion Pull Request allowed only fromstagpushtostagorprod: deployment workflow uses AWS OIDC and runs Terraform applyprodPull Requests: drift-report and promotion-source workflows enforce branch disciplineCreate Promotion PR: manual workflow that opens thestagtoprodpromotion PR when one does not already exist
The Create Promotion PR workflow requires the PROMOTION_PR_TOKEN repository
secret. Use a fine-grained GitHub token with access to this repository and
pull request read/write permission.
- docs/README.md - docs index and reading guide
- docs/architecture.md - repository boundaries and target database role
- docs/database-choice.md - formal justification for PostgreSQL and migration rationale
- docs/development.md - Terraform workflow, validation, and documentation rules
- AGENTS.md - instructions for AI contributors
Transversal architecture documentation (component diagrams, sequence diagrams, ER model, RFCs, ADRs) is maintained in workshop-app/docs.