Warm tip: This article is reproduced from serverfault.com, please click

External Type : gateway unable to access resources within the virtual network?

发布于 2020-11-29 12:20:18

I want to expose the Internal APIs through Azure API Management however the gateway is unable to access resources within the virtual network.

Below is my VNet configuration

enter image description here

Below is my API Management Network settings

enter image description here

I have created a Azure VM as shown below

enter image description here

and deployed the Spring Boot application as shown below

enter image description here

Tried configuring the APIs in the API Management however the gateway is unable to access the above internal URL

How do I fix this? enter image description here

Update: If I save the API definition and upload on APIM it works without any issues.

Questioner
Karthikeyan Vijayakumar
Viewed
0
krishg 2020-11-30 14:12:24

When you create an API in APIM from portal, if you put the OpenAPI (swagger) spec URI in the field shown in the screen, it has to be publicly accessible (not necessarily the API itself, but the spec). It's because you are browsing the Azure portal from internet and portal UI form simply tries to access the file from your client side browser before uploading. I agree that it could be nicer if APIM could access it from the server side, but unfortunately that's not the case at this moment. Consider it as a simple feature which either allows to to upload file from your machine or from a URL publicly accessible.

EDIT*: Looks like VNET is not into picture in management plane.

In this case, you can just download the swagger file itself and use the "Select a file" option.