Skip to content

Commit

Permalink
Merge pull request #22 from gfortil/HPCC-29321
Browse files Browse the repository at this point in the history
HPCC-29321 Stop users from using hpccdemo as a tag.
  • Loading branch information
gfortil authored Apr 17, 2023
2 parents df988b5 + 8fe51e0 commit 9e2bdcb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/storage_accounts/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ variable "admin" {
name = string
email = string
})

validation {
condition = try(
regex("hpccdemo", var.admin.name) != "hpccdemo", true
) && try(
regex("hpccdemo", var.admin.email) != "hpccdemo", true
) && try(
regex("@example.com", var.admin.email) != "@example.com", true
)
error_message = "Your name and email are required in the admin block and must not contain hpccdemo or @example.com."
}
}

variable "disable_naming_conventions" {
Expand Down
11 changes: 11 additions & 0 deletions modules/virtual_network/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ variable "admin" {
name = string
email = string
})

validation {
condition = try(
regex("hpccdemo", var.admin.name) != "hpccdemo", true
) && try(
regex("hpccdemo", var.admin.email) != "hpccdemo", true
) && try(
regex("@example.com", var.admin.email) != "@example.com", true
)
error_message = "Your name and email are required in the admin block and must not contain hpccdemo or @example.com."
}
}

variable "disable_naming_conventions" {
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ variable "admin" {
name = string
email = string
})

validation {
condition = try(
regex("hpccdemo", var.admin.name) != "hpccdemo", true
) && try(
regex("hpccdemo", var.admin.email) != "hpccdemo", true
) && try(
regex("@example.com", var.admin.email) != "@example.com", true
)
error_message = "Your name and email are required in the admin block and must not contain hpccdemo or @example.com."
}
}

variable "expose_services" {
Expand Down

0 comments on commit 9e2bdcb

Please sign in to comment.