Closed
Description
Description
I have tried passing in bootstrap_extra_args into the module in many different ways, but no matter how it's passed into a terraform plan/apply it doesn't seem to register that there are any changes. My understanding is if it's done correctly it should update the user data and want to create new worker nodes.
Versions
- Module version [Required]:
20.34.0 - Terraform version:
1.11.2 - Provider version(s):
registry.terraform.io/hashicorp/aws v5.92.0
Reproduction Code [Required]
Steps to reproduce the behavior:
locals {
cluster_name = "cluster-name"
default_node_group_name = "bottlerocket_encry_v4"
spot_node_group_name = "bottlerocket_spot_v4"
default_managed_node_group = {
bottlerocket_encry_v4 = {
create_security_group = false
create_launch_template = false
use_custom_launch_template = false
ami_type = "BOTTLEROCKET_x86_64"
platform = "bottlerocket"
disk_size = 20
desired_size = 0
min_size = 0
max_size = 8
iam_role_additional_policies = {
ssm_managed_instance_core = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
}
spot_managed_node_group = {
bottlerocket_spot_v4 = {
create_security_group = false
create_launch_template = false
use_custom_launch_template = false
ami_type = "BOTTLEROCKET_x86_64"
platform = "bottlerocket"
bootstrap_extra_args = <<-EOT
[settings.kubernetes]
image-gc-high-threshold-percent = 75
image-gc-low-threshold-percent = 70
EOT
disk_size = 20
desired_size = 3
min_size = 0
max_size = 8
instance_types = ["t3a.medium","t3.medium","t2.medium"]
capacity_type = "SPOT"
iam_role_additional_policies = {
ssm_managed_instance_core = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
}
eks_managed_node_groups = merge(var.create_default_node_group ? local.default_managed_node_group : {}, var.create_spot_node_group ? local.spot_managed_node_group : {})
}
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 20.0"
cluster_name = local.cluster_name
cluster_endpoint_private_access = true
cluster_endpoint_public_access = true
cluster_version = 1.31
create_kms_key = false
eks_managed_node_groups = local.eks_managed_node_groups
}
variable "create_spot_node_group" {
description = "true creates a spot instance node group"
type = bool
default = true
}
variable "create_default_node_group" {
description = "true creates a default instance node group"
type = bool
default = true
}
Expected behavior
I expect Terraform would want to recreate the worker nodes after adding bootstrap_extra_args
Actual behavior
Terraform says there are no changes to be made