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

Commit 584b004

Browse files
Merge pull request #1 from juliamuiruri4/bicep-updates
chore: Update Azure resource versions to latest stable releases
2 parents e1c8353 + 71604a3 commit 584b004

35 files changed

+68
-67
lines changed

infra/app/apim-api.bicep

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ param apiBackendUrl string
2525

2626
var apiPolicyContent = replace(loadTextContent('apim-api-policy.xml'), '{origin}', webFrontendUrl)
2727

28-
resource restApi 'Microsoft.ApiManagement/service/apis@2021-12-01-preview' = {
28+
resource restApi 'Microsoft.ApiManagement/service/apis@2023-05-01-preview' = {
2929
name: apiName
3030
parent: apimService
3131
properties: {
@@ -41,7 +41,7 @@ resource restApi 'Microsoft.ApiManagement/service/apis@2021-12-01-preview' = {
4141
}
4242
}
4343

44-
resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2021-12-01-preview' = {
44+
resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2023-05-01-preview' = {
4545
name: 'policy'
4646
parent: restApi
4747
properties: {
@@ -50,7 +50,7 @@ resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2021-12-01-pre
5050
}
5151
}
5252

53-
resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2021-12-01-preview' = {
53+
resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2023-05-01-preview' = {
5454
name: 'applicationinsights'
5555
parent: restApi
5656
properties: {
@@ -91,7 +91,7 @@ resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2021-1
9191
}
9292
}
9393

94-
resource apimProduct 'Microsoft.ApiManagement/service/products@2022-08-01' = {
94+
resource apimProduct 'Microsoft.ApiManagement/service/products@2023-05-01-preview' = {
9595
name: 'apim-api-product'
9696
parent: apimService
9797
properties: {
@@ -104,11 +104,11 @@ resource apimProduct 'Microsoft.ApiManagement/service/products@2022-08-01' = {
104104
}
105105
}
106106

107-
resource apimService 'Microsoft.ApiManagement/service@2021-08-01' existing = {
107+
resource apimService 'Microsoft.ApiManagement/service@2023-05-01-preview' existing = {
108108
name: name
109109
}
110110

111-
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2021-12-01-preview' existing = {
111+
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2023-05-01-preview' existing = {
112112
name: 'app-insights-logger'
113113
parent: apimService
114114
}

infra/app/apim-stripe.bicep

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ param apiBackendUrl string
2525

2626
var apiPolicyContent = replace(loadTextContent('apim-api-policy.xml'), '{origin}', webFrontendUrl)
2727

28-
resource restApi 'Microsoft.ApiManagement/service/apis@2021-12-01-preview' = {
28+
resource restApi 'Microsoft.ApiManagement/service/apis@2023-05-01-preview' = {
2929
name: apiName
3030
parent: apimService
3131
properties: {
@@ -41,7 +41,7 @@ resource restApi 'Microsoft.ApiManagement/service/apis@2021-12-01-preview' = {
4141
}
4242
}
4343

44-
resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2021-12-01-preview' = {
44+
resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2023-05-01-preview' = {
4545
name: 'policy'
4646
parent: restApi
4747
properties: {
@@ -50,7 +50,7 @@ resource apiPolicy 'Microsoft.ApiManagement/service/apis/policies@2021-12-01-pre
5050
}
5151
}
5252

53-
resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2021-12-01-preview' = {
53+
resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2023-05-01-preview' = {
5454
name: 'applicationinsights'
5555
parent: restApi
5656
properties: {
@@ -91,7 +91,7 @@ resource apiDiagnostics 'Microsoft.ApiManagement/service/apis/diagnostics@2021-1
9191
}
9292
}
9393

94-
resource apimProduct 'Microsoft.ApiManagement/service/products@2022-08-01' = {
94+
resource apimProduct 'Microsoft.ApiManagement/service/products@2023-05-01-preview' = {
9595
name: 'apim-product'
9696
parent: apimService
9797
properties: {
@@ -102,11 +102,11 @@ resource apimProduct 'Microsoft.ApiManagement/service/products@2022-08-01' = {
102102
}
103103
}
104104

105-
resource apimService 'Microsoft.ApiManagement/service@2021-08-01' existing = {
105+
resource apimService 'Microsoft.ApiManagement/service@2023-05-01-preview' existing = {
106106
name: name
107107
}
108108

109-
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2021-12-01-preview' existing = {
109+
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2023-05-01-preview' existing = {
110110
name: 'app-insights-logger'
111111
parent: apimService
112112
}

infra/app/blog.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing
5252
name: applicationInsightsName
5353
}
5454

55-
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
55+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
5656
name: keyVaultName
5757
}
5858

infra/app/cms.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing
140140
name: applicationInsightsName
141141
}
142142

143-
resource keyVault 'Microsoft.KeyVault/vaults@2022-11-01' existing = {
143+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
144144
name: keyVaultName
145145
}
146146

147-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = {
147+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' existing = {
148148
name: storageAccountName
149149
}
150150

infra/app/events.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ module events '../core/pubsub/event-grid.bicep' = {
1616
}
1717
}
1818

