Skip to content

Commit 0ff404d

Browse files
emgu-mswyunchi-ms
authored andcommitted
Fix Set-AzSqlDatabase no zone resilience set (Azure#10399)
* Fix Set-AzSqlDatabase no zone resilience set
1 parent 11217a9 commit 0ff404d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Sql/Sql/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020
## Upcoming Release
2121
* Added support for database ReadReplicaCount.
22+
* Fixed Set-AzSqlDatabase when zone redundancy not set
2223

2324
## Version 2.0.0
2425
* Added support for restore of dropped databases on Managed Instances.

src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,7 @@ protected override IEnumerable<AzureSqlDatabaseModel> ApplyUserInputToModel(IEnu
262262
ElasticPoolName = ElasticPoolName,
263263
Location = model.FirstOrDefault().Location,
264264
ReadScale = ReadScale,
265-
ZoneRedundant =
266-
ZoneRedundant != null
267-
? (bool?)ZoneRedundant.ToBool()
268-
: null,
265+
ZoneRedundant = MyInvocation.BoundParameters.ContainsKey("ZoneRedundant") ? (bool?)ZoneRedundant.ToBool() : null,
269266
LicenseType = LicenseType ?? model.FirstOrDefault().LicenseType, // set to original license type
270267
AutoPauseDelayInMinutes = this.IsParameterBound(p => p.AutoPauseDelayInMinutes) ? AutoPauseDelayInMinutes : (int?)null,
271268
MinimumCapacity = this.IsParameterBound(p => p.MinimumCapacity) ? MinimumCapacity : (double?)null,

0 commit comments

Comments
 (0)