diff --git a/internal/services/apimanagement/api_management_resource.go b/internal/services/apimanagement/api_management_resource.go index 33a51077a207..9796cb13c5ad 100644 --- a/internal/services/apimanagement/api_management_resource.go +++ b/internal/services/apimanagement/api_management_resource.go @@ -212,7 +212,7 @@ func resourceApiManagementSchema() map[string]*pluginsdk.Schema { ValidateFunc: validation.IntBetween(0, 12), }, - "zones": commonschema.ZonesMultipleOptionalForceNew(), + "zones": commonschema.ZonesMultipleOptional(), "gateway_regional_url": { Type: pluginsdk.TypeString, diff --git a/internal/services/apimanagement/api_management_resource_test.go b/internal/services/apimanagement/api_management_resource_test.go index 5f22f69e7ac6..12f76a4e3d6d 100644 --- a/internal/services/apimanagement/api_management_resource_test.go +++ b/internal/services/apimanagement/api_management_resource_test.go @@ -188,6 +188,22 @@ func TestAccApiManagement_completeUpdateAdditionalLocations(t *testing.T) { "hostname_configuration.0.proxy.2.certificate", // not returned from API, sensitive "hostname_configuration.0.proxy.2.certificate_password", // not returned from API, sensitive ), + { + Config: r.complete(data), + Check: acceptance.ComposeTestCheckFunc( + check.That(data.ResourceName).ExistsInAzure(r), + ), + }, + data.ImportStep("certificate", // not returned from API, sensitive + "hostname_configuration.0.portal.0.certificate", // not returned from API, sensitive + "hostname_configuration.0.portal.0.certificate_password", // not returned from API, sensitive + "hostname_configuration.0.developer_portal.0.certificate", // not returned from API, sensitive + "hostname_configuration.0.developer_portal.0.certificate_password", // not returned from API, sensitive + "hostname_configuration.0.proxy.1.certificate", // not returned from API, sensitive + "hostname_configuration.0.proxy.1.certificate_password", // not returned from API, sensitive + "hostname_configuration.0.proxy.2.certificate", // not returned from API, sensitive + "hostname_configuration.0.proxy.2.certificate_password", // not returned from API, sensitive + ), }) } @@ -1615,6 +1631,7 @@ resource "azurerm_api_management" "test" { sku_name = "Premium_2" additional_location { + zones = [1] location = azurerm_resource_group.test2.location capacity = 2 } diff --git a/website/docs/r/api_management.html.markdown b/website/docs/r/api_management.html.markdown index 0a17990cdce5..0e87131f1558 100644 --- a/website/docs/r/api_management.html.markdown +++ b/website/docs/r/api_management.html.markdown @@ -117,7 +117,7 @@ A `additional_location` block supports the following: * `capacity` - (Optional) The number of compute units in this region. Defaults to the capacity of the main region. -* `zones` - (Optional) A list of availability zones. Changing this forces a new resource to be created. +* `zones` - (Optional) A list of availability zones. * `public_ip_address_id` - (Optional) ID of a standard SKU IPv4 Public IP.