mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-27 03:41:05 +01:00
feat: Add support for additional volumes in launch templates and launch configurations (#800)
Co-authored-by: Jaime Hidalgo <jhidalgo@cccis.com> Co-authored-by: Thierno IB. BARRY <ibrahima.br@gmail.com>
This commit is contained in:
committed by
GitHub
parent
49b0667cd9
commit
de00694a63
30
workers.tf
30
workers.tf
@@ -223,6 +223,36 @@ resource "aws_launch_configuration" "workers" {
|
||||
delete_on_termination = true
|
||||
}
|
||||
|
||||
dynamic "ebs_block_device" {
|
||||
for_each = lookup(var.worker_groups[count.index], "additional_ebs_volumes", local.workers_group_defaults["additional_ebs_volumes"])
|
||||
|
||||
content {
|
||||
device_name = ebs_block_device.value.block_device_name
|
||||
volume_size = lookup(
|
||||
ebs_block_device.value,
|
||||
"volume_size",
|
||||
local.workers_group_defaults["root_volume_size"],
|
||||
)
|
||||
volume_type = lookup(
|
||||
ebs_block_device.value,
|
||||
"volume_type",
|
||||
local.workers_group_defaults["root_volume_type"],
|
||||
)
|
||||
iops = lookup(
|
||||
ebs_block_device.value,
|
||||
"iops",
|
||||
local.workers_group_defaults["root_iops"],
|
||||
)
|
||||
encrypted = lookup(
|
||||
ebs_block_device.value,
|
||||
"encrypted",
|
||||
local.workers_group_defaults["root_encrypted"],
|
||||
)
|
||||
delete_on_termination = lookup(ebs_block_device.value, "delete_on_termination", true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user