Skip to content

v3.0.0 — Terraform

Choose a tag to compare

@SebaScript SebaScript released this 22 Oct 00:12
· 53 commits to main since this release

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.

  • apply creates the registry, pushes the image tagged with the commit, creates the rest and waits until the API answers. About 9 minutes.
  • destroy removes 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