Skip to content

Commit c2c39ee

Browse files
author
Ross Williams
committed
feat: adding validation to distribution_bucket_name variable
1 parent 0b9ba90 commit c2c39ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/runner-binaries-syncer/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ variable "environment" {
1717
variable "distribution_bucket_name" {
1818
description = "Bucket for storing the action runner distribution."
1919
type = string
20+
21+
# Make sure the bucket name only contains legal characters
22+
validation {
23+
error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name."
24+
condition = can(regex("^[-a-z0-9]+", var.distribution_bucket_name))
25+
}
2026
}
2127

2228
variable "lambda_schedule_expression" {

0 commit comments

Comments
 (0)