Associate a set of ECS Capacity Providers with a specified ECS Cluster
Manages the capacity providers of an ECS Cluster.
resource "awscc_ecs_cluster_capacity_provider_associations" "example" {
cluster = awscc_ecs_cluster.example.name
capacity_providers = ["FARGATE", "FARGATE_SPOT"]
default_capacity_provider_strategy = [{
capacity_provider = "FARGATE"
base = 1
weight = 100
}]
}
Manages the capacity providers of an ECS Cluster. Note that AWS Provider resource for aws_autoscaling_group is used.
resource "awscc_ecs_cluster_capacity_provider_associations" "example" {
cluster = awscc_ecs_cluster.example.name
capacity_providers = [awscc_ecs_capacity_provider.example.id]
}
resource "awscc_ecs_capacity_provider" "example" {
name = "example"
auto_scaling_group_provider = {
auto_scaling_group_arn = aws_autoscaling_group.example.arn
managed_termination_protection = "ENABLED"
managed_scaling = {
maximum_scaling_step_size = 1000
minimum_scaling_step_size = 1
status = "ENABLED"
target_capacity = 10
}
}
lifecycle {
ignore_changes = [auto_scaling_group_provider.auto_scaling_group_arn]
}
}
capacity_providers
(List of String) List of capacity providers to associate with the clustercluster
(String) The name of the clusterdefault_capacity_provider_strategy
(Attributes List) List of capacity providers to associate with the cluster (see below for nested schema)id
(String) Uniquely identifies the resource.default_capacity_provider_strategy
Required:
capacity_provider
(String) If using ec2 auto-scaling, the name of the associated capacity provider. Otherwise FARGATE, FARGATE_SPOT.Optional:
base
(Number)weight
(Number)Import is supported using the following syntax:
$ terraform import awscc_ecs_cluster_capacity_provider_associations.example <resource ID>