terraform/internal/command/testdata/test/shared_state/main.tftest.hcl
Liam Cervante 9742f22c4e
Introduce 'run' keyword for referencing outputs from earlier run blocks (#33683)
* introduce 'run' keyword for referencing outputs from earlier run blocks

* fix code consistency
2023-08-16 11:06:00 +02:00

37 lines
448 B
HCL

variables {
foo = "foo"
}
run "setup" {
module {
source = "./setup"
}
variables {
input = "foo"
}
assert {
condition = output.value == var.foo
error_message = "bad"
}
}
run "test" {
variables {
input = run.setup.value
}
assert {
condition = output.value == var.foo
error_message = "double bad"
}
assert {
condition = run.setup.value == var.foo
error_message = "triple bad"
}
}