mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-12 05:21:33 +01:00
* Configure 'cpu_credits' for workers (#253) * Updated CHANGELOG(#253) * Moved default to settings for launch templates(#253)
This commit is contained in:
committed by
Max Williams
parent
4b1df0c0af
commit
34b74518e8
@@ -13,6 +13,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- Option to set a KMS key for the log group and encrypt it (by @till-krauss)
|
||||
- Output the name of the cloudwatch log group (by @gbooth27)
|
||||
- Added `cpu_credits` param for the workers defined in `worker_groups_launch_template` (by @a-shink)
|
||||
- Write your awesome addition here (by @you)
|
||||
|
||||
### Changed
|
||||
|
||||
1
local.tf
1
local.tf
@@ -72,6 +72,7 @@ locals {
|
||||
launch_template_placement_group = "" # The name of the placement group into which to launch the instances, if any.
|
||||
root_encrypted = "" # Whether the volume should be encrypted or not
|
||||
eni_delete = true # Delete the ENI on termination (if set to false you will have to manually delete before destroying)
|
||||
cpu_credits = "standard" # T2/T3 unlimited mode, can be 'standard' or 'unlimited'. Used 'standard' mode as default to avoid paying higher costs
|
||||
# Settings for launch templates with mixed instances policy
|
||||
override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"] # A list of override instance types for mixed instances policy
|
||||
on_demand_allocation_strategy = "prioritized" # Strategy to use when launching on-demand instances. Valid values: prioritized.
|
||||
|
||||
@@ -200,6 +200,14 @@ resource "aws_launch_template" "workers_launch_template" {
|
||||
),
|
||||
)
|
||||
|
||||
credit_specification {
|
||||
cpu_credits = lookup(
|
||||
var.worker_groups_launch_template[count.index],
|
||||
"cpu_credits",
|
||||
local.workers_group_defaults["cpu_credits"]
|
||||
)
|
||||
}
|
||||
|
||||
monitoring {
|
||||
enabled = lookup(
|
||||
var.worker_groups_launch_template[count.index],
|
||||
|
||||
@@ -250,6 +250,14 @@ resource "aws_launch_template" "workers_launch_template_mixed" {
|
||||
),
|
||||
)
|
||||
|
||||
credit_specification {
|
||||
cpu_credits = lookup(
|
||||
var.worker_groups_launch_template_mixed[count.index],
|
||||
"cpu_credits",
|
||||
local.workers_group_defaults["cpu_credits"]
|
||||
)
|
||||
}
|
||||
|
||||
monitoring {
|
||||
enabled = lookup(
|
||||
var.worker_groups_launch_template_mixed[count.index],
|
||||
|
||||
Reference in New Issue
Block a user