Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.
MIT License
478 stars 306 forks source link

The latest version of scripts.v3 using migrate.js does not work in Azure Government Cloud #2486

Open jphines57 opened 1 month ago

jphines57 commented 1 month ago

In previous versions (2.24.0) this has worked fine but the latest version broke Azure Government Cloud hosted APIM from migrating. When I attempt to run the command I get this:

Exporting... Unable to complete migration. Unable to complete export. Unable to capture content. Unable to fetch content types. Resource not found: https://management.azure.com/subs criptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes?api-version=2021-08-01

I think the issue is with the beginning domain is https://management.azure.com instead of something like https://portal.azure.us

jphines57 commented 1 month ago

If I make this update to /scripts.v3/utils.js it works for Azure Gov Cloud: const managementApiEndpoint = "management.usgovcloudapi.net"; //management.azure.com";

jphines57 commented 1 month ago

Maybe allow for a flag parameter on migrate to allow Commercial or Government Cloud but default to Commercial.

sthirthala commented 2 weeks ago

That is a good idea. We will mark it as a feature request