Configuring APIM to allow access based on ip range does not appear to recognize addressRange as a valid option. The addresses element is properly transformed to in the resulting XML. I followed an example, which configured the yml as follows:
IP Validation APIM policies
ipFilters:
- action: allow
addresses: # List of allowed IP addresses
- 1.1.1.1
- 2.2.2.2
addressRange: # Also optionally support range of IP addresses
from: 1.1.1.1
to: 2.2.2.2
- action: forbid
addresses: # List of forbidden IP addresses
- 3.3.3.3
- 4.4.4.4
addressRange: # Also optionally support range of IP addresses
from: 3.3.3.3
to: 4.4.4.4
============================================================
Serverless: Error creating APIM API
Serverless: {
“code”: “ValidationError”,
“message”: “One or more fields contain incorrect values:”,
“details”: [
{
“code”: “ValidationError”,
“message”: “Error in element ‘ip-filter’ on line 20, column 6: The element ‘ip-filter’ has invalid child element ‘addressRange’. List of possible elements expected: ‘address, address-range’.”,
“target”: “ip-filter”
}
]
}
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.18.4
Framework Version: 2.6.0
Plugin Version: 4.0.4
SDK Version: 2.3.2
Components Version: 3.2.1