Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_api_management - remove ForceNew from zones in additional_location #26384

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 17 additions & 0 deletions internal/services/apimanagement/api_management_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
})
}

Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/api_management.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading