Open henworth opened 2 years ago
Thanks for opening the issue @henworth.
I don't fully grok the semantics of the API from the docs in the case of a 202 response. Typically in other posts this returns a polling location in the Location
header and I assume the same is the case here. That said, the provider's current invoke support doesn't handle asynchronous responses. I have updated the issue title and added this to our prioritized backlog.
What happened?
When trying to query for a Virtual Network Gateway's advertised routes, the response seems to be not handled properly.
Using the
getVirtualNetworkGatewayAdvertisedRoutes()
function this error is returned:Steps to reproduce
Use the
getVirtualNetworkGatewayAdvertisedRoutes()
function with a Resource Group name and Virtual Network Gateway name (optionally a peer ip) and the above error is returned.Expected Behavior
An output of the advertised routes. The API specs show that this endpoint returns both a HTTP 202 status and an empty body upon acceptance of the command, and that the operation will be handled asynchronously. In the returned error string, both of these values are present.
https://docs.microsoft.com/en-us/rest/api/network-gateway/virtual-network-gateways/get-advertised-routes
Actual Behavior
This error message was returned:
Versions used
I also tried with
v20210801
of the API.Additional context
When using the Azure CLI equivalent command, the expected list of routes is returned:
This same behavior also occurs with the
getVirtualNetworkGatewayBgpPeerStatus()
function and likely others (especially if they return 202s) but I have only tested these two functions.Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).