19-
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = {
19+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' existing = {
2020
name: storageAccountName
2121
}

infra/app/notifications-backend.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing
5656
name: applicationInsightsName
5757
}
5858

59-
resource awps 'Microsoft.SignalRService/webPubSub@2023-02-01' existing = {
59+
resource awps 'Microsoft.SignalRService/webPubSub@2023-08-01-preview' existing = {
6060
name: notificationsServiceName
6161
}
6262

63-
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
63+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
6464
name: keyVaultName
6565
}
6666

infra/app/portal-backend.bicep

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ param useAPIM bool
55
param portalName string
66
param apiServiceName string
77

8-
resource portalApimProperties 'Microsoft.Web/staticSites/linkedBackends@2022-03-01' = {
8+
resource portalApimProperties 'Microsoft.Web/staticSites/linkedBackends@2022-09-01' = {
99
parent: portal
1010
name: name
1111

@@ -20,11 +20,11 @@ resource portalApimProperties 'Microsoft.Web/staticSites/linkedBackends@2022-03-
2020
}
2121
}
2222

23-
resource portal 'Microsoft.Web/staticSites@2022-03-01' existing = {
23+
resource portal 'Microsoft.Web/staticSites@2022-09-01' existing = {
2424
name: portalName
2525
}
2626

27-
resource apimService 'Microsoft.ApiManagement/service@2021-08-01' existing = {
27+
resource apimService 'Microsoft.ApiManagement/service@2023-05-01-preview' existing = {
2828
name: name
2929
}
3030

infra/core/database/cosmos/cosmos-account.bicep

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ param keyVaultName string
88
@allowed([ 'GlobalDocumentDB', 'MongoDB', 'Parse' ])
99
param kind string
1010

11-
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = {
11+
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' = {
1212
name: name
1313
kind: kind
1414
location: location
@@ -30,15 +30,15 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = {
3030
}
3131
}
3232

33-
resource cosmosConnectionString 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
33+
resource cosmosConnectionString 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = {
3434
parent: keyVault
3535
name: connectionStringKey
3636
properties: {
3737
value: connectionString
3838
}
3939
}
4040

41-
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
41+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
4242
name: keyVaultName
4343
}
4444

infra/core/database/cosmos/mongo/cosmos-mongo-db.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module cosmos 'cosmos-mongo-account.bicep' = {
1818
}
1919
}
2020

21-
resource database 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases@2022-08-15' = {
21+
resource database 'Microsoft.DocumentDB/databaseAccounts/mongodbDatabases@2024-05-15' = {
2222
name: '${accountName}/${databaseName}'
2323
tags: tags
2424
properties: {

infra/core/database/cosmos/sql/cosmos-sql-account.bicep

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module cosmos '../../cosmos/cosmos-account.bicep' = {
1212
tags: tags
1313
keyVaultName: keyVaultName
1414
kind: 'GlobalDocumentDB'
15+
connectionStringKey: ''
1516
}
1617
}
1718

infra/core/database/cosmos/sql/cosmos-sql-db.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module cosmos 'cosmos-sql-account.bicep' = {
1717
}
1818
}
1919

20-
resource database 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2022-05-15' = {
20+
resource database 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2024-05-15' = {
2121
name: '${accountName}/${databaseName}'
2222
properties: {
2323
resource: { id: databaseName }

infra/core/database/cosmos/sql/cosmos-sql-role-assign.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ param accountName string
33
param roleDefinitionId string
44
param principalId string = ''
55

6-
resource role 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2022-05-15' = {
6+
resource role 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2024-05-15' = {
77
parent: cosmos
88
name: guid(roleDefinitionId, principalId, cosmos.id)
99
properties: {
@@ -13,6 +13,6 @@ resource role 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2022-05-
1313
}
1414
}
1515

16-
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' existing = {
16+
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' existing = {
1717
name: accountName
1818
}

infra/core/database/cosmos/sql/cosmos-sql-role-def.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param accountName string
22

3-
resource roleDefinition 'Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions@2022-08-15' = {
3+
resource roleDefinition 'Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions@2024-05-15' = {
44
parent: cosmos
55
name: guid(cosmos.id, accountName, 'sql-role')
66
properties: {
@@ -22,7 +22,7 @@ resource roleDefinition 'Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinition
2222
}
2323
}
2424

25-
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' existing = {
25+
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2024-05-15' existing = {
2626
name: accountName
2727
}
2828

infra/core/database/postgresql/flexibleserver.bicep

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ param keyVaultName string
1818
param version string
1919

