azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[BUG] Provisioning of zone redundant Hyperscale database with geo backup redundancy is not supported. Zone redundant Hyperscale databases must use either zone or geo zone backup redundancy.
Library name and version
Azure.ResourceManager.Sql Version="1.3.0-beta.4"
Describe the bug
I use below code to create elastic pool and sql database
create elastic pool
var data = new ElasticPoolData(new AzureLocation(location))
{
Sku = new SqlSku("HS_PRMS")
{
Tier = "Hyperscale",
Capacity = this.sqlElasticPoolConfig.Capacity,
},
PerDatabaseSettings = new ElasticPoolPerDatabaseSettings()
{
MinCapacity = this.sqlElasticPoolConfig.PerDatabaseMinCapacity,
MaxCapacity = this.sqlElasticPoolConfig.PerDatabaseMaxCapacity,
},
IsZoneRedundant = true,
};
var lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
var result = lro.Value;
create database
var data = new SqlDatabaseData(new AzureLocation(location))
{
ElasticPoolId = new ResourceIdentifier(elasticPoolId),
IsZoneRedundant = true,
};
var lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data);
var result = lro.Value;
I encounter error
Provisioning of zone redundant Hyperscale database with geo backup redundancy is not supported. Zone redundant Hyperscale databases must use either zone or geo zone backup redundancy.
whereas I can create a database with zone redundant set to true successfully from portal.
Expected behavior
The database should be created successfully without error
Actual behavior
Error out:
Provisioning of zone redundant Hyperscale database with geo backup redundancy is not supported. Zone redundant Hyperscale databases must use either zone or geo zone backup redundancy.
Reproduction Steps
Create a hpersacle elasticpool and set IsZoneRedundant to true and try to create a database on it also with IsZoneRedundant set to true.
Environment
.NET SDK: Version: 8.0.302 Commit: ef14e02af8 Workload version: 8.0.300-manifests.ca8b4b2d MSBuild version: 17.10.4+10fbfbf2e
Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.302\
.NET workloads installed: [aspire] Installation Source: VS 17.10.35004.147 Manifest Version: 8.0.0/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0\WorkloadManifest.json Install Type: FileBased
Host: Version: 8.0.6 Architecture: x64 Commit: 3b8b000a0e