Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use only the defined default capacity provider strategies. #248

Conversation

montaguethomas
Copy link

Description

An ECS Cluster can have up to 4 default capacity provider strategies. The previous logic would add every capacity provider defined for either EC2 or Fargate. Update the logic to only set a default strategy if the capacity provider sets the default_capacity_provider_strategy map.

Motivation and Context

When using > 4 EC2 ASGs, the module fails due to generating too many default capacity provider strategy rules. Additionally, there can be capacity providers one wouldn't want in the default strategy for a cluster.

Breaking Changes

Only breaks if default_capacity_provider_strategy isn't being set on at least one of the entries in the autoscaling_capacity_providers or fargate_capacity_providers maps.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

An ECS Cluster can have up to 4 default capacity provider strategies.
The previous logic would add every capacity provider defined for either
EC2 or Fargate. Update the logic to only set a default strategy if the
capacity provider sets the default_capacity_provider_strategy map.
@montaguethomas montaguethomas changed the title Use only the defined default capacity provider strategies. Fix: Use only the defined default capacity provider strategies. Dec 11, 2024
@montaguethomas montaguethomas changed the title Fix: Use only the defined default capacity provider strategies. fix: Use only the defined default capacity provider strategies. Dec 11, 2024
@bryantbiggs
Copy link
Member

please start with an issue and a reproduction - its not clear what the issue is that we are trying to solve for (if there is in fact an issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants