@@ -66,7 +66,7 @@ param allowedLocations array = [
66
66
'australiacentral'
67
67
]
68
68
69
- resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06 -01' = {
69
+ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04 -01' = {
70
70
name: 'locationRestriction'
71
71
properties: {
72
72
policyType: 'Custom'
@@ -86,7 +86,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01'
86
86
}
87
87
}
88
88
89
- resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06 -01' = {
89
+ resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04 -01' = {
90
90
name: 'locationAssignment'
91
91
properties: {
92
92
policyDefinitionId: policyDefinition.id
@@ -147,7 +147,7 @@ param adminLogin string
147
147
@secure()
148
148
param adminPassword string
149
149
150
- resource sqlServer 'Microsoft.Sql/servers@2022 -08-01-preview' = {
150
+ resource sqlServer 'Microsoft.Sql/servers@2023 -08-01-preview' = {
151
151
...
152
152
}
153
153
```
@@ -162,7 +162,7 @@ param subscriptionId string
162
162
param kvResourceGroup string
163
163
param kvName string
164
164
165
- resource keyVault 'Microsoft.KeyVault/vaults@2023-02 -01' existing = {
165
+ resource keyVault 'Microsoft.KeyVault/vaults@2023-07 -01' existing = {
166
166
name: kvName
167
167
scope: resourceGroup(subscriptionId, kvResourceGroup )
168
168
}
@@ -235,7 +235,7 @@ Other `list` functions have different return formats. To see the format of a fun
235
235
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 ) .
236
236
237
237
``` bicep
238
- resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09 -01' = {
238
+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04 -01' = {
239
239
name: 'dscript${uniqueString(resourceGroup().id)}'
240
240
location: location
241
241
kind: 'StorageV2'
@@ -244,7 +244,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
244
244
}
245
245
}
246
246
247
- resource dScript 'Microsoft.Resources/deploymentScripts@2020-10 -01' = {
247
+ resource dScript 'Microsoft.Resources/deploymentScripts@2023-08 -01' = {
248
248
name: 'scriptWithStorage'
249
249
location: location
250
250
...
@@ -452,7 +452,7 @@ param allowedLocations array = [
452
452
var mgScope = tenantResourceId('Microsoft.Management/managementGroups', targetMG)
453
453
var policyDefinitionName = 'LocationRestriction'
454
454
455
- resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06 -01' = {
455
+ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04 -01' = {
456
456
name: policyDefinitionName
457
457
properties: {
458
458
policyType: 'Custom'
@@ -472,7 +472,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01'
472
472
}
473
473
}
474
474
475
- resource location_lock 'Microsoft.Authorization/policyAssignments@2021-06 -01' = {
475
+ resource location_lock 'Microsoft.Authorization/policyAssignments@2024-04 -01' = {
476
476
name: 'location-lock'
477
477
properties: {
478
478
scope: mgScope
@@ -579,7 +579,7 @@ The following example deploys a storage account. The first two outputs give you
579
579
param storageAccountName string = uniqueString(resourceGroup().id)
580
580
param location string = resourceGroup().location
581
581
582
- resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09 -01' = {
582
+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04 -01' = {
583
583
name: storageAccountName
584
584
location: location
585
585
kind: 'Storage'
@@ -599,7 +599,7 @@ To get a property from an existing resource that isn't deployed in the template,
599
599
``` bicep
600
600
param storageAccountName string
601
601
602
- resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09 -01' existing = {
602
+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04 -01' existing = {
603
603
name: storageAccountName
604
604
}
605
605
@@ -633,7 +633,7 @@ For example:
633
633
param storageAccountName string
634
634
param location string = resourceGroup().location
635
635
636
- resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09 -01' = {
636
+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04 -01' = {
637
637
name: storageAccountName
638
638
location: location
639
639
kind: 'Storage'
@@ -650,8 +650,8 @@ To get the resource ID for a resource that isn't deployed in the Bicep file, use
650
650
``` bicep
651
651
param storageAccountName string
652
652
653
- resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09 -01' existing = {
654
- name: storageAccountName
653
+ resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04 -01' existing = {
654
+ name: storageAccountName
655
655
}
656
656
657
657
output storageID string = storageAccount.id
@@ -741,7 +741,7 @@ param policyDefinitionID string = '0a914e76-4921-4c19-b460-a2d36003525a'
741
741
@description('Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.')
742
742
param policyAssignmentName string = guid(policyDefinitionID, resourceGroup().name)
743
743
744
- resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06 -01' = {
744
+ resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04 -01' = {
745
745
name: policyAssignmentName
746
746
properties: {
747
747
scope: subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)
0 commit comments