Closed edwardccg closed 11 months ago
Workaround solution in case anyone need this urgently.
In summary, we will have to
To add location manually:
zones: []
is respected by the azurerm api here
{
"properties": {
"additionalLocations": [
{
"location": "canadaeast",
"platformVersion": "stv2",
"sku": {
"name": "Premium",
"capacity": 2
},
"zones": [],
"publicIpAddressId": null,
"virtualNetworkConfiguration": {
"subnetResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName}"
}
}
]
}
}
az rest --method PATCH --header "Accept=application/json" \ ─╯
--url 'https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{APIMInstanceName}?api-version=2021-08-01' \
--body @apim-cae-location.json
@manicminer can you please add the service/api-management
tag to this? :-)
Hi @AdamCoulterOz Thanks for looking after this issue. We are building a premium APIM on Australia East with an additional location of Australia Southeast. This bug is blocking us from creating the additional location, as well as any following updates.
Please help to fix the issue. It is muchly appreciated. Thank you
I am having the same issue, with UK South/UK West and Australia East/Australia Southeast.
It appears that the function that constructs the additional locations body elements to send to the API does not reference the additional location block argument of zones, but references the "root" or primary location zones argument.
I have raised #23943 that fixes this, and adds an acceptance test that fails without the change I have made.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.2.4
AzureRM Provider Version
3.4.0
Affected Resource(s)/Data Source(s)
azurerm_api_management
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Should be able to create APIM primary instance with 2 unit, 2 zone, secondary instance with 2 unit with no zone.
Actual Behaviour
Error from the
additional_location
block, probably due to thezones
is enable in primary.additional_location
block is trying to enable using the zones configuration from the primary but since the additional location is canadaeast which do not have availability zone, it failed with following error. Passing in[]
ornull
couldn't help to unset the zones because that seems to evaluate as 'omitted' instead of replacing the zone setup for the additional location.Steps to Reproduce
terraform apply
Important Factoids
No response
References
No response