Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SQL Server ZR default updates (#3093) #3099

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion avm/res/sql/server/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ Whether or not this database is zone redundant.

- Required: No
- Type: bool
- Default: `False`
- Default: `True`


## Outputs
Expand Down
2 changes: 1 addition & 1 deletion avm/res/sql/server/database/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ param maxSizeBytes int = 34359738368
param sampleName string = ''

@description('Optional. Whether or not this database is zone redundant.')
param zoneRedundant bool = false
param zoneRedundant bool = true

@description('Optional. The license type to apply for this database.')
param licenseType string = ''
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/database/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "8343448660522432164"
"templateHash": "6019999815954957727"
},
"name": "SQL Server Database",
"description": "This module deploys an Azure SQL Server Database.",
Expand Down Expand Up @@ -217,7 +217,7 @@
},
"zoneRedundant": {
"type": "bool",
"defaultValue": false,
"defaultValue": true,
"metadata": {
"description": "Optional. Whether or not this database is zone redundant."
}
Expand Down
2 changes: 1 addition & 1 deletion avm/res/sql/server/elastic-pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Whether or not this elastic pool is zone redundant, which means the replicas of

- Required: No
- Type: bool
- Default: `False`
- Default: `True`


## Outputs
Expand Down
2 changes: 1 addition & 1 deletion avm/res/sql/server/elastic-pool/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ param databaseMaxCapacity int = 2
param databaseMinCapacity int = 0

@description('Optional. Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.')
param zoneRedundant bool = false
param zoneRedundant bool = true

resource server 'Microsoft.Sql/servers@2023-08-01-preview' existing = {
name: serverName
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/elastic-pool/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "17663884310941548142"
"templateHash": "18037703368269722870"
},
"name": "SQL Server Elastic Pool",
"description": "This module deploys an Azure SQL Server Elastic Pool.",
Expand Down Expand Up @@ -115,7 +115,7 @@
},
"zoneRedundant": {
"type": "bool",
"defaultValue": false,
"defaultValue": true,
"metadata": {
"description": "Optional. Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones."
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ module server_databases 'database/main.bicep' = [
: ''
sampleName: contains(database, 'sampleName') ? database.sampleName : ''
tags: database.?tags ?? tags
zoneRedundant: contains(database, 'zoneRedundant') ? database.zoneRedundant : false
zoneRedundant: contains(database, 'zoneRedundant') ? database.zoneRedundant : true
elasticPoolId: contains(database, 'elasticPoolId') ? database.elasticPoolId : ''
backupShortTermRetentionPolicy: contains(database, 'backupShortTermRetentionPolicy')
? database.backupShortTermRetentionPolicy
Expand Down Expand Up @@ -305,7 +305,7 @@ module server_elasticPools 'elastic-pool/main.bicep' = [
skuCapacity: contains(elasticPool, 'skuCapacity') ? elasticPool.skuCapacity : 2
skuName: contains(elasticPool, 'skuName') ? elasticPool.skuName : 'GP_Gen5'
skuTier: contains(elasticPool, 'skuTier') ? elasticPool.skuTier : 'GeneralPurpose'
zoneRedundant: contains(elasticPool, 'zoneRedundant') ? elasticPool.zoneRedundant : false
zoneRedundant: contains(elasticPool, 'zoneRedundant') ? elasticPool.zoneRedundant : true
location: location
tags: elasticPool.?tags ?? tags
}
Expand Down
14 changes: 7 additions & 7 deletions avm/res/sql/server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "18130756437591455522"
"templateHash": "8727418248832787909"
},
"name": "Azure SQL Servers",
"description": "This module deploys an Azure SQL Server.",
Expand Down Expand Up @@ -740,7 +740,7 @@
"tags": {
"value": "[coalesce(tryGet(parameters('databases')[copyIndex()], 'tags'), parameters('tags'))]"
},
"zoneRedundant": "[if(contains(parameters('databases')[copyIndex()], 'zoneRedundant'), createObject('value', parameters('databases')[copyIndex()].zoneRedundant), createObject('value', false()))]",
"zoneRedundant": "[if(contains(parameters('databases')[copyIndex()], 'zoneRedundant'), createObject('value', parameters('databases')[copyIndex()].zoneRedundant), createObject('value', true()))]",
"elasticPoolId": "[if(contains(parameters('databases')[copyIndex()], 'elasticPoolId'), createObject('value', parameters('databases')[copyIndex()].elasticPoolId), createObject('value', ''))]",
"backupShortTermRetentionPolicy": "[if(contains(parameters('databases')[copyIndex()], 'backupShortTermRetentionPolicy'), createObject('value', parameters('databases')[copyIndex()].backupShortTermRetentionPolicy), createObject('value', createObject()))]",
"backupLongTermRetentionPolicy": "[if(contains(parameters('databases')[copyIndex()], 'backupLongTermRetentionPolicy'), createObject('value', parameters('databases')[copyIndex()].backupLongTermRetentionPolicy), createObject('value', createObject()))]",
Expand All @@ -758,7 +758,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "8343448660522432164"
"templateHash": "6019999815954957727"
},
"name": "SQL Server Database",
"description": "This module deploys an Azure SQL Server Database.",
Expand Down Expand Up @@ -969,7 +969,7 @@
},
"zoneRedundant": {
"type": "bool",
"defaultValue": false,
"defaultValue": true,
"metadata": {
"description": "Optional. Whether or not this database is zone redundant."
}
Expand Down Expand Up @@ -1500,7 +1500,7 @@
"skuCapacity": "[if(contains(parameters('elasticPools')[copyIndex()], 'skuCapacity'), createObject('value', parameters('elasticPools')[copyIndex()].skuCapacity), createObject('value', 2))]",
"skuName": "[if(contains(parameters('elasticPools')[copyIndex()], 'skuName'), createObject('value', parameters('elasticPools')[copyIndex()].skuName), createObject('value', 'GP_Gen5'))]",
"skuTier": "[if(contains(parameters('elasticPools')[copyIndex()], 'skuTier'), createObject('value', parameters('elasticPools')[copyIndex()].skuTier), createObject('value', 'GeneralPurpose'))]",
"zoneRedundant": "[if(contains(parameters('elasticPools')[copyIndex()], 'zoneRedundant'), createObject('value', parameters('elasticPools')[copyIndex()].zoneRedundant), createObject('value', false()))]",
"zoneRedundant": "[if(contains(parameters('elasticPools')[copyIndex()], 'zoneRedundant'), createObject('value', parameters('elasticPools')[copyIndex()].zoneRedundant), createObject('value', true()))]",
"location": {
"value": "[parameters('location')]"
},
Expand All @@ -1516,7 +1516,7 @@
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "17663884310941548142"
"templateHash": "18037703368269722870"
},
"name": "SQL Server Elastic Pool",
"description": "This module deploys an Azure SQL Server Elastic Pool.",
Expand Down Expand Up @@ -1625,7 +1625,7 @@
},
"zoneRedundant": {
"type": "bool",
"defaultValue": false,
"defaultValue": true,
"metadata": {
"description": "Optional. Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones."
}
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#",
"version": "0.5",
"version": "0.6",
"pathFilters": [
"./main.json"
]
}
}