Skip to content

Commit

Permalink
refactor(firestore): allow the same naming conventions in both modules
Browse files Browse the repository at this point in the history
  • Loading branch information
tweakster committed Oct 8, 2024
1 parent 9c34a6d commit 7f2103e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions modules/gcp_firestore/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ variable "name_parts" {
nullable = false

validation {
condition = length(var.name_parts.domain) == 2
error_message = "Domain part of the name should be 2 chars"
condition = can(regex("^[a-z]{2}$", var.name_parts.domain))
error_message = "Domain part of the name should be exactly 2 lowercase chars"
}

validation {
condition = length(var.name_parts.region) == 3
error_message = "Region part of the name should be 3 chars"
}

validation {
condition = can(regex("^[a-z]+$", var.name_parts.app))
error_message = "App part of the name should only contain lower case letters"
condition = can(regex("^[a-z]{3}$", var.name_parts.region))
error_message = "Region part of the name should be exactly 3 lowercase chars"
}

validation {
Expand Down

0 comments on commit 7f2103e

Please sign in to comment.