Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ variable "on_demand_base_capacity" {
default = 0
}

variable "spot_allocation_strategy" {
type = string
default = "price-capacity-optimized"
description = "How to allocate capacity across the Spot pools. Valid values: lowest-price, diversified, capacity-optimized, price-capacity-optimized."
}

variable "vpc_id" {
description = "VPC ID to deploy the ECS cluster."
}
Expand Down
2 changes: 1 addition & 1 deletion asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "aws_autoscaling_group" "ecs" {
}

instances_distribution {
spot_instance_pools = 3
spot_allocation_strategy = var.spot_allocation_strategy
on_demand_base_capacity = var.on_demand_base_capacity
on_demand_percentage_above_base_capacity = var.on_demand_percentage
}
Expand Down