A dead simple example to setup AWS Fargate using Fargate CLI + Terraform
A dead simple example to setup AWS Fargate using Fargate CLI + Terraform
We can create all of AWS ECS environment with Terraform. However, it requires a lot of Terraform boilerplates and understanding how Terraform works. Instead of copy & paste HCL from the Terraform document, let’s delegate some parts to Fargate CLI.
cp aws-credentials.ini.example aws-credentials.ini
# Add your credentials
vim aws-credentials.ini
# Initialize Terraform
make init
make create
make info
make deploy
Note: This will build Dockerfile
in the current directory. If you have other deploy strategy, edit Makefile
.
make destroy
Note: ECS Execution Role will not be deleted.
By Terraform:
By Fargate CLI: