Repository navigation
v3.0.0 — Terraform
The API now deploys to AWS from code: Terraform creates four services, a GitHub Actions pipeline builds the API and installs it on them, and the same pipeline destroys everything.
| File | Service | What it is for |
|---|---|---|
ec2.tf |
EC2 | One machine that runs the API with Docker, with its firewall and role |
rds.tf |
RDS | The PostgreSQL database, reachable only from the machine |
ecr.tf |
ECR | The registry the pipeline pushes the API image to |
s3.tf |
S3 | The bucket for the CSV exports |
Plus providers.tf, variables.tf, outputs.tf and the machine's boot script, user-data.sh.
Pipeline: Actions → Infrastructure → Run workflow.
applycreates the registry, pushes the image tagged with the commit, creates the rest and waits until the API answers. About 9 minutes.destroyremoves all 12 resources, data included. About 3 minutes. Only the bucket that holds the Terraform state is left.
About 0.03 USD per hour while it exists. See terraform/README.md.
Full Changelog: v2.1.0...v3.0.0