Open vzabawski opened 9 months ago
To summarize, I see this issue as a mix of factors:
Thanks for raising this issue. There is already an issue on https://github.com/Azure/azure-rest-api-specs/issues/22980 for tracking the error message improvement.
Yes, this is an upstream issue where Azure doesn't validate inputs nor return any meaningful error for such scenario.
Nevertheless, I think azurerm provider behavior could be improved by simply validating whether geo_backup_user_assigned_identity_id
and geo_backup_key_vault_key_id
are set when geo_redundant_backup_enabled
is set to true
and CMK encryption is configured.
Is there an existing issue for this?
Community Note
Terraform Version
1.5.3
AzureRM Provider Version
3.93.0
Affected Resource(s)/Data Source(s)
azurerm_mysql_flexible_server
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Azure provider throws error, because
geo_backup_user_assigned_identity_id
cannot be empty ifgeo_redundant_backup_enabled
.Actual Behaviour
"An unexpected error occured while processing the request." And that's all the information I got. It took me a while to figure out what was wrong. I created the server manually with geo redundant backup enabled, imported into Terraform, and tried to finish the configuration with Terraform. And after that, I got an error message that explained what was wrong:
Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response