Skip to content

Commit

Permalink
CPU credits could be removed from launch template (permit launch of n…
Browse files Browse the repository at this point in the history
…on burstable families)
  • Loading branch information
Guillaume GILL committed Oct 1, 2020
1 parent 44d59da commit 356e88b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,19 @@ resource "aws_launch_template" "workers_launch_template" {
)
}

credit_specification {
cpu_credits = lookup(
dynamic "credit_specification" {
for_each = lookup(
var.worker_groups_launch_template[count.index],
"cpu_credits",
local.workers_group_defaults["cpu_credits"]
)
) != null ? [{}] : []
content {
cpu_credits = lookup(
var.worker_groups_launch_template[count.index],
"cpu_credits",
local.workers_group_defaults["cpu_credits"]
)
}
}

monitoring {
Expand Down

0 comments on commit 356e88b

Please sign in to comment.