Azure Web and Function App + Managed Identities Fixes - #119
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are newly introduced script/documentation correctness issues (including a potential name/resource-group mismatch in call-web-app.sh and mismatched validation messaging/docs) that should be fixed to avoid misleading or failing sample usage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Azure web-app-managed-identity and function-app-managed-identity samples to align naming/configuration across scripts and IaC, improve validation guidance, and bump the Python runtime used by the Terraform sample defaults.
Changes:
- Bump Terraform sample
python_versionfrom3.12to3.13(and expand allowed versions in validation lists). - Normalize resource group naming across scripts/docs to
${PREFIX}-rg. - Add/refresh validation and helper scripts (notably a new
call-web-app.sh) and update README snippets accordingly.
File summaries
| File | Description |
|---|---|
| samples/web-app-managed-identity/python/terraform/variables.tf | Expands allowed Python versions for the App Service stack variable validation. |
| samples/web-app-managed-identity/python/terraform/terraform.tfvars | Sets the sample’s Python runtime to 3.13. |
| samples/web-app-managed-identity/python/terraform/README.md | Updates Terraform sample documentation snippet(s) for revised variables. |
| samples/web-app-managed-identity/python/terraform/providers.tf | Minor HCL formatting update for provider configuration. |
| samples/web-app-managed-identity/python/terraform/deploy.sh | Changes default managed identity type used by the Terraform deployment script. |
| samples/web-app-managed-identity/python/scripts/validate.sh | Updates resource group naming used by the validation script. |
| samples/web-app-managed-identity/python/scripts/user-assigned.sh | Updates resource group naming used by the user-assigned deployment script. |
| samples/web-app-managed-identity/python/scripts/system-assigned.sh | Updates resource group naming used by the system-assigned deployment script. |
| samples/web-app-managed-identity/python/scripts/README.md | Updates script README snippet(s) for revised variables. |
| samples/web-app-managed-identity/python/scripts/call-web-app.sh | Adds a helper to call the deployed web app via multiple routes (proxy/container/host). |
| samples/web-app-managed-identity/python/bicep/README.md | Updates Bicep sample documentation snippet(s) for revised variables. |
| samples/web-app-managed-identity/python/bicep/deploy.sh | Updates resource group naming used by the Bicep deployment script. |
| samples/function-app-managed-identity/python/terraform/variables.tf | Expands allowed Python versions for the Functions app stack variable validation. |
| samples/function-app-managed-identity/python/terraform/terraform.tfvars | Sets the sample’s Python runtime to 3.13. |
| samples/function-app-managed-identity/python/terraform/README.md | Updates Terraform validation snippet content. |
| samples/function-app-managed-identity/python/scripts/validate.sh | Reworks validation script content/variables for post-deploy checks. |
| samples/function-app-managed-identity/python/scripts/user-managed-identity.sh | Updates runtime version used by the user-managed identity script. |
| samples/function-app-managed-identity/python/scripts/system-managed-identity.sh | Updates runtime version used by the system-managed identity script. |
| samples/function-app-managed-identity/python/scripts/README.md | Updates script README validation snippet content. |
| samples/function-app-managed-identity/python/bicep/README.md | Updates Bicep README validation snippet content. |
| samples/function-app-managed-identity/python/bicep/deploy.sh | Updates resource group naming used by the Bicep deployment script. |
Review details
- Files reviewed: 19/21 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@DrisDary / @bryansan-local I removed the code that pins the version of Azure CLI to version |
@paolosalvatori, as far as I remember the version was pinned because there was a bug on the cli side which broke the properties field of the firewall endpoint in mysql. Hopefully it is fixed already so we can unpin the version |
The new cli is now 2.90.0 so if there was a bug in 2.88.0 lets hope its gone. |
|
@bryansan-local / @DrisDary I already used Claude to look at the issue. You find the analysis in the agenda of today's standup call. 🙂 |
Motivation
This pull requests introduces a few fixes for the
function-app-managed-identityandweb-app-managed-identitysamples.Changes
This pull requests introduces the following changes:
validate.shscript for thefunction-app-managed-identitysample.README.mdfiles in thefunction-app-managed-identitysample reflects changes to thevalidate.shfile.3.12to3.13now that we switched toazuremversion5.1.0.Tests
Script, Bicep, and Terraform tests were successfully tested locally.
Related
This updates were conducted as a follow up of the #8710 PR that improves Azure managed identities support and implementation.