Based on this announcement, we want to add support for ECS capacity providers.
PutClusterCapacityProviders
in update method, plus default_capacity_provider_strategy
and capacity_providers
arguments in schema)capacity_provider_strategy
to schema)Create: CreateCapacityProvider
Read: DescribeCapacityProvider
Update: UpdateCapacityProvider
Delete: DeleteCapacityProvider
resource "aws_ecs_capacity_provider" "example" {
name = "example" # Type: TypeString, Required: true
tags = {} # Type: TypeMap, Required: true
auto_scaling_group_provider { # Type: TypeList, Required: true, MaxItems: 1, Elem: *schema.Resource
auto_scaling_group_arn = "" # Type: TypeString, Required: true
managed_termination_protection = "" # Type: TypeString, Required: true
managed_scaling { # Type: TypeList, Required: true, MaxItems: 1, Elem: *schema.Resource
maximum_scaling_step_size = 1 # Type: TypeInt, Optional: true, Default: 10000
minimum_scaling_step_size = 1 # Type: TypeInt, Optional: true, Default: 1
status = "" # Type: TypeString, Optional: true (maybe Default: ENABLED)
target_capacity = 1 # Type: TypeInt, Optional: true
}
}
}
(Only showing new arguments/API calls)
Update: PutClusterCapacityProviders
resource "aws_ecs_cluster" "example" {
capacity_providers = [""] # Type: TypeList, Optional: true, Elem: *schema.Schema TypeString
default_capacity_provider_strategy { # Type: TypeList, Optional: true, MaxItems: 1, Elem: *schema.Resource
base = 1 # Type: TypeInt, Optional: true,
capacity_provider = "" # Type: TypeString, Required: true
weight = 1 # Type: TypeInt, Optional: true
}
}
(Only showing new arguments, no new API calls)
resource "aws_ecs_service" "example" {
capacity_provider_strategy { # Type: TypeSet, Optional: true, Elem: *schema.Resource
base = 1 # Type: TypeInt, Optional: true,
capacity_provider = "" # Type: TypeString, Required: true
weight = 1 # Type: TypeInt, Optional: true
}
}
Initial support for ECS Capacity Providers has been merged and will release with version 2.42.0 of the Terraform AWS Provider, shortly. This was a great effort by a few folks including @ryndaniels, @aeschright, @gdavison so kudos to those involved in making this happen. 🚀
This has been released in version 2.42.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
Initial support for ECS Capacity Providers has been merged and will release with version 2.42.0 of the Terraform AWS Provider, shortly. This was a great effort by a few folks including @ryndaniels, @aeschright, @gdavison so kudos to those involved in making this happen. 🚀