azure icon indicating copy to clipboard operation
azure copied to clipboard

Support setting endpoint-resource-manager for regional API endpoints

Open Chaffelson opened this issue 3 years ago • 0 comments

SUMMARY

The Azure control plane has a behaviour where resources created in one region sometimes take a very long time to be propagated to other regions, resulting in requests for those resources to fail as they are believed to not exist or not be in the expected state. For example, if you create an NSG in an EU region, then attempt to describe it in a US region, you may receive an empty list. This has been observed to take up to 10 minutes to propagate. This is particularly a problem where you are working with a 3rd party service in your Azure account. You may create the prereqs via the global API gateway which connects to your local region, but then the 3rd party attempts to retrieve them in their local region and the process fails.

The accepted workaround for this issue is to set your Azure CLI to use the local regional endpoint for where the resource is expected to be, and then set it back again e.g.

az cloud update --endpoint-resource-manager [https://southcentralus.management.azure.com]
az network nsg list --resource abc
az cloud update --endpoint-resource-manager [https://management.azure.com]

It would be good if the Azure Collection supported this as an optional common parameter. If someone can give guidance on how this could be implemented, I am happy to do the work and the testing.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

azure_rm_common.py

ADDITIONAL INFORMATION

See Summary

Chaffelson avatar May 13 '22 08:05 Chaffelson