Skip to main content
v7.0 adds support for ECS managed instances, introduces explicit capacity provider association via a new 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_strategy or autoscaling_capacity_providers — they must be explicitly listed in the new cluster_capacity_providers variable
  • autoscaling_capacity_providers renamed to capacity_providers; ASG provider configuration is now nested under auto_scaling_group_provider
  • ordered_placement_strategy type changed from map(object({...})) to list(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

Capacity providers are no longer inferred. If you use FARGATE, FARGATE_SPOT, or any externally created capacity provider, you must now explicitly declare them in the new cluster_capacity_providers variable.
autoscaling_capacity_providers has been renamed to capacity_providers. Each ASG provider definition must also be nested under a new auto_scaling_group_provider block.
Default IAM role and security group name postfixes and descriptions are added in v7.0. This can cause existing resources to be renamed, which Terraform will implement as a destroy-and-recreate. Use disable_v7_default_name_description = true to preserve existing resource names during migration.

Variable and output changes

Removed variables

  • None

Renamed variables

Added variables

  • cluster_capacity_providers — explicit list of capacity providers to associate with the cluster
  • disable_v7_default_name_description — opt out of new default name postfixes and descriptions (will be removed in v8.0)

Renamed outputs

Migration guide

1

Update the module version

Change the version constraint to ~> 7.0.
2

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.
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.
3

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.
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.
4

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.
disable_v7_default_name_description is a temporary escape hatch that will be removed in v8.0. After upgrading, plan to remove this variable and accept the new naming convention before the next major version.
5

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.
6

Update output references

Update any references to the renamed output:

State changes

No terraform 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

Cluster sub-module