mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-03 14:00:52 -05:00
This means it's valid to write references like "component.foo" in expressions in a stack configuration, where the result is built from the planned output values of the root module of each component instance. For embedded stacks we intentionally designed the language to require explicit types on all output values so that we'd still be able to do type checking even when we can't calculate the output values yet. Unfortunately we can't do the same trick for components because the main Terraform module language treats output values as dynamically-typed and so an output value we can't evaluate yet could have literally any type. Therefore we concede and just return cty.DynamicVal in most failure cases here; perhaps a future edition of the main Terraform language can improve this by requiring explicitly-typed output values there too. |
||
|---|---|---|
| .. | ||
| test | ||
| README.md | ||
| terraform-sources.json | ||
Synthetic source bundle for most tests
Since the tests in this package are concerned primilary with configuration evaluation and less concerned about configuration bundling or loading, most of our tests can just use subdirectories of the only package in this synthetic source bundle to avoid the inconvenience of maintaining an entire source bundle for each separate test.
To use this:
-
Make a subdirectory under
test/with a name that's related to your test case(s). -
Use the
loadMainBundleConfigForTesthelper, passing the name of your test directory as the source directory.(The helper function will automatically construct the synthetic remote source address needed to locate that subdirectory within the source bundle.)