Skip to content

Commit 1322ff9

Browse files
committed
chore(docker-autoscaler): remove unneeded validation
1 parent 5808c3b commit 1322ff9

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎variables.tf‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ variable "runner_worker_docker_autoscaler_asg" {
816816
on_demand_allocation_strategy = Strategy for allocating on-demand instances. Valid values: 'prioritized' (by override order) or 'lowest-price'. Must be 'lowest-price' when instance_requirements is used — AWS rejects any other value with attribute-based instance selection. Defaults to 'lowest-price'.
817817
on_demand_base_capacity = Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances.
818818
on_demand_percentage_above_base_capacity = Percentage split between on-demand and Spot instances above the base on-demand capacity.
819-
spot_allocation_strategy = How to allocate capacity across the Spot pools. 'lowest-price' to optimize cost, 'capacity-optimized' to reduce interruptions.
819+
spot_allocation_strategy = How to allocate capacity across the Spot pools. 'lowest-price' to optimize cost, 'capacity-optimized' to reduce interruptions, 'price-capacity-optimized' to balance both price and capacity availability (recommended for most workloads).
820820
spot_instance_pools = Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify.
821821
subnet_ids = The list of subnet IDs to use for the Runner Worker when the fleet mode is enabled.
822822
default_instance_type = Default instance type for the launch template
@@ -860,11 +860,6 @@ variable "runner_worker_docker_autoscaler_asg" {
860860
error_message = "AWS does not allow setting both 'types' and 'instance_requirements' at the same time. Set only one."
861861
}
862862

863-
validation {
864-
condition = contains(["prioritized", "lowest-price"], var.runner_worker_docker_autoscaler_asg.on_demand_allocation_strategy)
865-
error_message = "on_demand_allocation_strategy must be 'prioritized' or 'lowest-price'."
866-
}
867-
868863
validation {
869864
condition = length(var.runner_worker_docker_autoscaler_asg.instance_requirements) == 0 || var.runner_worker_docker_autoscaler_asg.on_demand_allocation_strategy == "lowest-price"
870865
error_message = "on_demand_allocation_strategy must be set to 'lowest-price' when instance_requirements is used — AWS rejects any other value with attribute-based instance selection."

0 commit comments

Comments
 (0)