Skip to content

Commit 77a22eb

Browse files
authored
feat: add validation rule for docker machine name (#627)
* enforce valid docker machine name * Update variables.tf * Update variables.tf * Update variables.tf * format code
1 parent f06699c commit 77a22eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

variables.tf

+5
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,11 @@ variable "overrides" {
619619
condition = length(var.overrides["name_docker_machine_runners"]) <= 28
620620
error_message = "Maximum length for name_docker_machine_runners is 28 characters!"
621621
}
622+
623+
validation {
624+
condition = var.overrides["name_docker_machine_runners"] == "" || can(regex("^[a-zA-Z0-9\\.-]+$", var.overrides["name_docker_machine_runners"]))
625+
error_message = "Valid characters for the docker machine name are: [a-zA-Z0-9\\.-]."
626+
}
622627
}
623628

624629
variable "cache_bucket" {

0 commit comments

Comments
 (0)