mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-22 18:33:08 -04:00
* terraform test: move variable evaluation into the terraform test graph * make copyrightfix
31 lines
547 B
HCL
31 lines
547 B
HCL
|
|
variable "input_one" {
|
|
type = string
|
|
default = "hello"
|
|
}
|
|
|
|
variable "input_two" {
|
|
type = string
|
|
default = "world" // we will override this an external value
|
|
}
|
|
|
|
variables {
|
|
value = "${var.input_two}_more"
|
|
}
|
|
|
|
run "test" {
|
|
assert {
|
|
condition = test_resource.resource.value == "hello - universe"
|
|
error_message = "bad concatenation"
|
|
}
|
|
}
|
|
|
|
run "nested_ref" {
|
|
variables {
|
|
input_two = var.value
|
|
}
|
|
assert {
|
|
condition = test_resource.resource.value == "hello - universe_more"
|
|
error_message = "bad concatenation"
|
|
}
|
|
}
|