Closed thuandt closed 2 years ago
Don't believe the example specifies the usage of the tfvars
file. Suppose to specify tfvars files explicitly by design so you can use different tfvars in the test harness if needed. Here's an example repo:
test.tfvars
is actually used.
terraspace.build_test_harness(
name: "example-harness",
modules: {example: mod_path},
# See: https://terraspace.cloud/docs/testing/test-harness/
# config: "spec/fixtures/config",
tfvars: {demo: "spec/fixtures/tfvars/test.tfvars"}, # <-- Make sure to have this
)
Also covered in docs: https://terraspace.cloud/docs/testing/stack/
Checklist
My Environment
Expected Behaviour
spec/fixtures/tfvars/demo.tfvars
forterraspace test
at module levelCurrent Behavior
terraspace test
run init, plan and apply without usingdemo.tfvars
tfvars
file! as input forterraspace test
Step-by-step reproduction instructions
spec/fixtures/tfvars/demo.tfvars
with input for this variable.terraspace test
Code Sample
Solution Suggestion
NA