diff --git a/main.tf b/main.tf index 9c72614808..e079c8f83e 100644 --- a/main.tf +++ b/main.tf @@ -308,6 +308,7 @@ module "runner_binaries" { state_event_rule_binaries_syncer = var.state_event_rule_binaries_syncer server_side_encryption_configuration = var.runner_binaries_s3_sse_configuration + s3_tags = var.runner_binaries_s3_tags s3_versioning = var.runner_binaries_s3_versioning role_path = var.role_path diff --git a/modules/multi-runner/runner-binaries.tf b/modules/multi-runner/runner-binaries.tf index 3e20beea5a..e8779092f9 100644 --- a/modules/multi-runner/runner-binaries.tf +++ b/modules/multi-runner/runner-binaries.tf @@ -25,6 +25,7 @@ module "runner_binaries" { state_event_rule_binaries_syncer = var.state_event_rule_binaries_syncer server_side_encryption_configuration = var.runner_binaries_s3_sse_configuration + s3_tags = var.runner_binaries_s3_tags s3_versioning = var.runner_binaries_s3_versioning role_path = var.role_path diff --git a/modules/multi-runner/variables.tf b/modules/multi-runner/variables.tf index a401017e99..0cf8607c09 100644 --- a/modules/multi-runner/variables.tf +++ b/modules/multi-runner/variables.tf @@ -404,6 +404,12 @@ variable "runner_binaries_s3_sse_configuration" { } } +variable "runner_binaries_s3_tags" { + description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags." + type = map(string) + default = {} +} + variable "runner_binaries_s3_versioning" { description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!" type = string diff --git a/modules/runner-binaries-syncer/main.tf b/modules/runner-binaries-syncer/main.tf index da783a063c..c1cbf382af 100644 --- a/modules/runner-binaries-syncer/main.tf +++ b/modules/runner-binaries-syncer/main.tf @@ -5,7 +5,7 @@ locals { resource "aws_s3_bucket" "action_dist" { bucket = var.distribution_bucket_name force_destroy = true - tags = var.tags + tags = merge(var.tags, var.s3_tags) } resource "aws_s3_bucket_ownership_controls" "this" { diff --git a/modules/runner-binaries-syncer/variables.tf b/modules/runner-binaries-syncer/variables.tf index d9b004cb4c..4a38fb24b0 100644 --- a/modules/runner-binaries-syncer/variables.tf +++ b/modules/runner-binaries-syncer/variables.tf @@ -45,6 +45,12 @@ variable "s3_logging_bucket_prefix" { } } +variable "s3_tags" { + description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags." + type = map(string) + default = {} +} + variable "state_event_rule_binaries_syncer" { type = string description = "Option to disable EventBridge Lambda trigger for the binary syncer, useful to stop automatic updates of binary distribution" diff --git a/variables.tf b/variables.tf index bec2574392..6d6a895873 100644 --- a/variables.tf +++ b/variables.tf @@ -192,6 +192,12 @@ variable "runner_binaries_s3_sse_configuration" { } } +variable "runner_binaries_s3_tags" { + description = "Map of tags that will be added to the S3 bucket. Note these are additional tags to the default tags." + type = map(string) + default = {} +} + variable "runner_binaries_s3_versioning" { description = "Status of S3 versioning for runner-binaries S3 bucket. Once set to Enabled the change cannot be reverted via Terraform!" type = string