diff --git a/examples/managed_bottlerocket_node_group/main.tf b/examples/managed_bottlerocket_node_group/main.tf index 8cab9993d9..90201dbe5b 100644 --- a/examples/managed_bottlerocket_node_group/main.tf +++ b/examples/managed_bottlerocket_node_group/main.tf @@ -57,6 +57,9 @@ module "eks" { [settings.kubernetes.node-labels] ingress = "allowed" EOT + + device_name = "/dev/xvdb" + disk_type = "gp3" } } diff --git a/modules/node_groups/launch_template.tf b/modules/node_groups/launch_template.tf index d2b0f7855f..bab7168256 100644 --- a/modules/node_groups/launch_template.tf +++ b/modules/node_groups/launch_template.tf @@ -28,7 +28,7 @@ resource "aws_launch_template" "workers" { update_default_version = lookup(each.value, "update_default_version", true) block_device_mappings { - device_name = "/dev/xvda" + device_name = each.value["device_name"] ebs { volume_size = lookup(each.value, "disk_size", null) diff --git a/modules/node_groups/locals.tf b/modules/node_groups/locals.tf index bee8e47d1e..ebcf1aaa45 100644 --- a/modules/node_groups/locals.tf +++ b/modules/node_groups/locals.tf @@ -15,6 +15,7 @@ locals { create_launch_template = false bootstrap_env = {} kubelet_extra_args = var.workers_group_defaults["kubelet_extra_args"] + device_name = coalesce(var.workers_group_defaults["root_block_device_name"], "/dev/xvda") disk_size = var.workers_group_defaults["root_volume_size"] disk_type = var.workers_group_defaults["root_volume_type"] disk_iops = var.workers_group_defaults["root_iops"]