mirror of
https://github.com/hashicorp/terraform.git
synced 2026-05-17 20:09:57 -04:00
20 lines
373 B
HCL
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}"
|
|
}
|