Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 6522317

Browse files
rossrollinRoss Williams
and
Ross Williams
authored
fix: add validation to distribution_bucket_name variable (#1356)
Co-authored-by: Ross Williams <[email protected]>
1 parent a19929f commit 6522317

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/runner-binaries-syncer/variables.tf

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ 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
}
21-
2227
variable "lambda_schedule_expression" {
2328
description = "Scheduler expression for action runner binary syncer."
2429
type = string

0 commit comments

Comments
 (0)