Skip to content

chore: Update Bicep modules and resource versions across the infrastructure#415

Merged
Roopan-Microsoft merged 3 commits intodevfrom
pk-bicep-avm-module-version
Apr 21, 2026
Merged

chore: Update Bicep modules and resource versions across the infrastructure#415
Roopan-Microsoft merged 3 commits intodevfrom
pk-bicep-avm-module-version

Conversation

@Pavan-Microsoft
Copy link
Copy Markdown
Contributor

@Pavan-Microsoft Pavan-Microsoft commented Apr 20, 2026

Purpose

This pull request updates the infra/main.bicep file with a range of improvements and dependency upgrades, focusing on modernizing resource definitions, updating module versions, and refining configuration logic for Azure infrastructure deployment. The main themes are module version upgrades for improved features and compatibility, parameter and property adjustments for correctness, and code clean-up for maintainability.

Module Version Upgrades and Dependency Updates:

  • Updated multiple module versions (e.g., managed-identity, operational-insights/workspace, insights/component, private-dns-zone, bastion-host, virtual-machine, container-app, etc.) to their latest releases, ensuring access to new features, bug fixes, and improved compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Resource API Version and Property Adjustments:

  • Upgraded resource API versions for Microsoft.Resources/tags, Microsoft.Resources/deployments, and Microsoft.OperationalInsights/workspaces to the latest supported versions, and updated related resource property references for compliance and future-proofing. [1] [2] [3]
  • Changed Log Analytics workspace dailyQuotaGb property to a string value for compatibility with WAF recommendations.
  • Replaced deprecated or incorrect property names (e.g., zonesavailabilityZones in Bastion Host public IP configuration).

Configuration and Logic Improvements:

  • Improved handling of nullable or optional outputs and parameters using the safe navigation operator (!) to prevent runtime errors when referencing module outputs. [1] [2] [3] [4]
  • Refined logic for Log Analytics and Application Insights resource IDs, keys, and connection strings to ensure correct assignment based on whether existing resources are used. [1] [2]

Parameter and Output Clean-up:

  • Removed unused parameters such as aiModelDeployments and unnecessary properties from AI Foundry module configuration for a cleaner and more maintainable template. [1] [2]
  • Updated output values to use environment-specific suffixes and safe navigation for improved correctness (e.g., AZURE_BLOB_ENDPOINT). [1] [2]

General Code Maintenance:

  • Improved conditional logic and default value handling throughout the template, such as using explicit nulls and updated ternary expressions for resource properties and parameters. [1] [2] [3]

These changes collectively modernize the infrastructure codebase, improve reliability, and ensure better alignment with Azure best practices.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

- Updated resource group tags API version from 2021-04-01 to 2025-04-01.
- Updated AVM telemetry resource API version from 2024-03-01 to 2025-04-01.
- Upgraded managed identity module version from 0.4.2 to 0.5.0.
- Updated existing Log Analytics workspace API version from 2020-08-01 to 2025-07-01.
- Upgraded Log Analytics workspace module version from 0.12.0 to 0.15.0.
- Updated Application Insights module version from 0.7.0 to 0.7.1.
- Upgraded private DNS zones module version from 0.8.0 to 0.8.1.
- Updated Bastion Host module version from 0.8.0 to 0.8.2.
- Upgraded maintenance configuration module version from 0.3.2 to 0.4.0.
- Updated Windows VM data collection rules module version from 0.8.0 to 0.11.0.
- Upgraded virtual machine module version from 0.20.0 to 0.22.0.
- Updated Cognitive Services account API version from 2025-07-01-preview to 2026-03-01.
- Upgraded Cognitive Services deployments API version from 2024-10-01 to 2026-03-01.
- Updated private endpoint module version from 0.11.1 to 0.12.0.
- Updated Azure Container Registry API version from 2023-07-01 to 2025-11-01.
- Upgraded managed environment module version from 0.11.3 to 0.13.1.
- Updated container app backend module version from 0.19.0 to 0.22.0.
- Upgraded container app frontend module version from 0.19.0 to 0.22.0.
- Updated various imports in AI Foundry modules to use avm-common-types version 0.7.0.
- Updated Key Vault export module API version from 2025-05-01 to 2026-02-01.
- Upgraded Cosmos DB module version from 0.18.0 to 0.19.0.
- Updated storage account module version from 0.28.0 to 0.32.0.
- Upgraded network security group module version from 0.5.2 to 0.5.3.
- Updated virtual network module version from 0.7.1 to 0.8.0.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the Azure infrastructure Bicep templates by upgrading AVM module versions and several resource API versions, while also refining parameter/output handling to better support WAF/private-networking scenarios and multi-cloud suffix compatibility.

Changes:

  • Upgraded numerous AVM modules (networking, monitoring, compute, container apps, storage, MI, etc.) and some ARM resource API versions.
  • Refined template wiring and outputs (e.g., storage endpoint suffix, Bastion public IP zone property changes, non-null assertions for conditional modules).
  • Cleaned up parameters and adjusted monitoring/logging configuration behaviors (e.g., LAW quota type change, container apps env log config changes).

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
infra/main.bicep Primary infra template: module/API upgrades, monitoring/private networking refinements, output updates, parameter cleanup.
infra/main_custom.bicep Custom main template: aligns many module/API upgrades with main template (but needs a Bastion param follow-up).
infra/modules/virtualNetwork.bicep Updates AVM VNet/NSG module versions.
infra/modules/storageAccount.bicep Updates storage account module + AVM common types import version.
infra/modules/keyVault.bicep Updates AVM common types import version.
infra/modules/cosmosDb.bicep Updates AVM common types import version, Cosmos module version, and SQL role definition API version.
infra/modules/ai-foundry/aifoundry.bicep Updates common types imports, Cognitive Services API versions, and output/null-assertion handling; removes some parameters.
infra/modules/ai-foundry/dependencies.bicep Updates common types imports, Cognitive Services/deployments API versions, private-endpoint module version, and output null assertions.
infra/modules/ai-foundry/project.bicep Updates Cognitive Services/projects API versions and hardens conditional output access with non-null assertion.
infra/modules/ai-foundry/keyVaultExport.bicep Updates common types imports and Key Vault API versions for vault/secrets.
infra/modules/ai-foundry/ai-services.bicep Updates common types imports and Cognitive Services/deployments API versions; updates header comment (needs minor fix).
infra/samples/network/virtualNetwork.bicep Updates sample AVM module versions for NSG and VNet.
infra/samples/network/jumpbox.bicep Updates sample AVM module versions for NSG/subnet/VM.
infra/samples/network/bastionHost.bicep Updates sample AVM module versions for NSG/subnet/Bastion (but needs a Bastion param follow-up).
infra/samples/network-subnet-design.bicep Updates sample Log Analytics workspace module version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/samples/network/bastionHost.bicep
Comment thread infra/main_custom.bicep
Comment thread infra/modules/ai-foundry/ai-services.bicep Outdated
Comment thread infra/main.bicep
…n.waf.parameters.json; update AVM module version comment in ai-services.bicep; fix availabilityZones property in bastionHost.bicep
@Roopan-Microsoft Roopan-Microsoft merged commit c00e0be into dev Apr 21, 2026
8 checks passed
@Pavan-Microsoft Pavan-Microsoft deleted the pk-bicep-avm-module-version branch April 23, 2026 05:09
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.

3 participants