This function finds all managed resources in all modules in the Terraform configuration of the current plan's workspace using the tfconfig/v2 import.
Calling it is equivalent to filtering tfconfig.resources
to those with mode
equal to managed
, which indicates that they are managed resources rather than data sources.
This function is contained in the tfconfig-functions.sentinel module.
find_all_resources = func()
None
None
This function returns a single flat map of managed resources indexed by the complete addresses of the resources (excluding indices representing their counts). The map actually contains all managed resources from the tfconfig.resources
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
:
allResources = config.find_all_resources()
This function is used by the prohibited-resources.sentinel (Cloud Agnostic) and allowed-resources.sentinel (Cloud Agnostic) policies.