github.com/opentofu/opentofu@v1.7.1/internal/command/testdata/test/with_provider_alias/main.tftest.hcl (about) 1 provider "test" { 2 data_prefix = "data" 3 resource_prefix = "resource" 4 } 5 6 provider "test" { 7 alias = "setup" 8 9 # The setup provider will write into the main providers data sources. 10 resource_prefix = "data" 11 } 12 13 variables { 14 managed_id = "B853C121" 15 } 16 17 run "setup" { 18 module { 19 source = "./setup" 20 } 21 22 variables { 23 value = "Hello, world!" 24 id = "B853C121" 25 } 26 27 providers = { 28 test = test.setup 29 } 30 } 31 32 run "test" { 33 assert { 34 condition = test_resource.created.value == "Hello, world!" 35 error_message = "bad value" 36 } 37 }