Hello Khalid Hajjouji •,
1. Provisioning Multiple Functions:
Azure Function App is a container for multiple functions.
Terraform doesn’t define individual functions.
Use zip deployment with multiple function folders inside one .zip
file.
Set WEBSITE_RUN_FROM_PACKAGE
to deploy the zip.
2. Setting Stack to PowerShell:
Set FUNCTIONS_WORKER_RUNTIME = "powershell"
in app_settings
.
Use site_config
→ application_stack
to specify PowerShell version.
Ensure os_type = "windows"
and functions_extension_version = "~4"
.
`app_settings = { FUNCTIONS_WORKER_RUNTIME = "powershell" WEBSITE_RUN_FROM_PACKAGE = "<zip URL or 1>" }
site_config { application_stack { powershell_core_version = "7.2" } }`