mirror of https://github.com/hashicorp/terraform
When handling root input variable values, we now consider unset and null values to be equivalent to each other. This is consistent with how we handle variables in embedded stacks, and very similar to how we handle variable in the modules runtime with `nullable = false`. One difference from the modules runtime case is that we do not prevent a null default value for stack variables.pull/34765/head
parent
0fe26468cd
commit
f3ec86b17b
@ -0,0 +1,9 @@
|
||||
variable "boop" {
|
||||
type = string
|
||||
default = "BOOP"
|
||||
}
|
||||
|
||||
output "result" {
|
||||
type = string
|
||||
value = var.boop
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
deployment "main" {
|
||||
inputs = {}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
variable "beep" {
|
||||
type = string
|
||||
default = "BEEP"
|
||||
}
|
||||
|
||||
output "beep" {
|
||||
type = string
|
||||
value = var.beep
|
||||
}
|
||||
|
||||
stack "specified" {
|
||||
source = "./child"
|
||||
inputs = {
|
||||
boop = var.beep
|
||||
}
|
||||
}
|
||||
|
||||
stack "defaulted" {
|
||||
source = "./child"
|
||||
inputs = {}
|
||||
}
|
||||
|
||||
output "specified" {
|
||||
type = string
|
||||
value = stack.specified.result
|
||||
}
|
||||
|
||||
output "defaulted" {
|
||||
type = string
|
||||
value = stack.defaulted.result
|
||||
}
|
||||
Loading…
Reference in new issue