This function finds all provisioners 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.provisioners
. 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_provisioners = func()
None
None
This function returns a single flat map of all provisioners indexed by the address of the resource the provisioner is attached to and the provisioner's own index within that resource's provisioners. The map actually is identical to the tfconfig.provisioners
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
:
allProvisioners = config.find_all_provisioners()
This function is used by the prohibited-provisioners.sentinel (Cloud Agnostic) and allowed-provisioners.sentinel (Cloud Agnostic) policies.