Skip to content

Commit 9b76cca

Browse files
Merge pull request #280607 from mumian/0711-merge-repo-functions
update api versions and remove the sample repo - functions
2 parents 18582a4 + e980638 commit 9b76cca

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - arrays
33
description: Describes the functions to use in a Bicep file for working with arrays.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 01/11/2024
6+
ms.date: 07/11/2024
77
---
88

99
# Array functions for Bicep
@@ -204,7 +204,7 @@ param dnsServers array = []
204204
205205
...
206206
207-
resource vnet 'Microsoft.Network/virtualNetworks@2021-02-01' = {
207+
resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
208208
name: vnetName
209209
location: location
210210
properties: {
@@ -647,7 +647,7 @@ param availabilityZones array = [
647647
'2'
648648
]
649649
650-
resource exampleApim 'Microsoft.ApiManagement/service@2021-08-01' = {
650+
resource exampleApim 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
651651
name: apiManagementName
652652
location: location
653653
sku: {
@@ -797,15 +797,15 @@ The following example is extracted from a quickstart template, [Two VMs in VNET
797797
...
798798
var numberOfInstances = 2
799799
800-
resource networkInterface 'Microsoft.Network/networkInterfaces@2021-05-01' = [for i in range(0, numberOfInstances): {
800+
resource networkInterface 'Microsoft.Network/networkInterfaces@2023-11-01' = [for i in range(0, numberOfInstances): {
801801
name: '${networkInterfaceName}${i}'
802802
location: location
803803
properties: {
804804
...
805805
}
806806
}]
807807
808-
resource vm 'Microsoft.Compute/virtualMachines@2021-11-01' = [for i in range(0, numberOfInstances): {
808+
resource vm 'Microsoft.Compute/virtualMachines@2024-03-01' = [for i in range(0, numberOfInstances): {
809809
name: '${vmNamePrefix}${i}'
810810
location: location
811811
properties: {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - date
33
description: Describes the functions to use in a Bicep file to work with dates.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 01/17/2024
6+
ms.date: 07/11/2024
77
---
88

99
# Date functions for Bicep
@@ -79,7 +79,7 @@ var startTime = dateTimeAdd(baseTime, 'PT1H')
7979
8080
...
8181
82-
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2022-08-08' = {
82+
resource scheduler 'Microsoft.Automation/automationAccounts/schedules@2023-11-01' = {
8383
name: concat(omsAutomationAccountName, '/', scheduleName)
8484
properties: {
8585
description: 'Demo Scheduler'
@@ -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@2022-09-01' = {
235+
resource myRg 'Microsoft.Resources/resourceGroups@2024-03-01' = {
236236
name: rgName
237237
location: 'westeurope'
238238
tags: {

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ param allowedLocations array = [
6666
'australiacentral'
6767
]
6868
69-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
69+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
7070
name: 'locationRestriction'
7171
properties: {
7272
policyType: 'Custom'
@@ -86,7 +86,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01'
8686
}
8787
}
8888
89-
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
89+
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
9090
name: 'locationAssignment'
9191
properties: {
9292
policyDefinitionId: policyDefinition.id
@@ -147,7 +147,7 @@ param adminLogin string
147147
@secure()
148148
param adminPassword string
149149
150-
resource sqlServer 'Microsoft.Sql/servers@2022-08-01-preview' = {
150+
resource sqlServer 'Microsoft.Sql/servers@2023-08-01-preview' = {
151151
...
152152
}
153153
```
@@ -162,7 +162,7 @@ param subscriptionId string
162162
param kvResourceGroup string
163163
param kvName string
164164
165-
resource keyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = {
165+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
166166
name: kvName
167167
scope: resourceGroup(subscriptionId, kvResourceGroup )
168168
}
@@ -235,7 +235,7 @@ Other `list` functions have different return formats. To see the format of a fun
235235
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).
236236

237237
```bicep
238-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
238+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
239239
name: 'dscript${uniqueString(resourceGroup().id)}'
240240
location: location
241241
kind: 'StorageV2'
@@ -244,7 +244,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
244244
}
245245
}
246246
247-
resource dScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
247+
resource dScript 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
248248
name: 'scriptWithStorage'
249249
location: location
250250
...
@@ -452,7 +452,7 @@ param allowedLocations array = [
452452
var mgScope = tenantResourceId('Microsoft.Management/managementGroups', targetMG)
453453
var policyDefinitionName = 'LocationRestriction'
454454
455-
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01' = {
455+
resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
456456
name: policyDefinitionName
457457
properties: {
458458
policyType: 'Custom'
@@ -472,7 +472,7 @@ resource policyDefinition 'Microsoft.Authorization/policyDefinitions@2021-06-01'
472472
}
473473
}
474474
475-
resource location_lock 'Microsoft.Authorization/policyAssignments@2021-06-01' = {
475+
resource location_lock 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
476476
name: 'location-lock'
477477
properties: {
478478
scope: mgScope
@@ -579,7 +579,7 @@ The following example deploys a storage account. The first two outputs give you
579579
param storageAccountName string = uniqueString(resourceGroup().id)
580580
param location string = resourceGroup().location
581581
582-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
582+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
583583
name: storageAccountName
584584
location: location
585585
kind: 'Storage'
@@ -599,7 +599,7 @@ To get a property from an existing resource that isn't deployed in the template,
599599
```bicep
600600
param storageAccountName string
601601
602-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = {
602+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
603603
name: storageAccountName
604604
}
605605
@@ -633,7 +633,7 @@ For example:
633633
param storageAccountName string
634634
param location string = resourceGroup().location
635635
636-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
636+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
637637
name: storageAccountName
638638
location: location
639639
kind: 'Storage'
@@ -650,8 +650,8 @@ To get the resource ID for a resource that isn't deployed in the Bicep file, use
650650
```bicep
651651
param storageAccountName string
652652
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
655655
}
656656
657657
output storageID string = storageAccount.id
@@ -741,7 +741,7 @@ param policyDefinitionID string = '0a914e76-4921-4c19-b460-a2d36003525a'
741741
@description('Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.')
742742
param policyAssignmentName string = guid(policyDefinitionID, resourceGroup().name)
743743
744-
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2022-06-01' = {
744+
resource policyAssignment 'Microsoft.Authorization/policyAssignments@2024-04-01' = {
745745
name: policyAssignmentName
746746
properties: {
747747
scope: subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - scopes
33
description: Describes the functions to use in a Bicep file to retrieve values about deployment scopes.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 03/20/2024
6+
ms.date: 07/11/2024
77
---
88

99
# Scope functions for Bicep
@@ -95,7 +95,7 @@ targetScope = 'managementGroup'
9595
9696
param mgName string = 'mg-${uniqueString(newGuid())}'
9797
98-
resource newMG 'Microsoft.Management/managementGroups@2020-05-01' = {
98+
resource newMG 'Microsoft.Management/managementGroups@2023-04-01' = {
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@2021-06-01-preview' = {
322+
resource kv 'Microsoft.KeyVault/vaults@2023-07-01' = {
323323
name: 'examplekeyvault'
324324
location: 'westus'
325325
properties: {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - string
33
description: Describes the functions to use in a Bicep file to work with strings.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 07/02/2024
6+
ms.date: 07/11/2024
77
---
88

99
# String functions for Bicep
@@ -834,7 +834,7 @@ param guidValue string = newGuid()
834834
835835
var storageName = 'storage${uniqueString(guidValue)}'
836836
837-
resource myStorage 'Microsoft.Storage/storageAccounts@2018-07-01' = {
837+
resource myStorage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
838838
name: storageName
839839
location: 'West US'
840840
sku: {
@@ -1355,7 +1355,7 @@ uniqueString(resourceGroup().id, deployment().name)
13551355
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.
13561356

13571357
```bicep
1358-
resource mystorage 'Microsoft.Storage/storageAccounts@2018-07-01' = {
1358+
resource mystorage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
13591359
name: 'storage${uniqueString(resourceGroup().id)}'
13601360
...
13611361
}

0 commit comments

Comments
 (0)