You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/command/testdata/test/default_optional_values/main.tftest.hcl

47 lines
894 B

run "stacked" {
variables {
input = {
required = "required"
optional = "optional"
default = "overridden"
}
}
assert {
condition = output.computed == "overridden"
error_message = "did not override default value"
}
}
run "defaults" {
assert {
condition = output.computed == "default"
error_message = "didn't set default value"
}
}
run "default_matches_last_output" {
assert {
condition = var.input == run.defaults.input
error_message = "output of last should match input of this"
}
}
run "custom_defined_apply_defaults" {
variables {
input = {
required = "required"
}
}
assert {
condition = output.computed == "default"
error_message = "didn't set default value"
}
assert {
condition = var.input == run.defaults.input
error_message = "output of last should match input of this"
}
}