-
Notifications
You must be signed in to change notification settings - Fork 449
Getting started Get module cross references
The 'Get-CrossReferencedModuleList'
function helps you with discovering cross-modules references. It checks for any module references in a given path. This can be useful to determine which modules' folder you'd need to keep in case you'd only want to cherry-pick certain modules from the library.
You can find the script under 'utilities/tools/Get-CrossReferencedModuleList.ps1'
.
When invoking the script:
- The function fetches all references implemented in the modules in a given path.
- The function groups them into the '<ProviderNameSpace>/<ResourceType>' hierarchy by type:
- Resource (API) deployments
- Local module (file) references
- Remote module references (e.g., Bicep Registry / Template Specs)
Note: The function collects the information recursively. That means, if module
A
has a dependency on moduleB
, and Module B a dependency on moduleC
, than A will show a dependency on bothB
&C
(i.e., it is transitive).
Note: If you provide the
-Verbose
switch, the function further prints all local module references to the terminal
Note: The script must be loaded ('dot-sourced') before the function can be invoked.
For details on how to use the function, please refer to the script's local documentation.
VERBOSE: The modules in path [ResourceModules\modules] have the following local folder references:
VERBOSE:
VERBOSE: Resource: Microsoft.ApiManagement/service
VERBOSE: - Microsoft.ApiManagement/authorizationServers
VERBOSE:
VERBOSE: Resource: Microsoft.ContainerRegistry/registries
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Web/sites
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.EventHub/namespaces
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.MachineLearningServices/workspaces
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Network/bastionHosts
VERBOSE: - Microsoft.Network/publicIPAddresses
VERBOSE:
VERBOSE: Resource: Microsoft.Sql/servers
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Insights/privateLinkScopes
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Web/staticSites
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Storage/storageAccounts
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Automation/automationAccounts
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.ServiceBus/namespaces
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Compute/virtualMachines
VERBOSE: - Microsoft.RecoveryServices/vaults/protectionContainers/protectedItems
VERBOSE: - Microsoft.Network/publicIPAddresses
VERBOSE: - Microsoft.Network/networkInterfaces
VERBOSE:
VERBOSE: Resource: Microsoft.CognitiveServices/accounts
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.Synapse/privateLinkHubs
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.AppConfiguration/configurationStores
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.EventGrid/topics
VERBOSE: - Microsoft.Network/privateEndpoints
VERBOSE:
VERBOSE: Resource: Microsoft.KeyVault/vaults
VERBOSE: - Microsoft.Network/privateEndpoints