Skip to content

Commit

Permalink
fix: add missing tag_specifications for launch templates (#1212)
Browse files Browse the repository at this point in the history
## Description

Some of the `tag_specifications` were missing and are added in this PR.
Leads to more resources being tagged correctly.

Closes #1207
  • Loading branch information
kayman-mk authored Nov 29, 2024
1 parent 0fe1617 commit 28f06af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker_autoscaler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ resource "aws_launch_template" "this" {
resource_type = "instance"
tags = local.tags
}

tag_specifications {
resource_type = "volume"
tags = local.tags
}
tag_specifications {
resource_type = "network-interface"
tags = local.tags
}

tags = local.tags

Expand Down
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ resource "aws_launch_template" "gitlab_runner_instance" {
resource_type = "volume"
tags = local.tags
}
tag_specifications {
resource_type = "network-interface"
tags = local.tags
}
dynamic "tag_specifications" {
for_each = var.runner_instance.spot_price == null || var.runner_instance.spot_price == "" ? [] : ["spot"]
content {
Expand Down Expand Up @@ -410,6 +414,11 @@ resource "aws_launch_template" "fleet_gitlab_runner" {
resource_type = "volume"
tags = local.tags
}
tag_specifications {
resource_type = "network-interface"
tags = local.tags
}
# tag_specifications for spot-instances-request do not work. Instance creation fails.

tags = local.tags

Expand Down

0 comments on commit 28f06af

Please sign in to comment.