Skip to content

Commit cf1b880

Browse files
authored
Merge branch 'main' into main
2 parents 323333d + 8db1f60 commit cf1b880

File tree

7 files changed

+23
-2
lines changed

7 files changed

+23
-2
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ module "runner_binaries" {
309309

310310
state_event_rule_binaries_syncer = var.state_event_rule_binaries_syncer
311311
server_side_encryption_configuration = var.runner_binaries_s3_sse_configuration
312+
s3_tags = var.runner_binaries_s3_tags
312313
s3_versioning = var.runner_binaries_s3_versioning
313314

314315
role_path = var.role_path

modules/multi-runner/runner-binaries.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module "runner_binaries" {
2525
state_event_rule_binaries_syncer = var.state_event_rule_binaries_syncer
2626

2727
server_side_encryption_configuration = var.runner_binaries_s3_sse_configuration
28+
s3_tags = var.runner_binaries_s3_tags
2829
s3_versioning = var.runner_binaries_s3_versioning
2930

3031
role_path = var.role_path

modules/multi-runner/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@ variable "runner_binaries_s3_sse_configuration" {
404404
}
405405
}
406406

407+
variable "runner_binaries_s3_tags" {
408+
description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags."
409+
type = map(string)
410+
default = {}
411+
}
412+
407413
variable "runner_binaries_s3_versioning" {
408414
description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!"
409415
type = string

modules/runner-binaries-syncer/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ locals {
55
resource "aws_s3_bucket" "action_dist" {
66
bucket = var.distribution_bucket_name
77
force_destroy = true
8-
tags = var.tags
8+
tags = merge(var.tags, var.s3_tags)
99
}
1010

1111
resource "aws_s3_bucket_ownership_controls" "this" {

modules/runner-binaries-syncer/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ variable "s3_logging_bucket_prefix" {
4545
}
4646
}
4747

48+
variable "s3_tags" {
49+
description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags."
50+
type = map(string)
51+
default = {}
52+
}
53+
4854
variable "state_event_rule_binaries_syncer" {
4955
type = string
5056
description = "Option to disable EventBridge Lambda trigger for the binary syncer, useful to stop automatic updates of binary distribution"

modules/runners/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ resource "aws_ssm_parameter" "runner_ami_id" {
102102
tags = merge(
103103
local.tags,
104104
{
105-
"ghr:ami_name" = data.aws_ami.runner.name
105+
# Remove parentheses from AMI name to comply with AWS tag constraints
106+
"ghr:ami_name" = replace(data.aws_ami.runner.name, "/[()]/", "")
106107
},
107108
{
108109
"ghr:ami_creation_date" = data.aws_ami.runner.creation_date

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ variable "runner_binaries_s3_sse_configuration" {
192192
}
193193
}
194194

195+
variable "runner_binaries_s3_tags" {
196+
description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags."
197+
type = map(string)
198+
default = {}
199+
}
200+
195201
variable "runner_binaries_s3_versioning" {
196202
description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!"
197203
type = string

0 commit comments

Comments
 (0)