Open sri-pb opened 11 months ago
I also see the same behaviour. Using Terraform version: 1.5.7 AzureRM Provider version: 3.74.0
Same issue here AzureRM 3.107.0
(current latest version)
Ok after looking into this abit more it seems that you cannot change zone_redundant
after deploying. You would need to destroy, however you can delete/re-add a region with availability zones enabled:-
@alec-pinson Are you saying that we will need to setup a process for achieving this via terraform and deployment pipelines? That way we will need to do each step via code to enable zone redundancy.
So if it's brand new cosmos db then setting zone redundancy will work.
If it's already existing then for me the easiest way was manually doing the above steps... if you run a terraform plan after completing the above steps there's no changes.
Is there an existing issue for this?
Community Note
Terraform Version
1.5.7
AzureRM Provider Version
3.73.0
Affected Resource(s)/Data Source(s)
azurerm_cosmosdb_account
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
When updating an existing "azurerm_cosmosdb_account", terraform (azurerm) provider should detect change in
zone_redundant
setting and enable/disable zone redundancy accordingly.Actual Behaviour
The zone_redundant property is being ignored in subsequent changes to an existing "azurerm_cosmosdb_account".
Steps to Reproduce
terraform apply
(on the Terraform Configuration file provided above)terraform apply
command should have created a cosmosdb account with ID similar to [id=/subscriptions/add zone_redundant = true
Note: The issue has been observed across the following versions: Terraform Version: 1.5.7 or 1.5.0 AzureRM Provider Version: 3.31.0 or 3.73.0
Important Factoids
No response
References
No response