Skip to content

Commit e60088d

Browse files
Merge pull request #950 from microsoft/update-AVM-module
fix: Update avm module and Microsoft APIs version
2 parents 68e8a34 + 372d763 commit e60088d

9 files changed

Lines changed: 21157 additions & 11468 deletions

infra/main.bicep

Lines changed: 33 additions & 34 deletions
Large diffs are not rendered by default.

infra/main.json

Lines changed: 21057 additions & 11366 deletions
Large diffs are not rendered by default.

infra/main_custom.bicep

Lines changed: 34 additions & 35 deletions
Large diffs are not rendered by default.

infra/modules/ai-project.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ param aiServicesName string
1414
param tags object = {}
1515

1616
// Reference to cognitive service in current resource group for new projects
17-
resource cogServiceReference 'Microsoft.CognitiveServices/accounts@2025-06-01' existing = {
17+
resource cogServiceReference 'Microsoft.CognitiveServices/accounts@2025-12-01' existing = {
1818
name: aiServicesName
1919
}
2020

21-
resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-06-01' = {
21+
resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-12-01' = {
2222
parent: cogServiceReference
2323
name: name
2424
tags: tags

infra/modules/ai-services-deployments.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { deploymentType } from 'br:mcr.microsoft.com/bicep/avm/res/cognitive-ser
2727
@description('Optional. Array of deployments about cognitive service accounts to create.')
2828
param deployments deploymentType[]?
2929

30-
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
30+
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.7.0'
3131
@description('Optional. Array of role assignments to create.')
3232
param roleAssignments roleAssignmentType[]?
3333

@@ -156,12 +156,12 @@ var formattedRoleAssignments = [
156156
})
157157
]
158158

159-
resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-06-01' existing = {
159+
resource cognitiveService 'Microsoft.CognitiveServices/accounts@2025-12-01' existing = {
160160
name: name
161161
}
162162

163163
@batchSize(1)
164-
resource cognitiveService_deployments 'Microsoft.CognitiveServices/accounts/deployments@2024-10-01' = [
164+
resource cognitiveService_deployments 'Microsoft.CognitiveServices/accounts/deployments@2025-12-01' = [
165165
for (deployment, index) in (deployments ?? []): {
166166
parent: cognitiveService
167167
name: deployment.?name ?? '${name}-deployments'

infra/modules/aifp-connections.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ param aiFoundryName string
1616
@description('Name of the AI Foundry project')
1717
param aiFoundryProjectName string
1818

19-
resource aiSearchFoundryConnection 'Microsoft.CognitiveServices/accounts/projects/connections@2025-04-01-preview' = {
19+
resource aiSearchFoundryConnection 'Microsoft.CognitiveServices/accounts/projects/connections@2025-12-01' = {
2020
name: '${aiFoundryName}/${aiFoundryProjectName}/${aifSearchConnectionName}'
2121
properties: {
2222
category: 'CognitiveSearch'

infra/modules/virtualNetwork.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ param resourceSuffix string
234234
// https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/network/network-security-group
235235

236236
@batchSize(1)
237-
module nsgs 'br/public:avm/res/network/network-security-group:0.5.1' = [
237+
module nsgs 'br/public:avm/res/network/network-security-group:0.5.3' = [
238238
for (subnet, i) in subnets: if (!empty(subnet.?networkSecurityGroup)) {
239239
name: take('avm.res.network.network-security-group.${subnet.?networkSecurityGroup.name}.${resourceSuffix}', 64)
240240
params: {
@@ -251,7 +251,7 @@ module nsgs 'br/public:avm/res/network/network-security-group:0.5.1' = [
251251
// using AVM Virtual Network module
252252
// https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/network/virtual-network
253253

254-
module virtualNetwork 'br/public:avm/res/network/virtual-network:0.7.0' = {
254+
module virtualNetwork 'br/public:avm/res/network/virtual-network:0.8.0' = {
255255
name: take('avm.res.network.virtual-network.${name}', 64)
256256
params: {
257257
name: name

infra/modules/web-sites.bicep

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ param clientAffinityEnabled bool = true
3636
@description('Optional. The resource ID of the app service environment to use for this resource.')
3737
param appServiceEnvironmentResourceId string?
3838

39-
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
39+
import { managedIdentityAllType } from 'br/public:avm/utl/types/avm-common-types:0.7.0'
4040
@description('Optional. The managed identity definition for this resource.')
4141
param managedIdentities managedIdentityAllType?
4242

@@ -49,20 +49,22 @@ param storageAccountRequired bool = false
4949
@description('Optional. Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.')
5050
param virtualNetworkSubnetId string?
5151

52-
@description('Optional. To enable accessing content over virtual network.')
53-
param vnetContentShareEnabled bool = false
54-
55-
@description('Optional. To enable pulling image over Virtual Network.')
56-
param vnetImagePullEnabled bool = false
52+
type outboundVnetRoutingType = {
53+
allTraffic: bool?
54+
applicationTraffic: bool?
55+
backupRestoreTraffic: bool?
56+
contentShareTraffic: bool?
57+
imagePullTraffic: bool?
58+
}
5759

58-
@description('Optional. Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.')
59-
param vnetRouteAllEnabled bool = false
60+
@description('Optional. Configuration for outbound virtual network routing. Replaces the legacy vnetContentShareEnabled, vnetImagePullEnabled, and vnetRouteAllEnabled properties.')
61+
param outboundVnetRouting outboundVnetRoutingType?
6062

6163
@description('Optional. Stop SCM (KUDU) site when the app is stopped.')
6264
param scmSiteAlsoStopped bool = false
6365

6466
@description('Optional. The site config object. The defaults are set to the following values: alwaysOn: true, minTlsVersion: \'1.2\', ftpsState: \'FtpsOnly\'.')
65-
param siteConfig resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.siteConfig = {
67+
param siteConfig resourceInput<'Microsoft.Web/sites@2025-03-01'>.properties.siteConfig = {
6668
alwaysOn: true
6769
minTlsVersion: '1.2'
6870
ftpsState: 'FtpsOnly'
@@ -72,16 +74,16 @@ param siteConfig resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.site
7274
param configs appSettingsConfigType[]?
7375

7476
@description('Optional. The Function App configuration object.')
75-
param functionAppConfig resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.functionAppConfig?
77+
param functionAppConfig resourceInput<'Microsoft.Web/sites@2025-03-01'>.properties.functionAppConfig?
7678

77-
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
79+
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.7.0'
7880
@description('Optional. Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible.')
7981
param privateEndpoints privateEndpointSingleServiceType[]?
8082

8183
@description('Optional. Tags of the resource.')
8284
param tags object?
8385

84-
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.5.1'
86+
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.7.0'
8587
@description('Optional. The diagnostic settings of the service.')
8688
param diagnosticSettings diagnosticSettingFullType[]?
8789

@@ -105,7 +107,7 @@ Optional. This composes with ClientCertEnabled setting.
105107
param clientCertMode string = 'Optional'
106108

107109
@description('Optional. If specified during app creation, the app is cloned from a source app.')
108-
param cloningInfo resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.cloningInfo?
110+
param cloningInfo resourceInput<'Microsoft.Web/sites@2025-03-01'>.properties.cloningInfo?
109111

110112
@description('Optional. Size of the function container.')
111113
param containerSize int?
@@ -117,7 +119,7 @@ param dailyMemoryTimeQuota int?
117119
param enabled bool = true
118120

119121
@description('Optional. Hostname SSL states are used to manage the SSL bindings for app\'s hostnames.')
120-
param hostNameSslStates resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.hostNameSslStates?
122+
param hostNameSslStates resourceInput<'Microsoft.Web/sites@2025-03-01'>.properties.hostNameSslStates?
121123

122124
@description('Optional. Hyper-V sandbox.')
123125
param hyperV bool = false
@@ -143,7 +145,7 @@ param publicNetworkAccess string?
143145
param e2eEncryptionEnabled bool?
144146

145147
@description('Optional. Property to configure various DNS related settings for a site.')
146-
param dnsConfiguration resourceInput<'Microsoft.Web/sites@2024-04-01'>.properties.dnsConfiguration?
148+
param dnsConfiguration resourceInput<'Microsoft.Web/sites@2025-03-01'>.properties.dnsConfiguration?
147149

148150
@description('Optional. Specifies the scope of uniqueness for the default hostname during resource creation.')
149151
@allowed([
@@ -169,7 +171,7 @@ var identity = !empty(managedIdentities)
169171
}
170172
: null
171173

172-
resource app 'Microsoft.Web/sites@2024-04-01' = {
174+
resource app 'Microsoft.Web/sites@2025-03-01' = {
173175
name: name
174176
location: location
175177
kind: kind
@@ -203,9 +205,7 @@ resource app 'Microsoft.Web/sites@2024-04-01' = {
203205
publicNetworkAccess: !empty(publicNetworkAccess)
204206
? any(publicNetworkAccess)
205207
: (!empty(privateEndpoints) ? 'Disabled' : 'Enabled')
206-
vnetContentShareEnabled: vnetContentShareEnabled
207-
vnetImagePullEnabled: vnetImagePullEnabled
208-
vnetRouteAllEnabled: vnetRouteAllEnabled
208+
outboundVnetRouting: outboundVnetRouting
209209
scmSiteAlsoStopped: scmSiteAlsoStopped
210210
// Always enforce end to end encryption
211211
endToEndEncryptionEnabled: e2eEncryptionEnabled
@@ -224,8 +224,8 @@ module app_config 'web-sites.config.bicep' = [
224224
storageAccountResourceId: config.?storageAccountResourceId
225225
storageAccountUseIdentityAuthentication: config.?storageAccountUseIdentityAuthentication
226226
properties: config.?properties
227-
currentAppSettings: config.?retainCurrentAppSettings ?? true && config.name == 'appsettings'
228-
? list('${app.id}/config/appsettings', '2023-12-01').properties
227+
currentAppSettings: (config.?retainCurrentAppSettings ?? true) && config.name == 'appsettings'
228+
? list('${app.id}/config/appsettings', '2025-03-01').properties
229229
: {}
230230
}
231231
}
@@ -261,7 +261,7 @@ resource app_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-0
261261
}
262262
]
263263

264-
module app_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.11.0' = [
264+
module app_privateEndpoints 'br/public:avm/res/network/private-endpoint:0.12.0' = [
265265
for (privateEndpoint, index) in (privateEndpoints ?? []): {
266266
name: '${uniqueString(deployment().name, location)}-app-PrivateEndpoint-${index}'
267267
scope: resourceGroup(

infra/modules/web-sites.config.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing
6565
scope: resourceGroup(split(applicationInsightResourceId!, '/')[2], split(applicationInsightResourceId!, '/')[4])
6666
}
6767

68-
resource storageAccount 'Microsoft.Storage/storageAccounts@2024-01-01' existing = if (!empty(storageAccountResourceId)) {
68+
resource storageAccount 'Microsoft.Storage/storageAccounts@2025-08-01' existing = if (!empty(storageAccountResourceId)) {
6969
name: last(split(storageAccountResourceId!, '/'))
7070
scope: resourceGroup(split(storageAccountResourceId!, '/')[2], split(storageAccountResourceId!, '/')[4])
7171
}
7272

73-
resource app 'Microsoft.Web/sites@2023-12-01' existing = {
73+
resource app 'Microsoft.Web/sites@2025-03-01' existing = {
7474
name: appName
7575
}
7676

77-
resource config 'Microsoft.Web/sites/config@2024-04-01' = {
77+
resource config 'Microsoft.Web/sites/config@2025-03-01' = {
7878
parent: app
7979
#disable-next-line BCP225
8080
name: name

0 commit comments

Comments
 (0)