Support for additional PowerShell modules in managedDependency besides core Az
There are modules for managing Azure components outside core Az module, for example Az.Security, Az.Blueprint. Other 3rd party modules could be used within the function, e.g. AzSK.
Current way how to use these modules is to package them with function code inside special /Modules folder. For Azure modules outside core Az module, customer has to manage dependency on core Az module. Azure Functions PowerShell runtime and Az module gets updated without user consent so this can bring breaking changes each time, thus runtime is very fragile.
Proposed solution to this:
- allow users to pin to specific versions of core Az module and other modules in ManagedDependency
- add support for additional modules and autodownload them as part of ManagedDependency functionality
I personally switched to using raw REST APIs within the function rather then managing dependency on core Az module and maintaining additional modules.
This is available as part of PowerShell support general availability. You can see an example of this on https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell#dependency-management where you can specify any module on the gallery as well as pin to specific versions