hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.53k stars 4.6k forks source link

Add SQL MI managed instance missing attributes in azurerm 3.56.0 (zone_redundant and storage_account_type=GZRS) #21844

Open LaurentLesle opened 1 year ago

LaurentLesle commented 1 year ago

Is there an existing issue for this?

Community Note

Add support for:

Description

Add support for zone_redundant support. Current deployment of SQL MI servers are deployed with zoneRedundant set to false

image

New or Affected Resource(s)/Data Source(s)

azurerm_mssql_managed_instance

Potential Terraform Configuration

optional attribute. false by default

zone_redundant = true

References

https://learn.microsoft.com/en-us/azure/templates/microsoft.sql/managedinstances?pivots=deployment-language-terraform (version - 2021-11-01)

dtherkil commented 9 months ago

Zone redundancy is now GA for Business Critical Managed Instances so hoping for both these enchancements be implemented soon. GRZS has been for GA for a while.

fgarcia-cnb commented 5 months ago

its been a year since this issue was opened. how has it not been resolved yet? pretty simple fix

Azkel commented 2 months ago

I see that both of those functionalities has been added:

fgarcia-cnb commented 2 months ago

I changed the replication type to GZRS on an existing sql mi through the portal. unfortunately, according to this article it can take up to 24 hours for the change to take effect, so immediate terraform runs will still see pending changes.

that said, after 24 hours, i see my storage account now has GZRS configured, but terraform runs are still seeing GRS:

current resource JSON:

"currentBackupStorageRedundancy": "GeoZone",
"requestedBackupStorageRedundancy": "GeoZone",

but terraform sees:

image

somehow its not detecting GZRS. also, going from GRS->GZRS should not force a rebuild. it can be done in place