Skip to content

Terraform modules commonly used in our projects

Notifications You must be signed in to change notification settings

codequest-eu/terraform-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform modules

Terraform modules commonly used by our projects

Terraform version

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.

Modules

  • ecs

    Creates an ECS cluster, contains submodules for creating additional resources within the cluster.

  • elasticache/redis

    Creates a Redis cluster using AWS ElastiCache

  • meta

    Creates infrastructure for terraform itself and infrastructure CI/CD

  • rds/postgres

    Creates a PostgreSQL database using AWS RDS

  • spa

    Creates common infrastructure for single page applications

  • ssl/acm

    Creates an SSL certificate using AWS ACM

  • iam/user

    Creates an AWS IAM user with an access key

  • ses/domain

    Registers a domain with AWS SES and verifies it

Local setup

To run examples you will need to prepare:

  1. Docker and docker-compose

  2. An AWS account with an Administrator IAM user

  3. Access key to authenticate as the Administrator

  4. (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:

  1. Copy .env.template to .env and fill in the blanks in .env

    1. AWS_PROFILE can be left empty if you want to use your default AWS CLI profile
    2. TF_VAR_zone_domain should contain the example hosted zone domain, e.g. terraform-examples.com
  2. Build the container with development tools

    docker-compose build
  3. Run the development shell

    docker-compose run --rm shell bash
  4. Go to one of the examples and terraform apply, e.g.

    cd iam/user/example
    terraform init
    terraform apply
  5. Destroy the example once you no longer need it

    cd iam/user/example
    terraform destroy

About

Terraform modules commonly used in our projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published