Go back to list
Refactoring with Terraform

4. How to setup terraform module for ECS Fargate

Overview

This episode is a show and tell on how to setup ECS infrastructure using Fargate. This episode leverages on existing terraform module for ECS using EC2 to allow for re-usable set of terraform code.

This episode also includes running of infracost to compare infrastructure cost between ECS using EC2 and ECS using Fargate.

Source code

Terraform module: https://github.com/dyordsabuzo/terraform-aws-pablosspot-ecs/tree/3645bd32c9943edc5bd48b73c6a3162d77ae5d31 Working with ECS project: https://github.com/dyordsabuzo/working-with-aws-ecs/tree/aa71e8637e43183a18e85aa5381d4e9d7d26f532

References

Infracost: https://www.infracost.io/

Previous 3. How to setup container definitions with Terraform templatefile Next 5. How to automate multi region replication in AWS ECR with Terraform

Recommended book references

Click on book reference to open product details in Amazon website.