Skip to content

Commit 45f5b19

Browse files
authored
Merge pull request #6 from DNXLabs/feature/add_default_cooldown_var_asg
add on_demand_base_capacity variable
2 parents cc5e07e + ac10053 commit 45f5b19

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

_variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ variable "on_demand_percentage" {
2020
description = "Percentage of on-demand intances vs spot"
2121
default = 100
2222
}
23+
variable "on_demand_base_capacity" {
24+
description = "You can designate a base portion of your total capacity as On-Demand. As the group scales, per your settings, the base portion is provisioned first, while additional On-Demand capacity is percentage-based."
25+
default = 0
26+
}
27+
2328

2429
variable "vpc_id" {
2530
description = "VPC ID to deploy the ECS cluster"

asg.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "aws_autoscaling_group" "ecs" {
2323

2424
instances_distribution {
2525
spot_instance_pools = 3
26-
on_demand_base_capacity = 0
26+
on_demand_base_capacity = "${var.on_demand_base_capacity}"
2727
on_demand_percentage_above_base_capacity = "${var.on_demand_percentage}"
2828
}
2929
}

0 commit comments

Comments
 (0)