fix: expose on_demand_allocation_strategy to unblock instance_requirements#1381
Open
dmitrijn wants to merge 3 commits into
Open
fix: expose on_demand_allocation_strategy to unblock instance_requirements#1381dmitrijn wants to merge 3 commits into
dmitrijn wants to merge 3 commits into
Conversation
Contributor
|
Hey @dmitrijn! 👋 Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process. Make sure that this PR clearly explains:
With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE. The following ChatOps commands are supported:
Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. This message was generated automatically. You are welcome to improve it. |
Contributor
Author
|
@npalm and @kayman-mk, could you please review this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
instance_requirements(attribute-based instance selection) was already supportedby this module, but applying it would fail at the AWS API level with:
This happened because
on_demand_allocation_strategywas not exposed by the module,so AWS defaulted to
prioritized, which it rejects wheninstance_requirementsis used.Changes
on_demand_allocation_strategytorunner_worker_docker_autoscaler_asgandpass it through to the ASG
instances_distributionblocklowest-price, consistent with the existingspot_allocation_strategydefaultlowest-pricewheninstance_requirementsis set,surfacing a clear
terraform validateerror instead of a misleading AWS 400 at apply timeUsage
To use attribute-based instance selection: