resource "aws_ecs_cluster" "example" {
name = "example"
}
resource "aws_ecs_cluster_capacity_providers" "example" {
cluster_name = aws_ecs_cluster.example.name
capacity_providers = [aws_ecs_capacity_provider.example.name]
default_capacity_provider_strategy {
base = 1
weight = 100
capacity_provider = aws_ecs_capacity_provider.example.name
}
}
resource "aws_ecs_capacity_provider" "example" {
name = "example"
auto_scaling_group_provider {
auto_scaling_group_arn = aws_autoscaling_group.example.arn
}
}
create-cluster
[--cluster-name <value>]
[--tags <value>]
[--settings <value>]
[--configuration <value>]
[--capacity-providers <value>]
[--default-capacity-provider-strategy <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
aws ecs create-cluster --cluster-name MyCluster --capacity-providers MyCapacityProvider1 MyCapacityProvider2 --default-capacity-provider-strategy capacityProvider=MyCapacityProvider1,weight=1 capacityProvider=MyCapacityProvider2,weight=1
--
Categorized by Availability, Security & Compliance and Cost