diff --git a/CHANGELOG.md b/CHANGELOG.md index 02eee5d..e38c115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ project adheres to [Semantic Versioning](http://semver.org/). - Output the name of the cloudwatch log group (by @gbooth27) - Option to use spot instances with launch templates without defining pools, especially useful for GPU instance types (@onur-sam-gtn-ai) - Added `cpu_credits` param for the workers defined in `worker_groups_launch_template` (by @a-shink) + - Added support for EBS Volumes tag in `worker_groups_launch_template` and `workers_launch_template_mixed.tf` (by @sppwf) - Write your awesome addition here (by @you) ### Changed diff --git a/workers_launch_template.tf b/workers_launch_template.tf index caee563..1c4fe77 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -274,6 +274,21 @@ resource "aws_launch_template" "workers_launch_template" { } } + tag_specifications { + resource_type = "volume" + + tags = merge( + { + "Name" = "${aws_eks_cluster.this.name}-${lookup( + var.worker_groups_launch_template[count.index], + "name", + count.index, + )}-eks_asg" + }, + var.tags, + ) + } + tags = var.tags lifecycle { diff --git a/workers_launch_template_mixed.tf b/workers_launch_template_mixed.tf index 7dd9d90..6e1d620 100644 --- a/workers_launch_template_mixed.tf +++ b/workers_launch_template_mixed.tf @@ -316,6 +316,21 @@ resource "aws_launch_template" "workers_launch_template_mixed" { } } + tag_specifications { + resource_type = "volume" + + tags = merge( + { + "Name" = "${aws_eks_cluster.this.name}-${lookup( + var.worker_groups_launch_template[count.index], + "name", + count.index, + )}-eks_asg" + }, + var.tags, + ) + } + tags = var.tags lifecycle {