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 4, 2020
1 parent c4e95b3 commit 36b5b2a
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 @@ -304,12 +304,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 36b5b2a

Please sign in to comment.