terraform/internal/command/testdata/dynamic-module-sources/provider-function-in-const-validation/main.tf
2026-04-29 17:32:08 -04:00

20 lines
373 B
HCL

terraform {
required_providers {
test = {
source = "test"
}
}
}
variable "module_name" {
type = string
const = true
validation {
condition = provider::test::is_true(var.module_name == "example")
error_message = "The module_name variable must be set to \"example\""
}
}
module "example" {
source = "./modules/${var.module_name}"
}