Reputation: 416
Can anyone advise an approach to enable isZoneRedundant for the existing CosmosDB region?
I think one way could be (say we need it in region A):
Thank you very much,
Upvotes: 1
Views: 3329
Reputation: 141
Your own and Mark Brown's answer is correct
Here is the formal MS doc for it https://learn.microsoft.com/en-us/azure/cosmos-db/high-availability
Zone redundancy can only be configured when adding a new region to an Azure Cosmos account. For existing regions, zone redundancy can be enabled by removing the region then adding it back with the zone redundancy enabled. For a single region account, this requires adding a region to temporarily fail over to, then removing and adding the desired region with zone redundancy enabled.
A note for Terraform users. The terraform plan won't even notice the change/adding of the zone_redundant = true parameter. I thought something was wrong but it probably should error instead of showing no change. You can do the same operation via terraform by running multiple applies to add, remove, re-add with zone_redundant = true. Or do it manually and then do a terraform apply -refresh-only (note: I haven't tried this for zone_redundant, I was using for geo_locations)
Upvotes: 0
Reputation: 8763
The only way to make a region zone redundant after it has already been added to the account is to add a second region, then do a regional failover to that second region, remove the original write region, add it back with zone enabled, then fail over again to the newly added region.
Regional failover is a POST operation so must be done with PowerShell or CLI script. There are examples for azure cli and for PowerShell. These samples also have examples for adding and removing regions as well.
Upvotes: 4