v7.0 adds support for ECS managed instances, introduces explicit capacity provider association via a newDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/terraform-aws-modules/terraform-aws-ecs/llms.txt
Use this file to discover all available pages before exploring further.
cluster_capacity_providers variable, renames autoscaling_capacity_providers to capacity_providers, and changes the type of ordered_placement_strategy from map to list.
What changed
- Capacity providers are no longer inferred from
default_capacity_provider_strategyorautoscaling_capacity_providers— they must be explicitly listed in the newcluster_capacity_providersvariable autoscaling_capacity_providersrenamed tocapacity_providers; ASG provider configuration is now nested underauto_scaling_group_providerordered_placement_strategytype changed frommap(object({...}))tolist(object({...}))- Default name postfixes and descriptions added to IAM roles and security groups (opt out with
disable_v7_default_name_description) - Support for ECS managed instances capacity provider added
Breaking changes
Variable and output changes
Removed variables
- None
Renamed variables
| Before | After |
|---|---|
autoscaling_capacity_providers | capacity_providers |
Added variables
cluster_capacity_providers— explicit list of capacity providers to associate with the clusterdisable_v7_default_name_description— opt out of new default name postfixes and descriptions (will be removed in v8.0)
Renamed outputs
| Before | After |
|---|---|
autoscaling_capacity_providers | capacity_providers |
Migration guide
Add cluster_capacity_providers for Fargate and external providers
v7.0 no longer infers which capacity providers to associate with the cluster. You must explicitly list them using the new
cluster_capacity_providers variable.- Before (v6.x)
- After (v7.x)
Capacity providers created by the module itself (via the
capacity_providers variable) are automatically associated with the cluster. You only need to list FARGATE, FARGATE_SPOT, or externally created capacity providers in cluster_capacity_providers.Rename autoscaling_capacity_providers to capacity_providers
Rename the variable and nest each ASG provider’s attributes under a new
auto_scaling_group_provider block.- Before (v6.x)
- After (v7.x)
No resources will be replaced or destroyed as a result of this rename. Existing ASG capacity providers continue to work as before — this is a variable rename and structural change only.
Preserve existing resource names (optional)
v7.0 introduces default name postfixes (e.g.
-service, -task-exec, -tasks, -infra) and default descriptions for IAM roles and security groups created by the module. If you have existing resources and want to avoid renaming them during this upgrade, set disable_v7_default_name_description = true.Update ordered_placement_strategy to a list
If you use
ordered_placement_strategy in the service sub-module, change it from a map to a list to preserve ordering.- Before (v6.x)
- After (v7.x)
State changes
Noterraform state mv commands are required for this upgrade. The capacity provider rename is a variable-level change and does not affect the underlying resources.
Complete before/after example
Root module
- Before (v6.x)
- After (v7.x)
Cluster sub-module
- Before (v6.x)
- After (v7.x)

