Terraform AWS ECS
ECS clusters, services, and task definitions with IAM roles, logging, load balancer integration, service discovery, capacity providers, and Fargate or EC2 runtime settings.
Controls enforced
These compliance controls are checked at terraform plan time.
- ECS clusters should have container insights enabled(low effort)
- ECS fargate services should run on the latest fargate platform version(low effort)
- ECS services should not have public IP addresses assigned automatically(low effort)
- ECS task definitions should not share the host's process namespace(low effort)
Quick start
See the Get Started guide and Registry Endpoints for details on how to customize the module for your requirements.
Migration from upstream
Already using terraform-aws-modules? Change only the source URL:
module "ecs" {
source = "terraform-aws-modules/ecs/aws"
version = "1.0"
}module "ecs" {
source = "soc2.compliance.tf/terraform-aws-modules/ecs/aws"
version = "1.0"
}Same arguments. Same outputs. Controls are checked at terraform plan. See the Migration Guide for step-by-step instructions.
Reversibility
No lock-in. Switch back by reverting the source URL:
module "ecs" {
source = "terraform-aws-modules/ecs/aws"
}Run terraform init -upgrade. Terraform state is unchanged — same resource addresses, same provider, no compliance.tf-specific resources. Controls you already applied remain in AWS.
Mapped compliance frameworks
Framework coverage
Which controls from this module are active under each framework endpoint.
● enforced by default · ○ not activated by this endpoint