2020
// Latest official version 2022-12-01 does not have Bicep types available
21-
resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' = {
21+
resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2023-03-01-preview' = {
2222
location: location
2323
tags: tags
2424
name: name
@@ -63,15 +63,15 @@ resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' =
6363

6464
}
6565

66-
resource postgresPassword 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
66+
resource postgresPassword 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = {
6767
parent: keyVault
6868
name: administratorLoginPasswordKey
6969
properties: {
7070
value: administratorLoginPassword
7171
}
7272
}
7373

74-
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
74+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
7575
name: keyVaultName
7676
}
7777

infra/core/database/sqlserver/sqlserver.bicep

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ param sqlAdminPassword string
1313
@secure()
1414
param appUserPassword string
1515

16-
resource sqlServer 'Microsoft.Sql/servers@2022-05-01-preview' = {
16+
resource sqlServer 'Microsoft.Sql/servers@2023-05-01-preview' = {
1717
name: name
1818
location: location
1919
tags: tags
@@ -42,7 +42,7 @@ resource sqlServer 'Microsoft.Sql/servers@2022-05-01-preview' = {
4242
}
4343
}
4444

45-
resource sqlDeploymentScript 'Microsoft.Resources/deploymentScripts@2020-10-01' = {
45+
resource sqlDeploymentScript 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
4646
name: '${name}-deployment-script'
4747
location: location
4848
kind: 'AzureCLI'
@@ -96,31 +96,31 @@ SCRIPT_END
9696
}
9797
}
9898

99-
resource sqlAdminPasswordSecret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
99+
resource sqlAdminPasswordSecret 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = {
100100
parent: keyVault
101101
name: 'sqlAdminPassword'
102102
properties: {
103103
value: sqlAdminPassword
104104
}
105105
}
106106

107-
resource appUserPasswordSecret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
107+
resource appUserPasswordSecret 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = {
108108
parent: keyVault
109109
name: 'appUserPassword'
110110
properties: {
111111
value: appUserPassword
112112
}
113113
}
114114

115-
resource sqlAzureConnectionStringSercret 'Microsoft.KeyVault/vaults/secrets@2022-07-01' = {
115+
resource sqlAzureConnectionStringSercret 'Microsoft.KeyVault/vaults/secrets@2023-07-01' = {
116116
parent: keyVault
117117
name: connectionStringKey
118118
properties: {
119119
value: '${connectionString}; Password=${appUserPassword}'
120120
}
121121
}
122122

123-
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
123+
resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
124124
name: keyVaultName
125125
}
126126

infra/core/gateway/apim.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ param skuCount int = 0
2626
@description('Azure Application Insights Name')
2727
param applicationInsightsName string
2828

29-
resource apimService 'Microsoft.ApiManagement/service@2021-08-01' = {
29+
resource apimService 'Microsoft.ApiManagement/service@2023-05-01-preview' = {
3030
name: name
3131
location: location
3232
tags: union(tags, { 'azd-service-name': name })
@@ -57,7 +57,7 @@ resource apimService 'Microsoft.ApiManagement/service@2021-08-01' = {
5757
}
5858
}
5959

60-
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2021-12-01-preview' = if (!empty(applicationInsightsName)) {
60+
resource apimLogger 'Microsoft.ApiManagement/service/loggers@2023-05-01-preview' = if (!empty(applicationInsightsName)) {
6161
name: 'app-insights-logger'
6262
parent: apimService
6363
properties: {

infra/core/host/aks-agent-pool.bicep

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ param name string
66
@description('The agent pool configuration')
77
param config object
88

9-
resource aksCluster 'Microsoft.ContainerService/managedClusters@2022-11-02-preview' existing = {
9+
resource aksCluster 'Microsoft.ContainerService/managedClusters@2024-03-02-preview' existing = {
1010
name: clusterName
1111
}
1212

13-
resource nodePool 'Microsoft.ContainerService/managedClusters/agentPools@2022-11-02-preview' = {
13+
resource nodePool 'Microsoft.ContainerService/managedClusters/agentPools@2024-03-02-preview' = {
1414
parent: aksCluster
1515
name: name
1616
properties: config

infra/core/host/aks-managed-cluster.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ param systemPoolConfig object
6161
@description('The DNS prefix to associate with the AKS cluster')
6262
param dnsPrefix string = ''
6363

64-
resource aks 'Microsoft.ContainerService/managedClusters@2022-11-02-preview' = {
64+
resource aks 'Microsoft.ContainerService/managedClusters@2024-03-02-preview' = {
6565
name: name
6666
location: location
6767
tags: tags

infra/core/host/aks.bicep

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ var addOnsConfig = union(
8989
)
9090

9191
// Link to existing log analytics workspace when available
92-
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' existing = if (!empty(logAnalyticsName)) {
92+
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2022-10-01' existing = if (!empty(logAnalyticsName)) {
9393
name: logAnalyticsName
9494
}
9595

0 commit comments

Comments
 (0)