Azure / Azure/PSRule.Rules.Azure
Upgrade PowerShell Functions to 7.2 or greater
- Dominant language
- PowerShell
- Stars
- 447
- Forks
- 109
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 23
Description
# Rule request
## Suggested rule change
Add a new rule `Azure.Function.PowerShellVersion` to configure a minimum version of PowerShell with Azure Functions. Also host version `~4` is required.
Only applies to Azure Functions sites with:
- `FUNCTIONS_WORKER_RUNTIME` set to `powershell`
The selector `Azure.AppService.IsFunctionApp` can be used to only target function apps.
Rule recommendation will be similar to:
- https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.NETVersion/
- https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.AppService.PHPVersion/
## Applies to the following
The rule applies to the following:
- Resource type: **Microsoft.Web/sites** and **Microsoft.Web/sites/slots**
## Additional context
- [Upgrading your Azure Function Apps to run on PowerShell 7.2](https://github.com/Azure/azure-functions-powershell-worker/wiki/Upgrading-your-Azure-Function-Apps-to-run-on-PowerShell-7.2)
Contributor guide
Assessment
This issue has not been assessed yet.