This project will use [Terraform] to provision and manage AWS container infrastructure to run whatever container your little heart desires.
You will be able to configure a public container image from Docker Hub, ECR, or any other container registry out of the box. This is meant as a boiler plate, if you want to use a private image, utilize a load balancer, or use ports other than the default HTTP port (80) you'll need to do further configuration from this boiler plate infrastructure.
In variables.tf
you will be able to configure:
- Container image URL
- Container CPU
- Container Memory
- Number of containers to provision
To get started you'll need to clone this repo and install
Terraform
on your computer. Once you have done that, run terraform init
in this
directory to install the Terraform AWS adapter.
You'll also need to install the AWS CLI and configure your authentication locally. I'd recommend referring to the getting started section a more in-depth guide on authenticating to AWS.
Note: Running this AWS infrastructure will result in charges to your account.
Run terraform apply
and Terraform will present to you the AWS
resources we will be provisioning in this example. If you reply with
yes
Terraform will automatically provision in your container
infrastructure, pull down your container, and serve it over port 80.