This function finds all variables in all modules in the Terraform configuration of the current plan's workspace using the tfconfig/v2 import.
Calling it is equivalent to referencing tfconfig.variables
. It is included so that policies that use the tfconfig-functions.sentinel module do not need to import both it and the tfconfig/v2 module.
This function is contained in the tfconfig-functions.sentinel module.
find_all_variables = func()
None
None
This function returns a single flat map of all variables indexed by the address of the variable's module and its name. The map actually is identical to the tfconfig.variables
collection.
This function does not print anything.
Here is an example of calling this function, assuming that the tfconfig-functions.sentinel file that contains it has been imported with the alias config
:
allVariables = config.find_all_variables()