Commit 49540e2d authored by Adam Robinson's avatar Adam Robinson
Browse files

allow the folder display name to be overriden

parent 2f0e051e
......@@ -30,7 +30,7 @@ locals {
}
resource "google_folder" "customer_folder" {
display_name = local.short_mcomm
display_name = var.folder_display_name == "" ? local.short_mcomm : var.folder_display_name
parent = local.division_folder_ids[var.environment][var.division]
}
......
......@@ -53,3 +53,19 @@ variable "provisioning_service_account_email" {
type = string
description = "The email of the service account used to provision customers"
}
variable "folder_display_name" {
type = string
description = "Override the display name of customer folder. Not customer facing, should be set as close to the customer's mcomm group email as possible."
validation {
condition = length(var.folder_display_name) > 30
error_message = "The folder_display_name must be less than or equal to 30 characters in length."
}
validation {
condition = can(regex("^[[:alnum:]][\\w\\s-]*[[:alnum:]]$")) || var.folder_display_name == ""
error_message = "The folder_display_name must start and end with a letter or number and contain only letters, numbers, '_', ' ', and '-'."
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment