From 507d8c0f651f44156663f9f12942d2748a08353d Mon Sep 17 00:00:00 2001 From: Ahmad Abdalla <28486158+ahmadabdalla@users.noreply.github.com> Date: Wed, 18 Oct 2023 08:42:08 +1100 Subject: [PATCH] [Modules] Update the SQL - Server module API version to the latest documented version (#4102) * [Modules] Updated SQL Server API to latest documented * jsons * updated readme --- .../.bicep/nested_roleAssignments.bicep | 2 +- modules/sql/server/README.md | 14 ++++---- modules/sql/server/database/README.md | 11 ++++++- modules/sql/server/database/main.bicep | 13 ++++++-- modules/sql/server/database/main.json | 19 +++++++++-- modules/sql/server/elastic-pool/README.md | 2 +- modules/sql/server/elastic-pool/main.bicep | 4 +-- modules/sql/server/elastic-pool/main.json | 6 ++-- .../sql/server/encryption-protector/README.md | 2 +- .../server/encryption-protector/main.bicep | 4 +-- .../sql/server/encryption-protector/main.json | 4 +-- modules/sql/server/firewall-rule/README.md | 2 +- modules/sql/server/firewall-rule/main.bicep | 4 +-- modules/sql/server/firewall-rule/main.json | 4 +-- modules/sql/server/main.json | 33 +++++++++++++------ .../server/security-alert-policy/README.md | 2 +- .../server/security-alert-policy/main.bicep | 4 +-- .../server/security-alert-policy/main.json | 4 +-- .../sql/server/virtual-network-rule/README.md | 2 +- .../server/virtual-network-rule/main.bicep | 4 +-- .../sql/server/virtual-network-rule/main.json | 4 +-- .../server/vulnerability-assessment/README.md | 2 +- .../vulnerability-assessment/main.bicep | 4 +-- .../server/vulnerability-assessment/main.json | 4 +-- 24 files changed, 99 insertions(+), 55 deletions(-) diff --git a/modules/sql/server/.bicep/nested_roleAssignments.bicep b/modules/sql/server/.bicep/nested_roleAssignments.bicep index 0468e9e747..b4734d4462 100644 --- a/modules/sql/server/.bicep/nested_roleAssignments.bicep +++ b/modules/sql/server/.bicep/nested_roleAssignments.bicep @@ -56,7 +56,7 @@ var builtInRoleNames = { 'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9') } -resource server 'Microsoft.Sql/servers@2022-02-01-preview' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: last(split(resourceId, '/'))! } diff --git a/modules/sql/server/README.md b/modules/sql/server/README.md index c19646e425..36bc8f5f0a 100644 --- a/modules/sql/server/README.md +++ b/modules/sql/server/README.md @@ -21,16 +21,16 @@ This module deploys an Azure SQL Server. | `Microsoft.Network/privateEndpoints` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints) | | `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Network/2023-04-01/privateEndpoints/privateDnsZoneGroups) | | `Microsoft.Sql/servers` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers) | -| `Microsoft.Sql/servers/databases` | [2021-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2021-11-01/servers/databases) | +| `Microsoft.Sql/servers/databases` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases) | | `Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases/backupLongTermRetentionPolicies) | | `Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases/backupShortTermRetentionPolicies) | -| `Microsoft.Sql/servers/elasticPools` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/elasticPools) | -| `Microsoft.Sql/servers/encryptionProtector` | [2022-08-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/servers/encryptionProtector) | -| `Microsoft.Sql/servers/firewallRules` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/firewallRules) | +| `Microsoft.Sql/servers/elasticPools` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/elasticPools) | +| `Microsoft.Sql/servers/encryptionProtector` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/encryptionProtector) | +| `Microsoft.Sql/servers/firewallRules` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/firewallRules) | | `Microsoft.Sql/servers/keys` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/keys) | -| `Microsoft.Sql/servers/securityAlertPolicies` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/securityAlertPolicies) | -| `Microsoft.Sql/servers/virtualNetworkRules` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/virtualNetworkRules) | -| `Microsoft.Sql/servers/vulnerabilityAssessments` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/vulnerabilityAssessments) | +| `Microsoft.Sql/servers/securityAlertPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/securityAlertPolicies) | +| `Microsoft.Sql/servers/virtualNetworkRules` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/virtualNetworkRules) | +| `Microsoft.Sql/servers/vulnerabilityAssessments` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/vulnerabilityAssessments) | ## Usage examples diff --git a/modules/sql/server/database/README.md b/modules/sql/server/database/README.md index e6ac170a59..73ac2bae07 100644 --- a/modules/sql/server/database/README.md +++ b/modules/sql/server/database/README.md @@ -14,7 +14,7 @@ This module deploys an Azure SQL Server Database. | Resource Type | API Version | | :-- | :-- | | `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) | -| `Microsoft.Sql/servers/databases` | [2021-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2021-11-01/servers/databases) | +| `Microsoft.Sql/servers/databases` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases) | | `Microsoft.Sql/servers/databases/backupLongTermRetentionPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases/backupLongTermRetentionPolicies) | | `Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/databases/backupShortTermRetentionPolicies) | @@ -57,6 +57,7 @@ This module deploys an Azure SQL Server Database. | [`maintenanceConfigurationId`](#parameter-maintenanceconfigurationid) | string | Maintenance configuration ID assigned to the database. This configuration defines the period when the maintenance updates will occur. | | [`maxSizeBytes`](#parameter-maxsizebytes) | int | The max size of the database expressed in bytes. | | [`minCapacity`](#parameter-mincapacity) | string | Minimal capacity that database will always have allocated. | +| [`preferredEnclaveType`](#parameter-preferredenclavetype) | string | Type of enclave requested on the database i.e. Default or VBS enclaves. | | [`readScale`](#parameter-readscale) | string | The state of read-only routing. | | [`recoveryServicesRecoveryPointResourceId`](#parameter-recoveryservicesrecoverypointresourceid) | string | Resource ID of backup if createMode set to RestoreLongTermRetentionBackup. | | [`requestedBackupStorageRedundancy`](#parameter-requestedbackupstorageredundancy) | string | The storage account type to be used to store backups for this database. | @@ -228,6 +229,14 @@ The name of the database. - Required: Yes - Type: string +### Parameter: `preferredEnclaveType` + +Type of enclave requested on the database i.e. Default or VBS enclaves. +- Required: No +- Type: string +- Default: `''` +- Allowed: `['', Default, VBS]` + ### Parameter: `readScale` The state of read-only routing. diff --git a/modules/sql/server/database/main.bicep b/modules/sql/server/database/main.bicep index d41562b0be..67a545d328 100644 --- a/modules/sql/server/database/main.bicep +++ b/modules/sql/server/database/main.bicep @@ -20,6 +20,14 @@ param skuName string = 'GP_Gen5_2' @description('Optional. Capacity of the particular SKU.') param skuCapacity int = -1 +@description('Optional. Type of enclave requested on the database i.e. Default or VBS enclaves.') +@allowed([ + '' + 'Default' + 'VBS' +]) +param preferredEnclaveType string = '' + @description('Optional. If the service has different generations of hardware, for the same SKU, then that can be captured here.') param skuFamily string = '' @@ -202,16 +210,17 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2021-11-01' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource database 'Microsoft.Sql/servers/databases@2021-11-01' = { +resource database 'Microsoft.Sql/servers/databases@2022-05-01-preview' = { name: name parent: server location: location tags: tags properties: { + preferredEnclaveType: !empty(preferredEnclaveType) ? preferredEnclaveType : null collation: collation maxSizeBytes: maxSizeBytes sampleName: sampleName diff --git a/modules/sql/server/database/main.json b/modules/sql/server/database/main.json index 13c0eb69b1..47c37b2299 100644 --- a/modules/sql/server/database/main.json +++ b/modules/sql/server/database/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7000207485744795208" + "templateHash": "14921090017328805601" }, "name": "SQL Server Database", "description": "This module deploys an Azure SQL Server Database.", @@ -52,6 +52,18 @@ "description": "Optional. Capacity of the particular SKU." } }, + "preferredEnclaveType": { + "type": "string", + "defaultValue": "", + "allowedValues": [ + "", + "Default", + "VBS" + ], + "metadata": { + "description": "Optional. Type of enclave requested on the database i.e. Default or VBS enclaves." + } + }, "skuFamily": { "type": "string", "defaultValue": "", @@ -356,11 +368,12 @@ }, { "type": "Microsoft.Sql/servers/databases", - "apiVersion": "2021-11-01", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "location": "[parameters('location')]", "tags": "[parameters('tags')]", "properties": { + "preferredEnclaveType": "[if(not(empty(parameters('preferredEnclaveType'))), parameters('preferredEnclaveType'), null())]", "collation": "[parameters('collation')]", "maxSizeBytes": "[parameters('maxSizeBytes')]", "sampleName": "[parameters('sampleName')]", @@ -688,7 +701,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/databases', parameters('serverName'), parameters('name')), '2021-11-01', 'full').location]" + "value": "[reference(resourceId('Microsoft.Sql/servers/databases', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" } } } \ No newline at end of file diff --git a/modules/sql/server/elastic-pool/README.md b/modules/sql/server/elastic-pool/README.md index a9b07265b1..8cbfe4e622 100644 --- a/modules/sql/server/elastic-pool/README.md +++ b/modules/sql/server/elastic-pool/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Elastic Pool. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/elasticPools` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/elasticPools) | +| `Microsoft.Sql/servers/elasticPools` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/elasticPools) | ## Parameters diff --git a/modules/sql/server/elastic-pool/main.bicep b/modules/sql/server/elastic-pool/main.bicep index cf9e837f11..0a1246a96d 100644 --- a/modules/sql/server/elastic-pool/main.bicep +++ b/modules/sql/server/elastic-pool/main.bicep @@ -66,11 +66,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2021-11-01' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource elasticPool 'Microsoft.Sql/servers/elasticPools@2022-02-01-preview' = { +resource elasticPool 'Microsoft.Sql/servers/elasticPools@2022-05-01-preview' = { name: name location: location parent: server diff --git a/modules/sql/server/elastic-pool/main.json b/modules/sql/server/elastic-pool/main.json index 4f107f39b6..d530033524 100644 --- a/modules/sql/server/elastic-pool/main.json +++ b/modules/sql/server/elastic-pool/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "1361594412163336206" + "templateHash": "2069769222124842536" }, "name": "SQL Server Elastic Pool", "description": "This module deploys an Azure SQL Server Elastic Pool.", @@ -144,7 +144,7 @@ }, { "type": "Microsoft.Sql/servers/elasticPools", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "location": "[parameters('location')]", "tags": "[parameters('tags')]", @@ -194,7 +194,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-02-01-preview', 'full').location]" + "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" } } } \ No newline at end of file diff --git a/modules/sql/server/encryption-protector/README.md b/modules/sql/server/encryption-protector/README.md index 435f550d8a..1b0d3b9083 100644 --- a/modules/sql/server/encryption-protector/README.md +++ b/modules/sql/server/encryption-protector/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Encryption Protector. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/encryptionProtector` | [2022-08-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/servers/encryptionProtector) | +| `Microsoft.Sql/servers/encryptionProtector` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/encryptionProtector) | ## Parameters diff --git a/modules/sql/server/encryption-protector/main.bicep b/modules/sql/server/encryption-protector/main.bicep index dcf563b936..1f2b50faa3 100644 --- a/modules/sql/server/encryption-protector/main.bicep +++ b/modules/sql/server/encryption-protector/main.bicep @@ -33,11 +33,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource sqlServer 'Microsoft.Sql/servers@2022-08-01-preview' existing = { +resource sqlServer 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: sqlServerName } -resource encryptionProtector 'Microsoft.Sql/servers/encryptionProtector@2022-08-01-preview' = { +resource encryptionProtector 'Microsoft.Sql/servers/encryptionProtector@2022-05-01-preview' = { name: 'current' parent: sqlServer properties: { diff --git a/modules/sql/server/encryption-protector/main.json b/modules/sql/server/encryption-protector/main.json index 097ded1243..718cfcff2b 100644 --- a/modules/sql/server/encryption-protector/main.json +++ b/modules/sql/server/encryption-protector/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "1128739845456097575" + "templateHash": "17224807912051676418" }, "name": "Azure SQL Server Encryption Protector", "description": "This module deploys an Azure SQL Server Encryption Protector.", @@ -67,7 +67,7 @@ }, { "type": "Microsoft.Sql/servers/encryptionProtector", - "apiVersion": "2022-08-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('sqlServerName'), 'current')]", "properties": { "serverKeyType": "[parameters('serverKeyType')]", diff --git a/modules/sql/server/firewall-rule/README.md b/modules/sql/server/firewall-rule/README.md index 02a9a24294..ba542bf482 100644 --- a/modules/sql/server/firewall-rule/README.md +++ b/modules/sql/server/firewall-rule/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Firewall Rule. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/firewallRules` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/firewallRules) | +| `Microsoft.Sql/servers/firewallRules` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/firewallRules) | ## Parameters diff --git a/modules/sql/server/firewall-rule/main.bicep b/modules/sql/server/firewall-rule/main.bicep index 17d4682df0..3cfee2a3f7 100644 --- a/modules/sql/server/firewall-rule/main.bicep +++ b/modules/sql/server/firewall-rule/main.bicep @@ -29,11 +29,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2022-02-01-preview' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource firewallRule 'Microsoft.Sql/servers/firewallRules@2022-02-01-preview' = { +resource firewallRule 'Microsoft.Sql/servers/firewallRules@2022-05-01-preview' = { name: name parent: server properties: { diff --git a/modules/sql/server/firewall-rule/main.json b/modules/sql/server/firewall-rule/main.json index 4c7a239b94..23cfad9e0d 100644 --- a/modules/sql/server/firewall-rule/main.json +++ b/modules/sql/server/firewall-rule/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "17694214441241917212" + "templateHash": "17045860485834879442" }, "name": "Azure SQL Server Firewall Rule", "description": "This module deploys an Azure SQL Server Firewall Rule.", @@ -63,7 +63,7 @@ }, { "type": "Microsoft.Sql/servers/firewallRules", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "endIpAddress": "[parameters('endIpAddress')]", diff --git a/modules/sql/server/main.json b/modules/sql/server/main.json index 37cb2893eb..c7b7b619ef 100644 --- a/modules/sql/server/main.json +++ b/modules/sql/server/main.json @@ -521,6 +521,18 @@ "description": "Optional. Capacity of the particular SKU." } }, + "preferredEnclaveType": { + "type": "string", + "defaultValue": "", + "allowedValues": [ + "", + "Default", + "VBS" + ], + "metadata": { + "description": "Optional. Type of enclave requested on the database i.e. Default or VBS enclaves." + } + }, "skuFamily": { "type": "string", "defaultValue": "", @@ -825,11 +837,12 @@ }, { "type": "Microsoft.Sql/servers/databases", - "apiVersion": "2021-11-01", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "location": "[parameters('location')]", "tags": "[parameters('tags')]", "properties": { + "preferredEnclaveType": "[if(not(empty(parameters('preferredEnclaveType'))), parameters('preferredEnclaveType'), null())]", "collation": "[parameters('collation')]", "maxSizeBytes": "[parameters('maxSizeBytes')]", "sampleName": "[parameters('sampleName')]", @@ -1157,7 +1170,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/databases', parameters('serverName'), parameters('name')), '2021-11-01', 'full').location]" + "value": "[reference(resourceId('Microsoft.Sql/servers/databases', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" } } } @@ -1352,7 +1365,7 @@ }, { "type": "Microsoft.Sql/servers/elasticPools", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "location": "[parameters('location')]", "tags": "[parameters('tags')]", @@ -1402,7 +1415,7 @@ "metadata": { "description": "The location the resource was deployed into." }, - "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-02-01-preview', 'full').location]" + "value": "[reference(resourceId('Microsoft.Sql/servers/elasticPools', parameters('serverName'), parameters('name')), '2022-05-01-preview', 'full').location]" } } } @@ -2066,7 +2079,7 @@ }, { "type": "Microsoft.Sql/servers/firewallRules", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "endIpAddress": "[parameters('endIpAddress')]", @@ -2195,7 +2208,7 @@ }, { "type": "Microsoft.Sql/servers/virtualNetworkRules", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "ignoreMissingVnetServiceEndpoint": "[parameters('ignoreMissingVnetServiceEndpoint')]", @@ -2367,7 +2380,7 @@ }, { "type": "Microsoft.Sql/servers/securityAlertPolicies", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "disabledAlerts": "[parameters('disabledAlerts')]", @@ -2513,7 +2526,7 @@ }, { "type": "Microsoft.Sql/servers/vulnerabilityAssessments", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "storageContainerPath": "[format('https://{0}.blob.{1}/vulnerability-assessment/', last(split(parameters('storageAccountResourceId'), '/')), environment().suffixes.storage)]", @@ -2784,7 +2797,7 @@ }, { "type": "Microsoft.Sql/servers/encryptionProtector", - "apiVersion": "2022-08-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('sqlServerName'), 'current')]", "properties": { "serverKeyType": "[parameters('serverKeyType')]", @@ -2861,4 +2874,4 @@ "value": "[reference(resourceId('Microsoft.Sql/servers', parameters('name')), '2022-05-01-preview', 'full').location]" } } -} \ No newline at end of file +} diff --git a/modules/sql/server/security-alert-policy/README.md b/modules/sql/server/security-alert-policy/README.md index 765094b147..aea40673ca 100644 --- a/modules/sql/server/security-alert-policy/README.md +++ b/modules/sql/server/security-alert-policy/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Security Alert Policy. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/securityAlertPolicies` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/securityAlertPolicies) | +| `Microsoft.Sql/servers/securityAlertPolicies` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/securityAlertPolicies) | ## Parameters diff --git a/modules/sql/server/security-alert-policy/main.bicep b/modules/sql/server/security-alert-policy/main.bicep index ef82c114e2..458579d834 100644 --- a/modules/sql/server/security-alert-policy/main.bicep +++ b/modules/sql/server/security-alert-policy/main.bicep @@ -49,11 +49,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2022-02-01-preview' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource securityAlertPolicy 'Microsoft.Sql/servers/securityAlertPolicies@2022-02-01-preview' = { +resource securityAlertPolicy 'Microsoft.Sql/servers/securityAlertPolicies@2022-05-01-preview' = { name: name parent: server properties: { diff --git a/modules/sql/server/security-alert-policy/main.json b/modules/sql/server/security-alert-policy/main.json index 5e45eacbe7..f7e0552ee2 100644 --- a/modules/sql/server/security-alert-policy/main.json +++ b/modules/sql/server/security-alert-policy/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "13278850436753309790" + "templateHash": "6325803563225314820" }, "name": "Azure SQL Server Security Alert Policies", "description": "This module deploys an Azure SQL Server Security Alert Policy.", @@ -102,7 +102,7 @@ }, { "type": "Microsoft.Sql/servers/securityAlertPolicies", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "disabledAlerts": "[parameters('disabledAlerts')]", diff --git a/modules/sql/server/virtual-network-rule/README.md b/modules/sql/server/virtual-network-rule/README.md index 9124257799..147908a95b 100644 --- a/modules/sql/server/virtual-network-rule/README.md +++ b/modules/sql/server/virtual-network-rule/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Virtual Network Rule. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/virtualNetworkRules` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/virtualNetworkRules) | +| `Microsoft.Sql/servers/virtualNetworkRules` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/virtualNetworkRules) | ## Parameters diff --git a/modules/sql/server/virtual-network-rule/main.bicep b/modules/sql/server/virtual-network-rule/main.bicep index 87c7073c6d..ce53442168 100644 --- a/modules/sql/server/virtual-network-rule/main.bicep +++ b/modules/sql/server/virtual-network-rule/main.bicep @@ -29,11 +29,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2022-02-01-preview' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource virtualNetworkRule 'Microsoft.Sql/servers/virtualNetworkRules@2022-02-01-preview' = { +resource virtualNetworkRule 'Microsoft.Sql/servers/virtualNetworkRules@2022-05-01-preview' = { name: name parent: server properties: { diff --git a/modules/sql/server/virtual-network-rule/main.json b/modules/sql/server/virtual-network-rule/main.json index b718729e1a..bc545b9b1e 100644 --- a/modules/sql/server/virtual-network-rule/main.json +++ b/modules/sql/server/virtual-network-rule/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "6942471200332924480" + "templateHash": "938348054010287381" }, "name": "Azure SQL Server Virtual Network Rules", "description": "This module deploys an Azure SQL Server Virtual Network Rule.", @@ -62,7 +62,7 @@ }, { "type": "Microsoft.Sql/servers/virtualNetworkRules", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "ignoreMissingVnetServiceEndpoint": "[parameters('ignoreMissingVnetServiceEndpoint')]", diff --git a/modules/sql/server/vulnerability-assessment/README.md b/modules/sql/server/vulnerability-assessment/README.md index ca920e3719..ba96061893 100644 --- a/modules/sql/server/vulnerability-assessment/README.md +++ b/modules/sql/server/vulnerability-assessment/README.md @@ -13,7 +13,7 @@ This module deploys an Azure SQL Server Vulnerability Assessment. | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Sql/servers/vulnerabilityAssessments` | [2022-02-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-02-01-preview/servers/vulnerabilityAssessments) | +| `Microsoft.Sql/servers/vulnerabilityAssessments` | [2022-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2022-05-01-preview/servers/vulnerabilityAssessments) | ## Parameters diff --git a/modules/sql/server/vulnerability-assessment/main.bicep b/modules/sql/server/vulnerability-assessment/main.bicep index 8357c30622..7821e1dea5 100644 --- a/modules/sql/server/vulnerability-assessment/main.bicep +++ b/modules/sql/server/vulnerability-assessment/main.bicep @@ -35,11 +35,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource server 'Microsoft.Sql/servers@2022-02-01-preview' existing = { +resource server 'Microsoft.Sql/servers@2022-05-01-preview' existing = { name: serverName } -resource vulnerabilityAssessment 'Microsoft.Sql/servers/vulnerabilityAssessments@2022-02-01-preview' = { +resource vulnerabilityAssessment 'Microsoft.Sql/servers/vulnerabilityAssessments@2022-05-01-preview' = { name: name parent: server properties: { diff --git a/modules/sql/server/vulnerability-assessment/main.json b/modules/sql/server/vulnerability-assessment/main.json index 1e52c4fa98..29a24e8faa 100644 --- a/modules/sql/server/vulnerability-assessment/main.json +++ b/modules/sql/server/vulnerability-assessment/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "10943798083405880032" + "templateHash": "2049927305875122003" }, "name": "Azure SQL Server Vulnerability Assessments", "description": "This module deploys an Azure SQL Server Vulnerability Assessment.", @@ -77,7 +77,7 @@ }, { "type": "Microsoft.Sql/servers/vulnerabilityAssessments", - "apiVersion": "2022-02-01-preview", + "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('serverName'), parameters('name'))]", "properties": { "storageContainerPath": "[format('https://{0}.blob.{1}/vulnerability-assessment/', last(split(parameters('storageAccountResourceId'), '/')), environment().suffixes.storage)]",