diff --git a/main.tf b/main.tf index 20201b5526..673ea30c52 100644 --- a/main.tf +++ b/main.tf @@ -123,6 +123,7 @@ module "runners" { userdata_pre_install = var.userdata_pre_install userdata_post_install = var.userdata_post_install key_name = var.key_name + runner_ec2_tags = var.runner_ec2_tags create_service_linked_role_spot = var.create_service_linked_role_spot diff --git a/modules/runners/main.tf b/modules/runners/main.tf index 1728e260d0..f187792334 100644 --- a/modules/runners/main.tf +++ b/modules/runners/main.tf @@ -93,6 +93,7 @@ resource "aws_launch_template" "runner" { { "Name" = format("%s", local.name_runner) }, + var.runner_ec2_tags ) } diff --git a/modules/runners/variables.tf b/modules/runners/variables.tf index ba8fcbd5ec..3a7b27f27e 100644 --- a/modules/runners/variables.tf +++ b/modules/runners/variables.tf @@ -368,3 +368,9 @@ variable "egress_rules" { description = null }] } + +variable "runner_ec2_tags" { + description = "Map of tags that will be added to the launch template instance tag specificatons." + type = map(string) + default = {} +} \ No newline at end of file diff --git a/variables.tf b/variables.tf index 9a7360cf5e..37a004dc14 100644 --- a/variables.tf +++ b/variables.tf @@ -406,3 +406,9 @@ variable "disable_check_wokflow_job_labels" { type = bool default = false } + +variable "runner_ec2_tags" { + description = "Map of tags that will be added to the launch template instance tag specificatons." + type = map(string) + default = {} +}