azure-policy icon indicating copy to clipboard operation
azure-policy copied to clipboard

Issue: Alias: "Microsoft.ApiManagement/service/vpnType": not reflecting accurately "properties.vpnType" value.

Open mylameaccount opened this issue 7 years ago • 3 comments

ISSUE DESCRIPTION: The Azure Policy Alias : "Microsoft.ApiManagement/service/vpnType" seems to reflect the "properties.vpnType" value as being null instead of None, Internal, or External. I am not sure if this should be showing "properties.vpnType" or the “properties.virtualNetworkType”. They appear to be the same value but named differently depending on if you use the Get-AzApiManagement or Get-AzResource commandlets in powershell.

If this can be corrected it would be helpful to my current efforts.

Please see the screen shots attached to this thread for detailed information on the resource and issue. VpnType01

mylameaccount avatar Apr 19 '19 02:04 mylameaccount

There were a couple of things giving you those results. First: the Microsoft.ApiManagement aliases were not fully updated. This has been corrected on our side. Second: the vpnType field is from older api versions (specifically 2016-07-07, 2016-10-10 and 2017-03-01 and it was an integer value, translated to an enum by Powershell). Api versions since then return the enum you are looking for, but on the virtualNetworkType field, which we now have provided an alias for. Please try the new alias: this should be what you are looking for.

mentat9 avatar Apr 24 '19 00:04 mentat9

Let us know if this addresses the issue. https://github.com/Azure/azure-policy/issues/363 provides some related information.

mentat9 avatar Apr 24 '19 17:04 mentat9

The "virtualNetworkType" alias covers my needs. You can close this ticket. Thank you for looking into this and clarifying.

mylameaccount avatar Apr 25 '19 03:04 mylameaccount