ecs-instance-profile sub-module.
What changed
- Minimum Terraform version raised to v1.0
- Minimum AWS provider version raised to v4.6
ecs-instance-profilesub-module removedcontainer_insightsvariable replaced withcluster_settingscapacity_providersanddefault_capacity_provider_strategyreplaced withfargate_capacity_providersandautoscaling_capacity_providersaws_ecs_capacity_providerresources are now managed inside the module
Breaking changes
Variable and output changes
Removed variables
default_capacity_provider_strategy— now embedded infargate_capacity_providersandautoscaling_capacity_providers
Renamed variables
| Before | After |
|---|---|
create_ecs | create |
name | cluster_name |
container_insights | cluster_settings |
capacity_providers | fargate_capacity_providers / autoscaling_capacity_providers |
Added variables
cluster_configuration— dynamic block supporting all current attributes
Removed outputs
ecs_cluster_name
Renamed outputs
| Before | After |
|---|---|
ecs_cluster_id | cluster_id |
ecs_cluster_arn | cluster_arn |
Added outputs
cluster_capacity_providersautoscaling_capacity_providers
Migration guide
Replace container_insights with cluster_settings
The
container_insights boolean has been replaced by cluster_settings, which accepts a map and allows finer control. Container insights is enabled by default, so you can simply remove the variable if you were setting it to true.- Before
- After
Migrate capacity providers
Replace For EC2 AutoScaling Group capacity providers, remove the standalone
capacity_providers and default_capacity_provider_strategy with fargate_capacity_providers and autoscaling_capacity_providers.- Before
- After
aws_ecs_capacity_provider resource and move the configuration into autoscaling_capacity_providers.- Before
- After
Migrate the ecs-instance-profile sub-module
The
ecs-instance-profile sub-module has been removed. You can pin the sub-module at v3.5.0 until you are ready to migrate to the IAM instance profile provided by the terraform-aws-autoscaling module.See the
examples/complete example for a full demonstration of integrating with terraform-aws-autoscaling to replace this sub-module.Move capacity provider state (optional)
If you previously managed
aws_ecs_capacity_provider resources outside the module and want to bring them under module management, use terraform state mv to avoid destroying and recreating them.This step is optional. If you skip it, Terraform will destroy the existing capacity provider and create a new one under the module’s management. This may cause brief disruption to cluster capacity.
Complete before/after example
- Before (v3.x)
- After (v4.x)

