Closed aidanSoles closed 5 years ago
This issue is also mentioned here: https://github.com/hashicorp/terraform-guides/issues/64
The 0.8.0 release allows the module(...)
functionality to be mocked, so it can now be worked around (whereas there was no straightforward workaround before). The ideal workflow (IMO) would be to mimic the data format that exists in TFE and have the module(...)
call act as it does in TFE, instead of having to mock the module(...)
function and the data.
Per the docs here:
This is a huge limitation when using
sentinel test
because the call tomodule()
only works when policies are run in TFE.module()
calls don't work locally, even if the local testing data is formatted to match the structure of thetfplan
data in TFE.So, as it stands, a policy can't be reliably written using the Sentinel simulator and local test data, then picked up and dropped in to TFE as is because the call to
module()
doesn't exist in both environments--which is the ideal workflow.