Terraform modules commonly used by our projects
Modules within this repository require terraform 0.12.x.
If you're on 0.11.x use the terraform-0.11
branch, which is not actively developed anymore.
Creates an ECS cluster, contains submodules for creating additional resources within the cluster.
Creates a Redis cluster using AWS ElastiCache
Creates infrastructure for terraform itself and infrastructure CI/CD
Creates a PostgreSQL database using AWS RDS
Creates common infrastructure for single page applications
Creates an SSL certificate using AWS ACM
Creates an AWS IAM user with an access key
Registers a domain with AWS SES and verifies it
To run examples you will need to prepare:
(optional) Example working hosted zone to add DNS records to
Some examples require a hosted zone to setup DNS records, e.g. to validate TLS certificates or route traffic to services.
Once these are ready:
Copy .env.template
to .env
and fill in the blanks in .env
AWS_PROFILE
can be left empty if you want to use your default AWS CLI profileTF_VAR_zone_domain
should contain the example hosted zone domain, e.g. terraform-examples.com
Build the container with development tools
docker-compose build
Run the development shell
docker-compose run --rm shell bash
Go to one of the examples and terraform apply
, e.g.
cd iam/user/example
terraform init
terraform apply
Destroy the example once you no longer need it
cd iam/user/example
terraform destroy