diff --git a/modules/runner-binaries-syncer/variables.tf b/modules/runner-binaries-syncer/variables.tf index d2daafec3f..1997c4b7e4 100644 --- a/modules/runner-binaries-syncer/variables.tf +++ b/modules/runner-binaries-syncer/variables.tf @@ -17,6 +17,12 @@ variable "environment" { variable "distribution_bucket_name" { description = "Bucket for storing the action runner distribution." type = string + + # Make sure the bucket name only contains legal characters + validation { + error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name." + condition = can(regex("^[a-z0-9-]*$", var.distribution_bucket_name)) + } } variable "lambda_schedule_expression" {