Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit 917a884

Browse files
committed
update bicep resource api versions
1 parent 1e53475 commit 917a884

11 files changed

+41
-26
lines changed

infra/core/ai-search/ai-search.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ resource aiSearch 'Microsoft.Search/searchServices@2024-03-01-preview' = {
2121
replicaCount: 1
2222
partitionCount: 1
2323
publicNetworkAccess: publicNetworkAccess
24+
networkRuleSet: {
25+
ipRules: []
26+
bypass: 'AzureServices'
27+
}
2428
semanticSearch: 'disabled'
2529
}
2630
}

infra/core/rbac/workload-identity-rbac.bicep

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ resource contributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022
6060
}
6161
}
6262

63+
resource cognitiveServicesOpenAIContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
64+
// note: the guid must be globally unique and deterministic across Azure
65+
name: guid(resourceGroup().id, principalId, principalType, roleIds.cognitiveServicesOpenAIContributor)
66+
scope: resourceGroup()
67+
properties: {
68+
principalId: principalId
69+
principalType: principalType
70+
roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleIds.cognitiveServicesOpenAIContributor)
71+
}
72+
}
73+
6374
resource aiSearchIndexDataContributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
6475
// note: the guid must be globally unique and deterministic across Azure
6576
name: guid(aiSearch.id, principalId, principalType, roleIds.aiSearchIndexDataContributor)
@@ -71,16 +82,16 @@ resource aiSearchIndexDataContributorRoleAssignment 'Microsoft.Authorization/rol
7182
}
7283
}
7384

74-
// resource aiSearchIndexDataReaderRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
75-
// // note: the guid must be globally unique and deterministic across Azure
76-
// name: guid(aiSearch.id, principalId, principalType, roleIds.aiSearchIndexDataReader)
77-
// scope: aiSearch
78-
// properties: {
79-
// principalId: principalId
80-
// principalType: principalType
81-
// roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleIds.aiSearchIndexDataReader)
82-
// }
83-
// }
85+
resource aiSearchIndexDataReaderRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
86+
// note: the guid must be globally unique and deterministic across Azure
87+
name: guid(aiSearch.id, principalId, principalType, roleIds.aiSearchIndexDataReader)
88+
scope: aiSearch
89+
properties: {
90+
principalId: principalId
91+
principalType: principalType
92+
roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleIds.aiSearchIndexDataReader)
93+
}
94+
}
8495

8596
resource cosmosDbOperatorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
8697
// note: the guid must be globally unique and deterministic across Azure

infra/core/vnet/nsg.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ param nsgName string = 'apim-nsg-${uniqueString(resourceGroup().id)}'
77
@description('Azure region where the resources will be deployed')
88
param location string = resourceGroup().location
99

10-
resource nsg 'Microsoft.Network/networkSecurityGroups@2024-01-01' = {
10+
resource nsg 'Microsoft.Network/networkSecurityGroups@2024-05-01' = {
1111
name: nsgName
1212
location: location
1313
properties: {

infra/core/vnet/private-dns-vnet-link.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ param vnetId string
55
param privateDnsZoneName string
66
var vnet_id_hash = uniqueString(vnetId)
77

8-
resource dnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
8+
resource dnsZone 'Microsoft.Network/privateDnsZones@2024-06-01' = {
99
name: privateDnsZoneName
1010
location: 'global'
1111
properties: {}
1212
}
1313

14-
resource dnsZoneLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = {
14+
resource dnsZoneLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2024-06-01' = {
1515
name: 'vnet-link-${privateDnsZoneName}-${vnet_id_hash}'
1616
location: 'global'
1717
parent: dnsZone

infra/core/vnet/private-dns-zone-a-record.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ param ttl int = 900
1313
@description('The IP address')
1414
param ipv4Address string
1515

16-
resource dnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = {
16+
resource dnsZone 'Microsoft.Network/privateDnsZones@2024-06-01' existing = {
1717
name: dnsZoneName
1818
}
1919

20-
resource aRecord 'Microsoft.Network/privateDnsZones/A@2020-06-01' = {
20+
resource aRecord 'Microsoft.Network/privateDnsZones/A@2024-06-01' = {
2121
name: name
2222
parent: dnsZone
2323
properties: {

infra/core/vnet/private-dns-zone.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ param name string
77
@description('The name of the virtual networks the DNS zone should be associated with.')
88
param vnetNames string[]
99

10-
resource dnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
10+
resource dnsZone 'Microsoft.Network/privateDnsZones@2024-06-01' = {
1111
name: name
1212
location: 'global'
1313
properties: {}
1414
}
1515

16-
resource vnets 'Microsoft.Network/virtualNetworks@2024-01-01' existing = [
16+
resource vnets 'Microsoft.Network/virtualNetworks@2024-05-01' existing = [
1717
for vnetName in vnetNames: {
1818
name: vnetName
1919
}
2020
]
2121

22-
resource dnsZoneLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = [
22+
resource dnsZoneLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2024-06-01' = [
2323
for (vnetName, index) in vnetNames: {
2424
name: vnetName
2525
location: 'global'

infra/core/vnet/private-endpoint.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ param privateEndpointName string
1414
param groupId string
1515
param location string = resourceGroup().location
1616

17-
resource privateEndpoint 'Microsoft.Network/privateEndpoints@2021-05-01' = {
17+
resource privateEndpoint 'Microsoft.Network/privateEndpoints@2024-05-01' = {
1818
name: privateEndpointName
1919
location: location
2020
properties: {
@@ -33,7 +33,7 @@ resource privateEndpoint 'Microsoft.Network/privateEndpoints@2021-05-01' = {
3333
}
3434
}
3535

36-
resource privateDnsZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2021-05-01' = {
36+
resource privateDnsZoneGroup 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2024-05-01' = {
3737
name: groupId
3838
parent: privateEndpoint
3939
properties: {

infra/core/vnet/privatelink-private-dns-zones.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var privateDnsZones = union(
2020
[aiSearchPrivateDnsZoneName]
2121
)
2222

23-
resource privateDnsZoneResources 'Microsoft.Network/privateDnsZones@2020-06-01' = [
23+
resource privateDnsZoneResources 'Microsoft.Network/privateDnsZones@2024-06-01' = [
2424
for name in privateDnsZones: {
2525
name: name
2626
location: 'global'

infra/core/vnet/vnet-dns-link.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
param privateDnsZoneName string
55
param vnetIds array
66

7-
resource privateDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' existing = {
7+
resource privateDnsZone 'Microsoft.Network/privateDnsZones@2024-06-01' existing = {
88
name: privateDnsZoneName
99
}
1010

11-
resource dnsVnetLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = [
11+
resource dnsVnetLinks 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2024-06-01' = [
1212
for vnetId in vnetIds: {
1313
name: '${replace(privateDnsZoneName, '.', '-')}-${uniqueString(vnetId)}'
1414
parent: privateDnsZone

infra/core/vnet/vnet.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ param apimTier string
1717
@description('NSG resource ID.')
1818
param nsgID string
1919

20-
resource vnet 'Microsoft.Network/virtualNetworks@2024-01-01' = {
20+
resource vnet 'Microsoft.Network/virtualNetworks@2024-05-01' = {
2121
name: vnetName
2222
location: location
2323
properties: {

0 commit comments

Comments
 (0)