mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Allow referencing output from test run in local variables block (tofu test) (#1254)
Signed-off-by: siddharthasonker95 <158144589+siddharthasonker95@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e21a14fb0c
commit
accfe1c412
4
internal/command/testdata/test/pass_with_local_variable/main.tf
vendored
Normal file
4
internal/command/testdata/test/pass_with_local_variable/main.tf
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
output "foo" {
|
||||
description = "Output"
|
||||
value = "bar"
|
||||
}
|
||||
15
internal/command/testdata/test/pass_with_local_variable/tests/test.tftest.hcl
vendored
Normal file
15
internal/command/testdata/test/pass_with_local_variable/tests/test.tftest.hcl
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
run "first" {
|
||||
command = apply
|
||||
}
|
||||
|
||||
run "second" {
|
||||
command = plan
|
||||
|
||||
module {
|
||||
source = "./tests/testmodule"
|
||||
}
|
||||
|
||||
variables {
|
||||
foo = run.first.foo
|
||||
}
|
||||
}
|
||||
3
internal/command/testdata/test/pass_with_local_variable/tests/testmodule/main.tf
vendored
Normal file
3
internal/command/testdata/test/pass_with_local_variable/tests/testmodule/main.tf
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
variable "foo" {
|
||||
type = string
|
||||
}
|
||||
Reference in New Issue
Block a user