Skip to content

Azure Web and Function App + Managed Identities Fixes - #119

Merged
paolosalvatori merged 6 commits into
mainfrom
samples-fixes-september-2026
Sep 7, 2026
Merged

Azure Web and Function App + Managed Identities Fixes#119
paolosalvatori merged 6 commits into
mainfrom
samples-fixes-september-2026

Conversation

@paolosalvatori

Copy link
Copy Markdown
Contributor

Motivation

This pull requests introduces a few fixes for the function-app-managed-identity and web-app-managed-identity samples.

Changes

This pull requests introduces the following changes:

  • A new validate.sh script for the function-app-managed-identity sample.
  • README.md files in the function-app-managed-identity sample reflects changes to the validate.sh file.
  • Bumped up Python version in both Terraform samples from 3.12 to 3.13 now that we switched to azurem version 5.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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_version from 3.12 to 3.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.

Comment thread samples/web-app-managed-identity/python/terraform/variables.tf
Comment thread samples/function-app-managed-identity/python/bicep/README.md Outdated
Comment thread samples/function-app-managed-identity/python/scripts/README.md Outdated
Comment thread samples/function-app-managed-identity/python/scripts/validate.sh Outdated
Comment thread samples/function-app-managed-identity/python/terraform/README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
paolosalvatori and others added 3 commits September 7, 2026 09:53
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>
@paolosalvatori

Copy link
Copy Markdown
Contributor Author

@DrisDary / @bryansan-local I removed the code that pins the version of Azure CLI to version azure-cli=2.88.0-1~jammy. We rather need to fix the code of the emulator for Azure Database for MySQL flexible server.

@bryansan-local

bryansan-local commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@DrisDary / @bryansan-local I removed the code that pins the version of Azure CLI to version azure-cli=2.88.0-1~jammy. We rather need to fix the code of the emulator for Azure Database for MySQL flexible server.

@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

@DrisDary

DrisDary commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@DrisDary / @bryansan-local I removed the code that pins the version of Azure CLI to version azure-cli=2.88.0-1~jammy. We rather need to fix the code of the emulator for Azure Database for MySQL flexible server.

The new cli is now 2.90.0 so if there was a bug in 2.88.0 lets hope its gone.

@paolosalvatori

Copy link
Copy Markdown
Contributor Author

@bryansan-local / @DrisDary I already used Claude to look at the issue. You find the analysis in the agenda of today's standup call. 🙂

@DrisDary DrisDary left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants