Skip to content

Commit ecc6b36

Browse files
committed
update api versions in Bicep files
1 parent ce24c61 commit ecc6b36

68 files changed

Lines changed: 218 additions & 218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

articles/azure-resource-manager/bicep/bicep-functions-any.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The value in a form that's compatible with any data type in Bicep.
3838
The following example shows how to use the Bicep `any()` function to provide numeric values as strings.
3939

4040
```bicep
41-
resource wpAci 'Microsoft.ContainerInstance/containerGroups@2023-05-01' = {
41+
resource wpAci 'Microsoft.ContainerInstance/containerGroups@2025-09-01' = {
4242
name: 'wordpress-containerinstance'
4343
location: location
4444
properties: {

articles/azure-resource-manager/bicep/bicep-functions-array.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ param dnsServers array = []
209209
210210
...
211211
212-
resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
212+
resource vnet 'Microsoft.Network/virtualNetworks@2025-01-01' = {
213213
name: vnetName
214214
location: location
215215
properties: {
@@ -652,7 +652,7 @@ param availabilityZones array = [
652652
'2'
653653
]
654654
655-
resource exampleApim 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
655+
resource exampleApim 'Microsoft.ApiManagement/service@2024-10-01-preview' = {
656656
name: apiManagementName
657657
location: location
658658
sku: {
@@ -802,15 +802,15 @@ The following example is extracted from a quickstart template, [Two VMs in VNET
802802
...
803803
var numberOfInstances = 2
804804
805-
resource networkInterface 'Microsoft.Network/networkInterfaces@2023-11-01' = [for i in range(0, numberOfInstances): {
805+
resource networkInterface 'Microsoft.Network/networkInterfaces@2025-01-01' = [for i in range(0, numberOfInstances): {
806806
name: '${networkInterfaceName}${i}'
807807
location: location
808808
properties: {
809809
...
810810
}
811811
}]
812812
813-
resource vm 'Microsoft.Compute/virtualMachines@2024-03-01' = [for i in range(0, numberOfInstances): {
813+
resource vm 'Microsoft.Compute/virtualMachines@2025-04-01' = [for i in range(0, numberOfInstances): {
814814
name: '${vmNamePrefix}${i}'
815815
location: location
816816
properties: {

articles/azure-resource-manager/bicep/bicep-functions-date.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ var startTime = dateTimeAdd(baseTime, 'PT1H')
7979
8080
...
8181
82-
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2023-11-01' = {
83-
name: concat(omsAutomationAccountName, '/', scheduleName)
82+
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2024-10-23' = {
83+
name: '${omsAutomationAccountName}/${scheduleName}'
8484
properties: {
8585
description: 'Demo Scheduler'
8686
startTime: startTime
@@ -232,7 +232,7 @@ The next example shows how to use a value from the function when setting a tag v
232232
param utcShort string = utcNow('d')
233233
param rgName string
234234
235-
resource myRg 'Microsoft.Resources/resourceGroups@2024-03-01' = {
235+
resource myRg 'Microsoft.Resources/resourceGroups@2025-04-01' = {
236236
name: rgName
237237
location: 'westeurope'
238238
tags: {

articles/azure-resource-manager/bicep/bicep-functions-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ param location string = resourceGroup().location
132132
133133
var nsgconfig = loadJsonContent('nsg-security-rules.json')
134134
135-
resource newNSG 'Microsoft.Network/networkSecurityGroups@2023-11-01' = {
135+
resource newNSG 'Microsoft.Network/networkSecurityGroups@2025-01-01' = {
136136
name: 'example-nsg'
137137
location: location
138138
properties: {
@@ -201,7 +201,7 @@ param location string = resourceGroup().location
201201

202202
var nsgconfig = loadYamlContent('nsg-security-rules.yaml')
203203

204-
resource newNSG 'Microsoft.Network/networkSecurityGroups@2023-11-01' = {
204+
resource newNSG 'Microsoft.Network/networkSecurityGroups@2025-01-01' = {
205205
name: 'example-nsg'
206206
location: location
207207
properties: {

articles/azure-resource-manager/bicep/bicep-functions-resource.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ param allowedLocations array = [
6868
'australiacentral'
6969
]
7070
71-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
71+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2025-03-01' = {
7272
name: 'locationRestriction'
7373
properties: {
7474
policyType: 'Custom'
@@ -88,7 +88,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01'
8888
}
8989
}
9090
91-
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
91+
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
9292
name: 'locationAssignment'
9393
properties: {
9494
policyDefinitionId: policyDefinition.id
@@ -149,7 +149,7 @@ param adminLogin string
149149
@secure()
150150
param adminPassword string
151151
152-
resource sqlServer 'Microsoft.Sql/servers@2023-08-01-preview' = {
152+
resource sqlServer 'Microsoft.Sql/servers@2024-11-01-preview' = {
153153
...
154154
}
155155
```
@@ -237,7 +237,7 @@ Other `list` functions have different return formats. To see the format of a fun
237237
The following example deploys a storage account and then calls `listKeys` on that storage account. The key is used when setting a value for [deployment scripts](../templates/deployment-script-template.md).
238238

239239
```bicep
240-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
240+
resource storageAccount 'Microsoft.Storage/storageAccounts@2025-06-01' = {
241241
name: 'dscript${uniqueString(resourceGroup().id)}'
242242
location: location
243243
kind: 'StorageV2'
@@ -454,7 +454,7 @@ param allowedLocations array = [
454454
var mgScope = tenantResourceId('Microsoft.Management/managementGroups', targetMG)
455455
var policyDefinitionName = 'LocationRestriction'
456456
457-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
457+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2025-03-01' = {
458458
name: policyDefinitionName
459459
properties: {
460460
policyType: 'Custom'
@@ -474,7 +474,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01'
474474
}
475475
}
476476
477-
resource location_lock 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
477+
resource location_lock 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
478478
name: 'location-lock'
479479
properties: {
480480
scope: mgScope
@@ -581,7 +581,7 @@ The following example deploys a storage account. The first two outputs give you
581581
param storageAccountName string = uniqueString(resourceGroup().id)
582582
param location string = resourceGroup().location
583583
584-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
584+
resource storageAccount 'Microsoft.Storage/storageAccounts@2025-06-01' = {
585585
name: storageAccountName
586586
location: location
587587
kind: 'Storage'
@@ -635,7 +635,7 @@ For example:
635635
param storageAccountName string
636636
param location string = resourceGroup().location
637637
638-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
638+
resource storageAccount 'Microsoft.Storage/storageAccounts@2025-06-01' = {
639639
name: storageAccountName
640640
location: location
641641
kind: 'Storage'
@@ -743,7 +743,7 @@ param policyDefinitionID string = '0a914e76-4921-4c19-b460-a2d36003525a'
743743
@description('Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.')
744744
param policyAssignmentName string = guid(policyDefinitionID, resourceGroup().name)
745745
746-
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
746+
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2025-03-01' = {
747747
name: policyAssignmentName
748748
properties: {
749749
scope: subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)
@@ -807,7 +807,7 @@ param location string = 'westus2'
807807
808808
var logicalZone = toLogicalZone(subscriptionId, location, physicalZone)
809809
810-
resource vm 'Microsoft.Compute/virtualMachines@2024-03-01' = {
810+
resource vm 'Microsoft.Compute/virtualMachines@2025-04-01' = {
811811
name: 'myVM'
812812
location: location
813813
zones: logicalZone != '' ? [logicalZone] : []
@@ -921,7 +921,7 @@ param location string = 'westus2'
921921
922922
var physicalZone = toPhysicalZone(subscriptionId, location, logicalZone)
923923
924-
resource vm 'Microsoft.Compute/virtualMachines@2024-03-01' = {
924+
resource vm 'Microsoft.Compute/virtualMachines@2025-04-01' = {
925925
name: 'myVM'
926926
location: location
927927
zones: [logicalZone]

articles/azure-resource-manager/bicep/bicep-functions-scope.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ targetScope = 'managementGroup'
9595
9696
param mgName string = 'mg-${uniqueString(newGuid())}'
9797
98-
resource newMG 'Microsoft.Management/managementGroups@2023-04-01' = {
98+
resource newMG 'Microsoft.Management/managementGroups@2024-02-01-preview' = {
9999
scope: tenant()
100100
name: mgName
101101
properties: {
@@ -319,7 +319,7 @@ It returns:
319319
Some resources require setting the tenant ID for a property. Rather than passing the tenant ID as a parameter, you can retrieve it with the tenant function.
320320

321321
```bicep
322-
resource kv 'Microsoft.KeyVault/vaults@2023-07-01' = {
322+
resource kv 'Microsoft.KeyVault/vaults@2025-05-01' = {
323323
name: 'examplekeyvault'
324324
location: 'westus'
325325
properties: {

articles/azure-resource-manager/bicep/bicep-functions-string.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ param guidValue string = newGuid()
907907
908908
var storageName = 'storage${uniqueString(guidValue)}'
909909
910-
resource myStorage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
910+
resource myStorage 'Microsoft.Storage/storageAccounts@2025-06-01' = {
911911
name: storageName
912912
location: 'West US'
913913
sku: {
@@ -1502,7 +1502,7 @@ uniqueString(resourceGroup().id, deployment().name)
15021502
The following example shows how to create a unique name for a storage account based on your resource group. Inside the resource group, the name isn't unique if constructed the same way.
15031503

15041504
```bicep
1505-
resource mystorage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
1505+
resource mystorage 'Microsoft.Storage/storageAccounts@2025-06-01' = {
15061506
name: 'storage${uniqueString(resourceGroup().id)}'
15071507
...
15081508
}

articles/azure-resource-manager/bicep/child-resource-name-type.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ A nested resource declaration must appear at the top level of syntax of the pare
6767
When defined within the parent resource type, you format the type and name values as a single segment without slashes. The following example shows a storage account with a child resource for the file service, and the file service has a child resource for the file share. The file service's name is set to `default` and its type is set to `fileServices`. The file share's name is set `exampleshare` and its type is set to `shares`.
6868

6969
```bicep
70-
resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = {
70+
resource storage 'Microsoft.Storage/storageAccounts@2025-06-01' = {
7171
name: 'examplestorage'
7272
location: resourceGroup().location
7373
kind: 'StorageV2'
@@ -119,7 +119,7 @@ When defined outside of the parent resource, you format the type and with slashe
119119
The following example shows a storage account, file service, and file share that are all defined at the root level.
120120

121121
```bicep
122-
resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = {
122+
resource storage 'Microsoft.Storage/storageAccounts@2025-06-01' = {
123123
name: 'examplestorage'
124124
location: resourceGroup().location
125125
kind: 'StorageV2'
@@ -128,12 +128,12 @@ resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = {
128128
}
129129
}
130130
131-
resource service 'Microsoft.Storage/storageAccounts/fileServices@2024-01-01' = {
131+
resource service 'Microsoft.Storage/storageAccounts/fileServices@2025-06-01' = {
132132
name: 'default'
133133
parent: storage
134134
}
135135
136-
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2024-01-01' = {
136+
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2025-06-01' = {
137137
name: 'exampleshare'
138138
parent: service
139139
}
@@ -146,7 +146,7 @@ Referencing the child resource symbolic name works the same as referencing the p
146146
You can also use the full resource name and type when declaring the child resource outside the parent. You don't set the parent property on the child resource. Because the dependency can't be inferred, you must set it explicitly.
147147

148148
```bicep
149-
resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = {
149+
resource storage 'Microsoft.Storage/storageAccounts@2025-06-01' = {
150150
name: 'examplestorage'
151151
location: resourceGroup().location
152152
kind: 'StorageV2'
@@ -155,14 +155,14 @@ resource storage 'Microsoft.Storage/storageAccounts@2024-01-01' = {
155155
}
156156
}
157157
158-
resource service 'Microsoft.Storage/storageAccounts/fileServices@2024-01-01' = {
158+
resource service 'Microsoft.Storage/storageAccounts/fileServices@2025-06-01' = {
159159
name: 'examplestorage/default'
160160
dependsOn: [
161161
storage
162162
]
163163
}
164164
165-
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2024-01-01' = {
165+
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2025-06-01' = {
166166
name: 'examplestorage/default/exampleshare'
167167
dependsOn: [
168168
service

articles/azure-resource-manager/bicep/compare-template-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ targetScope = 'subscription'
134134
To declare a resource:
135135

136136
```bicep
137-
resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-03-01' = {
137+
resource virtualMachine 'Microsoft.Compute/virtualMachines@2025-04-01' = {
138138
...
139139
}
140140
```
@@ -152,7 +152,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-03-01' = {
152152
To conditionally deploy a resource:
153153

154154
```bicep
155-
resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-03-01' = if(deployVM) {
155+
resource virtualMachine 'Microsoft.Compute/virtualMachines@2025-04-01' = if(deployVM) {
156156
...
157157
}
158158
```
@@ -213,11 +213,11 @@ For Bicep, you can set an explicit dependency but this approach isn't recommende
213213
The following shows a network interface with an implicit dependency on a network security group. It references the network security group with `netSecurityGroup.id`.
214214

215215
```bicep
216-
resource netSecurityGroup 'Microsoft.Network/networkSecurityGroups@2024-05-01' = {
216+
resource netSecurityGroup 'Microsoft.Network/networkSecurityGroups@2025-01-01' = {
217217
...
218218
}
219219
220-
resource nic1 'Microsoft.Network/networkInterfaces@2024-05-01' = {
220+
resource nic1 'Microsoft.Network/networkInterfaces@2025-01-01' = {
221221
name: nic1Name
222222
location: location
223223
properties: {

articles/azure-resource-manager/bicep/conditional-resource-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ param location string = resourceGroup().location
6060
])
6161
param newOrExisting string = 'new'
6262
63-
resource saNew 'Microsoft.Storage/storageAccounts@2023-04-01' = if (newOrExisting == 'new') {
63+
resource saNew 'Microsoft.Storage/storageAccounts@2025-06-01' = if (newOrExisting == 'new') {
6464
name: storageAccountName
6565
location: location
6666
sku: {
@@ -92,7 +92,7 @@ param vmName string
9292
param location string
9393
param logAnalytics string = ''
9494
95-
resource vmName_omsOnboarding 'Microsoft.Compute/virtualMachines/extensions@2024-03-01' = if (!empty(logAnalytics)) {
95+
resource vmName_omsOnboarding 'Microsoft.Compute/virtualMachines/extensions@2025-04-01' = if (!empty(logAnalytics)) {
9696
name: '${vmName}/omsOnboarding'
9797
location: location
9898
properties: {

0 commit comments

Comments
 (0)