Skip to content

Commit 28f06af

Browse files
authored
fix: add missing tag_specifications for launch templates (#1212)
## Description Some of the `tag_specifications` were missing and are added in this PR. Leads to more resources being tagged correctly. Closes #1207
1 parent 0fe1617 commit 28f06af

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

docker_autoscaler.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,14 @@ resource "aws_launch_template" "this" {
9797
resource_type = "instance"
9898
tags = local.tags
9999
}
100-
101100
tag_specifications {
102101
resource_type = "volume"
103102
tags = local.tags
104103
}
104+
tag_specifications {
105+
resource_type = "network-interface"
106+
tags = local.tags
107+
}
105108

106109
tags = local.tags
107110

main.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ resource "aws_launch_template" "gitlab_runner_instance" {
308308
resource_type = "volume"
309309
tags = local.tags
310310
}
311+
tag_specifications {
312+
resource_type = "network-interface"
313+
tags = local.tags
314+
}
311315
dynamic "tag_specifications" {
312316
for_each = var.runner_instance.spot_price == null || var.runner_instance.spot_price == "" ? [] : ["spot"]
313317
content {
@@ -410,6 +414,11 @@ resource "aws_launch_template" "fleet_gitlab_runner" {
410414
resource_type = "volume"
411415
tags = local.tags
412416
}
417+
tag_specifications {
418+
resource_type = "network-interface"
419+
tags = local.tags
420+
}
421+
# tag_specifications for spot-instances-request do not work. Instance creation fails.
413422

414423
tags = local.tags
415424

0 commit comments

Comments
 (0)