Skip to content

Commit

Permalink
fix: add validation to distribution_bucket_name variable (philips-lab…
Browse files Browse the repository at this point in the history
…s#1356)

Co-authored-by: Ross Williams <[email protected]>
  • Loading branch information
rossrollin and Ross Williams authored Nov 1, 2021
1 parent a19929f commit 6522317
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/runner-binaries-syncer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ 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" {
description = "Scheduler expression for action runner binary syncer."
type = string
Expand Down

0 comments on commit 6522317

Please sign in to comment.