Skip to content

Commit 8a26390

Browse files
authored
Merge branch 'main' into feat-customize-runner-role
2 parents 666df6e + 8db1f60 commit 8a26390

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
@@ -416,6 +416,12 @@ variable "runner_binaries_s3_sse_configuration" {
416416
}
417417
}
418418

419+
variable "runner_binaries_s3_tags" {
420+
description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags."
421+
type = map(string)
422+
default = {}
423+
}
424+
419425
variable "runner_binaries_s3_versioning" {
420426
description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!"
421427
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
@@ -209,6 +209,12 @@ variable "runner_binaries_s3_sse_configuration" {
209209
}
210210
}
211211

212+
variable "runner_binaries_s3_tags" {
213+
description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags."
214+
type = map(string)
215+
default = {}
216+
}
217+
212218
variable "runner_binaries_s3_versioning" {
213219
description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!"
214220
type = string

0 commit comments

Comments
 (0)