mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-26 18:38:49 +02:00
improvement: Make the cpu_credits optional for workers launch template (#1030)
NOTES: `credit_specification` for worker groups launch template can now be set to `null` so that we can use non burstable EC2 families
This commit is contained in:
@@ -309,12 +309,15 @@ resource "aws_launch_template" "workers_launch_template" {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
credit_specification {
|
dynamic "credit_specification" {
|
||||||
cpu_credits = lookup(
|
for_each = lookup(
|
||||||
var.worker_groups_launch_template[count.index],
|
var.worker_groups_launch_template[count.index],
|
||||||
"cpu_credits",
|
"cpu_credits",
|
||||||
local.workers_group_defaults["cpu_credits"]
|
local.workers_group_defaults["cpu_credits"]
|
||||||
)
|
) != null ? [lookup(var.worker_groups_launch_template[count.index], "cpu_credits", local.workers_group_defaults["cpu_credits"])] : []
|
||||||
|
content {
|
||||||
|
cpu_credits = credit_specification.value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
monitoring {
|
monitoring {
|
||||||
|
|||||||
Reference in New Issue
Block a user