Creates an ECS cluster and configures its capacity providers to use AWS Fargate with a specific strategy.

Terraform Template

resource "aws_ecs_cluster" "example" {
  name = "my-cluster"
}

resource "aws_ecs_cluster_capacity_providers" "example" {
  capacity_providers = ["FARGATE"]
  cluster_name = aws_ecs_cluster.example.name

  default_capacity_provider_strategy {
    base = 1
    capacity_provider = "FARGATE"
    weight = 100
  }
}