Skip to content

Commit

Permalink
feat: adding var for tags for ec2s (#1357)
Browse files Browse the repository at this point in the history
Co-authored-by: Callum <callum@domain.com>
  • Loading branch information
toast-gear and Callum authored Nov 1, 2021
1 parent 6522317 commit 31cf02d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions modules/runners/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ resource "aws_launch_template" "runner" {
{
"Name" = format("%s", local.name_runner)
},
var.runner_ec2_tags
)
}

Expand Down
6 changes: 6 additions & 0 deletions modules/runners/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}

0 comments on commit 31cf02d

Please sign in to comment.