serverless-azure-functions
serverless-azure-functions copied to clipboard
Deploying APIM ipFilters policy using addressRange fails - addressRange is an invalid child element
This is a Bug Report
Description
Unable to deploy APIM Service policy ipFilters using addressRange
- What went wrong? While deploying an Azure Function application with APIM ipFilters addressRange policy, addressRange was identified as an invalid child element.
- What did you expect should have happened? I expected addressRange to be valid and the resulting policy to be create for the APIM service.
- What was the config you used? I used the following ipFilters settings from the sample serverless.yml:
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
-
What stacktrace or error message from your provider did you see? 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 5, column 6: The element 'ip-filter' has invalid child element 'addressRange'. List of possible elements expected: 'address, address-range'.", "target": "ip-filter" } ] }
Error --------------------------------------------------
Error: One or more fields contain incorrect values: at new RestError (C:\Users\ddudenhefer\git\eforms_spike\node_modules@azure\ms-rest-js\lib\restError.ts:18:5) at C:\Users\ddudenhefer\git\eforms_spike\node_modules@azure\ms-rest-js\lib\policies\deserializationPolicy.ts:117:27 at processTicksAndRejections (internal/process/task_queues.js:97:5)
Similar or dependent issues:
- #12345
Additional Data
- Serverless Framework Version you're using:
- Serverless CLI Version you're using:
- Serverless Azure Plugin Version you're using:
- Operating System:
- Stack Trace:
- Provider Error messages:
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