Skip to content

Commit d2b76bc

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into rolyon-rbac-resource-provider-cognitiveservices
2 parents 0447787 + d9bcc61 commit d2b76bc

File tree

45 files changed

+1730
-1701
lines changed

Some content is hidden

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

45 files changed

+1730
-1701
lines changed

articles/azure-resource-manager/bicep/best-practices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: johndowns
55
ms.author: jodowns
66
ms.topic: conceptual
77
ms.custom: devx-track-bicep
8-
ms.date: 05/16/2022
8+
ms.date: 06/23/2023
99
---
1010
# Best practices for Bicep
1111

@@ -68,13 +68,13 @@ For more information about Bicep variables, see [Variables in Bicep](variables.m
6868
* Avoid using `name` in a symbolic name. The symbolic name represents the resource, not the resource's name. For example, instead of the following syntax:
6969

7070
```bicep
71-
resource cosmosDBAccountName 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
71+
resource cosmosDBAccountName 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
7272
```
7373

7474
Use:
7575

7676
```bicep
77-
resource cosmosDBAccount 'Microsoft.DocumentDB/databaseAccounts@2021-04-15' = {
77+
resource cosmosDBAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
7878
```
7979

8080
* Avoid distinguishing variables and parameters by the use of suffixes.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - any
33
description: Describes the any function that is available in Bicep to convert types.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 09/09/2021
6+
ms.date: 06/23/2023
77
---
88

99
# Any function for Bicep
@@ -38,7 +38,7 @@ The value in a form that is compatible with any data type.
3838
The following example shows how to use the `any()` function to provide numeric values as strings.
3939

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

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Bicep functions - date
33
description: Describes the functions to use in a Bicep file to work with dates.
4-
author: mumian
5-
ms.author: jgao
64
ms.topic: conceptual
75
ms.custom: devx-track-bicep
8-
ms.date: 05/03/2022
6+
ms.date: 06/23/2023
97
---
108

119
# Date functions for Bicep
@@ -67,7 +65,7 @@ var startTime = dateTimeAdd(baseTime, 'PT1H')
6765
6866
...
6967
70-
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2015-10-31' = {
68+
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2022-08-08' = {
7169
name: concat(omsAutomationAccountName, '/', scheduleName)
7270
properties: {
7371
description: 'Demo Scheduler'
@@ -220,7 +218,7 @@ The next example shows how to use a value from the function when setting a tag v
220218
param utcShort string = utcNow('d')
221219
param rgName string
222220
223-
resource myRg 'Microsoft.Resources/resourceGroups@2020-10-01' = {
221+
resource myRg 'Microsoft.Resources/resourceGroups@2022-09-01' = {
224222
name: rgName
225223
location: 'westeurope'
226224
tags: {

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Bicep functions - numeric
33
description: Describes the functions to use in a Bicep file to work with numbers.
4-
author: mumian
5-
ms.author: jgao
64
ms.topic: conceptual
75
ms.custom: devx-track-bicep
8-
ms.date: 09/30/2021
6+
ms.date: 06/23/2023
97
---
108

119
# Numeric functions for Bicep

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Child resources in Bicep
33
description: Describes how to set the name and type for child resources in Bicep.
4-
author: mumian
5-
ms.author: jgao
64
ms.topic: conceptual
75
ms.custom: devx-track-bicep
8-
ms.date: 09/13/2021
6+
ms.date: 06/23/2023
97
---
108

119
# Set name and type for child resources in Bicep
@@ -84,7 +82,7 @@ output childAddressPrefix string = VNet1::VNet1_Subnet1.properties.addressPrefix
8482

8583
## Outside parent resource
8684

87-
The following example shows the child resource outside of the parent resource. You might use this approach if the parent resource isn't deployed in the same template, or if want to use [a loop](loops.md) to create more than one child resource. Specify the parent property on the child with the value set to the symbolic name of the parent. With this syntax you still need to declare the full resource type, but the name of the child resource is only the name of the child.
85+
The following example shows the child resource outside of the parent resource. You might use this approach if the parent resource isn't deployed in the same template, or if you want to use [a loop](loops.md) to create more than one child resource. Specify the parent property on the child with the value set to the symbolic name of the parent. With this syntax you still need to declare the full resource type, but the name of the child resource is only the name of the child.
8886

8987
```bicep
9088
resource <parent-resource-symbolic-name> '<resource-type>@<api-version>' = {

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
title: Compare syntax for Azure Resource Manager templates in JSON and Bicep
33
description: Compares Azure Resource Manager templates developed with JSON and Bicep, and shows how to convert between the languages.
4-
author: mumian
5-
ms.author: jgao
64
ms.topic: conceptual
75
ms.custom: devx-track-bicep, devx-track-arm-template
8-
ms.date: 04/26/2022
6+
ms.date: 06/23/2023
97
---
8+
109
# Comparing JSON and Bicep for templates
1110

1211
This article compares Bicep syntax with JSON syntax for Azure Resource Manager templates (ARM templates). In most cases, Bicep provides syntax that is less verbose than the equivalent in JSON.
@@ -135,7 +134,7 @@ targetScope = 'subscription'
135134
To declare a resource:
136135

137136
```bicep
138-
resource virtualMachine 'Microsoft.Compute/virtualMachines@2020-06-01' = {
137+
resource virtualMachine 'Microsoft.Compute/virtualMachines@2023-03-01' = {
139138
...
140139
}
141140
```
@@ -153,7 +152,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2020-06-01' = {
153152
To conditionally deploy a resource:
154153

155154
```bicep
156-
resource virtualMachine 'Microsoft.Compute/virtualMachines@2020-06-01' = if(deployVM) {
155+
resource virtualMachine 'Microsoft.Compute/virtualMachines@2023-03-01' = if(deployVM) {
157156
...
158157
}
159158
```
@@ -163,7 +162,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2020-06-01' = if(depl
163162
{
164163
"condition": "[parameters('deployVM')]",
165164
"type": "Microsoft.Compute/virtualMachines",
166-
"apiVersion": "2020-06-01",
165+
"apiVersion": "2023-03-01",
167166
...
168167
}
169168
]
@@ -214,11 +213,11 @@ For Bicep, you can set an explicit dependency but this approach isn't recommende
214213
The following shows a network interface with an implicit dependency on a network security group. It references the network security group with `netSecurityGroup.id`.
215214

216215
```bicep
217-
resource netSecurityGroup 'Microsoft.Network/networkSecurityGroups@2020-06-01' = {
216+
resource netSecurityGroup 'Microsoft.Network/networkSecurityGroups@2022-11-01' = {
218217
...
219218
}
220219
221-
resource nic1 'Microsoft.Network/networkInterfaces@2020-06-01' = {
220+
resource nic1 'Microsoft.Network/networkInterfaces@2022-11-01' = {
222221
name: nic1Name
223222
location: location
224223
properties: {
@@ -255,7 +254,7 @@ storageAccount.properties.primaryEndpoints.blob
255254
To get a property from an existing resource that isn't deployed in the template:
256255

257256
```bicep
258-
resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' existing = {
257+
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = {
259258
name: storageAccountName
260259
}
261260

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: johndowns
66
ms.author: jodowns
77
ms.topic: conceptual
88
ms.custom: devx-track-bicep
9-
ms.date: 03/27/2022
9+
ms.date: 06/23/2023
1010
---
1111

1212
# Contribute to Bicep

articles/azure-resource-manager/bicep/deploy-cloud-shell.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
title: Deploy Bicep files with Cloud Shell
33
description: Use Azure Resource Manager and Azure Cloud Shell to deploy resources to Azure. The resources are defined in a Bicep file.
4-
author: mumian
5-
ms.author: jgao
64
ms.topic: conceptual
75
ms.custom: devx-track-bicep, devx-track-arm-template
8-
ms.date: 06/01/2021
6+
ms.date: 06/23/2023
97
---
108

119
# Deploy Bicep files from Azure Cloud Shell

articles/azure-resource-manager/bicep/deploy-to-management-group.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Bicep to deploy resources to management group
33
description: Describes how to create a Bicep file that deploys resources at the management group scope.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 11/22/2021
6+
ms.date: 06/23/2023
77
---
88

99
# Management group deployments with Bicep files
@@ -128,7 +128,7 @@ To deploy resources to the target management group, add those resources with the
128128
targetScope = 'managementGroup'
129129
130130
// policy definition created in the management group
131-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2019-09-01' = {
131+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
132132
...
133133
}
134134
```
@@ -211,7 +211,7 @@ targetScope = 'managementGroup'
211211
212212
param mgName string = 'mg-${uniqueString(newGuid())}'
213213
214-
resource newMG 'Microsoft.Management/managementGroups@2020-05-01' = {
214+
resource newMG 'Microsoft.Management/managementGroups@2021-04-01' = {
215215
scope: tenant()
216216
name: mgName
217217
properties: {}
@@ -227,7 +227,7 @@ targetScope = 'managementGroup'
227227
228228
param mgName string = 'mg-${uniqueString(newGuid())}'
229229
230-
resource newMG 'Microsoft.Management/managementGroups@2020-05-01' = {
230+
resource newMG 'Microsoft.Management/managementGroups@2021-04-01' = {
231231
scope: tenant()
232232
name: mgName
233233
properties: {
@@ -268,7 +268,7 @@ param allowedLocations array = [
268268
'australiacentral'
269269
]
270270
271-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2020-09-01' = {
271+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
272272
name: 'locationRestriction'
273273
properties: {
274274
policyType: 'Custom'
@@ -288,7 +288,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2020-09-01'
288288
}
289289
}
290290
291-
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2020-09-01' = {
291+
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
292292
name: 'locationAssignment'
293293
properties: {
294294
policyDefinitionId: policyDefinition.id

articles/azure-resource-manager/bicep/deploy-to-subscription.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Bicep to deploy resources to subscription
33
description: Describes how to create a Bicep file that deploys resources to the Azure subscription scope. It shows how to create a resource group.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 11/22/2021
6+
ms.date: 06/23/2023
77
---
88

99
# Subscription deployments with Bicep files
@@ -165,7 +165,7 @@ To deploy resources to the target subscription, add those resources with the `re
165165
targetScope = 'subscription'
166166
167167
// resource group created in target subscription
168-
resource exampleResource 'Microsoft.Resources/resourceGroups@2020-10-01' = {
168+
resource exampleResource 'Microsoft.Resources/resourceGroups@2022-09-01' = {
169169
...
170170
}
171171
```
@@ -229,7 +229,7 @@ targetScope = 'subscription'
229229
param mgName string = 'mg-${uniqueString(newGuid())}'
230230
231231
// management group created at tenant
232-
resource managementGroup 'Microsoft.Management/managementGroups@2020-05-01' = {
232+
resource managementGroup 'Microsoft.Management/managementGroups@2021-04-01' = {
233233
scope: tenant()
234234
name: mgName
235235
properties: {}
@@ -254,7 +254,7 @@ targetScope='subscription'
254254
param resourceGroupName string
255255
param resourceGroupLocation string
256256
257-
resource newRG 'Microsoft.Resources/resourceGroups@2021-01-01' = {
257+
resource newRG 'Microsoft.Resources/resourceGroups@2022-09-01' = {
258258
name: resourceGroupName
259259
location: resourceGroupLocation
260260
}
@@ -274,7 +274,7 @@ param resourceGroupLocation string
274274
param storageName string
275275
param storageLocation string
276276
277-
resource newRG 'Microsoft.Resources/resourceGroups@2021-01-01' = {
277+
resource newRG 'Microsoft.Resources/resourceGroups@2022-09-01' = {
278278
name: resourceGroupName
279279
location: resourceGroupLocation
280280
}
@@ -295,7 +295,7 @@ The module uses a Bicep file named **storage.bicep** with the following contents
295295
param storageLocation string
296296
param storageName string
297297
298-
resource storageAcct 'Microsoft.Storage/storageAccounts@2019-06-01' = {
298+
resource storageAcct 'Microsoft.Storage/storageAccounts@2022-09-01' = {
299299
name: storageName
300300
location: storageLocation
301301
sku: {
@@ -319,7 +319,7 @@ param policyDefinitionID string
319319
param policyName string
320320
param policyParameters object = {}
321321
322-
resource policyAssign 'Microsoft.Authorization/policyAssignments@2020-09-01' = {
322+
resource policyAssign 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
323323
name: policyName
324324
properties: {
325325
policyDefinitionId: policyDefinitionID
@@ -335,7 +335,7 @@ You can [define](../../governance/policy/concepts/definition-structure.md) and a
335335
```bicep
336336
targetScope = 'subscription'
337337
338-
resource locationPolicy 'Microsoft.Authorization/policyDefinitions@2020-09-01' = {
338+
resource locationPolicy 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
339339
name: 'locationpolicy'
340340
properties: {
341341
policyType: 'Custom'
@@ -352,7 +352,7 @@ resource locationPolicy 'Microsoft.Authorization/policyDefinitions@2020-09-01' =
352352
}
353353
}
354354
355-
resource locationRestrict 'Microsoft.Authorization/policyAssignments@2020-09-01' = {
355+
resource locationRestrict 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
356356
name: 'allowedLocation'
357357
properties: {
358358
policyDefinitionId: locationPolicy.id
@@ -386,7 +386,7 @@ param roleAssignmentName string = guid(principalId, roleDefinitionId, resourceGr
386386
387387
var roleID = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/${roleDefinitionId}'
388388
389-
resource newResourceGroup 'Microsoft.Resources/resourceGroups@2019-10-01' = {
389+
resource newResourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' = {
390390
name: resourceGroupName
391391
location: resourceGroupLocation
392392
properties: {}
@@ -411,7 +411,7 @@ module assignRole 'role.bicep' = {
411411
The following example shows the module to apply the lock:
412412

413413
```bicep
414-
resource createRgLock 'Microsoft.Authorization/locks@2016-09-01' = {
414+
resource createRgLock 'Microsoft.Authorization/locks@2020-05-01' = {
415415
name: 'rgLock'
416416
properties: {
417417
level: 'CanNotDelete'
@@ -431,7 +431,7 @@ param roleNameGuid string = newGuid()
431431
432432
param roleDefinitionId string
433433
434-
resource roleNameGuid_resource 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
434+
resource roleNameGuid_resource 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
435435
name: roleNameGuid
436436
properties: {
437437
roleDefinitionId: roleDefinitionId

0 commit comments

Comments
 (0)