Skip to main content
Knowledge Base

Reference Architecture: Gruntwork Pipelines on ECS Fargate?

Answer

Is it possible to launch my Reference Architecture's Gruntwork Pipelines on ECS Fargate? I see it is an `m5.2xl` and my company only does a few Terraform runs a week. If it's not, is it easy to switch once Gruntwork has given me the code? --- <ins datetime="2022-06-16T18:27:06Z"> <p><a href="https://support.gruntwork.io/hc/requests/108793">Tracked in ticket #108793</a></p> </ins>

Yes you can use Fargate for the ECS Deploy Runner in the Reference Architecture. We set up the Reference Architecture with EC2 instances in the initial deployment due to the number of resources that need to be deployed, but after the Reference Architecture is deployed, you can switch over to Fargate provided that you are only making incremental updates to handful of resources at a time. To switch over to Fargate mode, you can perform the following steps: - Remove the `ec2_worker_pool_configuration` block in [the _envcommon/mgmt/ecs-deploy-runner.hcl file](https://github.com/gruntwork-io/terraform-aws-service-catalog/blob/d66801d971c9bf79b630c319f5668161688c252a/examples/for-production/infrastructure-live/_envcommon/mgmt/ecs-deploy-runner.hcl#L195-L211) - Run `terragrunt apply` in each accounts' `ecs-deploy-runner` folder. Note that you will want to run `terragrunt apply` twice due to a bug in Terraform where it does not properly replace the ECS Cluster in a single `apply` when switching from EC2 based to Fargate based.