Skip to content

Commit

Permalink
remove: broken validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Conjugato committed May 26, 2023
1 parent 84b3ae5 commit 81c4893
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
variable "bucket_paths" {
type = list(string)
description = "list of bucket paths"

validation {
condition = length(var.bucket_paths) >= 1
error_message = "length of 'bucket_paths' cannot be 0"
}
}

variable "region" {
Expand All @@ -29,11 +24,6 @@ variable "notification_channels" {
variable "name" {
type = string
description = "service name"

validation {
condition = can(regex("^[_a-zA-Z0-9-]+$", var.name))
error_message = "Invalid value for 'name'. Only alphanumeric characters, underscores, and hyphens are allowed."
}
}

variable "cron_schedule" {
Expand All @@ -44,39 +34,19 @@ variable "cron_schedule" {
variable "cron_time_zone" {
type = string
description = "cron time zone (e.g. Australia/Melbourne)"

validation {
condition = can(regex("^[a-zA-Z_]+\\/[a-zA-Z_]+$", var.cron_time_zone))
error_message = "Invalid value for 'cron_time_zone'. Must be a valid time zone pattern (e.g., <country>/<city>)."
}
}

variable "threshold" {
type = string
description = "object threshold before log is created"

validation {
condition = can(regex("^\\d+$", var.threshold))
error_message = "Invalid value for 'threshold'. Must be a string number."
}
}

variable "timeout" {
type = string
description = "timeout before build fails (e.g. 300s, 7200s)"

validation {
condition = can(regex("^\\d+s$", var.timeout))
error_message = "Invalid value for 'timeout'. Must be a number followed by 's' (e.g., '1000s')."
}
}

variable "service_account" {
type = string
description = "service account email"

validation {
condition = can(regex("^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$", var.service_account))
error_message = "Invalid value for 'service_account'. Must be a valid email address."
}
}

0 comments on commit 81c4893

Please sign in to comment.