Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: Make the cpu_credits optional for workers launch template #1030

Merged
merged 3 commits into from
Oct 5, 2020
Merged
Changes from 2 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
9 changes: 6 additions & 3 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,15 @@ resource "aws_launch_template" "workers_launch_template" {
)
}

credit_specification {
cpu_credits = lookup(
dynamic "credit_specification" {
gillg marked this conversation as resolved.
Show resolved Hide resolved
for_each = lookup(
var.worker_groups_launch_template[count.index],
"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 {
Expand Down