Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Example Project

This directory contains an example project demonstrating usage of our VPC module, including:

  • Provider-level tagging using default_tags.
  • A security group rule that allows the bastion instance to make HTTPS requests.
  • Changing the default working directory and shell for AWS Systems Manager to ~ and /bin/bash.

Overview

The terraform directory contains a Terraform project.

The scripts directory contains one script:

  • infra is a wrapper for the terraform command that also manages initialization.

Getting Started

Dependencies

  • AWS CLI 2.4+
  • Docker 20.10+
  • Docker Compose 2.2+

Instructions

First, copy the following file, renaming it to terraform-aws-vpc.tfvars in the process:

cp terraform/terraform-aws-vpc.tfvars.example terraform/terraform-aws-vpc.tfvars

Then, customize its contents with a text editor:

  • For project, use your name in title case.

Here's an example of a customized terraform-aws-vpc.tfvars:

project = "JohnAmazon"
environment = "Staging"
region = "us-east-1"

Next, launch an instance of the included Terraform container image:

export AWS_PROFILE=sandbox
docker-compose run --rm terraform
bash-5.1#

Once inside the context of the container image, use infra to generate a Terraform plan:

bash-5.1# ./scripts/infra plan