mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-22 10:31:22 -04:00
36 lines
508 B
HCL
36 lines
508 B
HCL
|
|
variable "input" {
|
|
type = string
|
|
|
|
validation {
|
|
condition = var.input == "allow"
|
|
error_message = "invalid input value"
|
|
}
|
|
}
|
|
|
|
variable "followup" {
|
|
type = string
|
|
default = "allow"
|
|
|
|
validation {
|
|
condition = var.followup == var.input
|
|
error_message = "followup must match input"
|
|
}
|
|
}
|
|
|
|
locals {
|
|
input = var.followup
|
|
}
|
|
|
|
module "child" {
|
|
source = "./child"
|
|
input = var.input
|
|
}
|
|
|
|
resource "test_resource" "resource" {
|
|
value = local.input
|
|
}
|
|
|
|
output "output" {
|
|
value = var.input
|
|
}
|