serverless-azure-functions
serverless-azure-functions copied to clipboard
Azure APIM multiple operations are not created
Description
- What went wrong? I added apim to a function. Although the terminal says the apim deployment was sucessfull, only one operation from the function appears on the azure portal
- What did you expect should have happened? All operations should be addeda and appear on the portal
- What was the config you used?
- What stacktrace or error message from your provider did you see? No error was displayed
Additional Data
Framework Core: 1.82.0 Plugin: 3.8.3 SDK: 2.3.1 Components: 2.34.9
Cmd output:
Serverless: -> Deploying API keys
Serverless: -> Deploying API:
API Management in Azure portal showing only one operation

service: <service name>
custom:
dotenv:
logging: true
provider:
name: azure
region: brazilsouth
runtime: python3.7
subscriptionId: <Subscription Id>
stage: dev
type: consumption
environment: # these will be created as application settings
DEV: ${env:DEV}
apim:
apis:
- name: <api name>
subscriptionRequired: false
displayName: API Test
description: API created with serverless framework
protocols:
- https
path: api
authorization: none
backends:
- name: <api backend name>
url: api
cors:
allowCredentials: false
allowedOrigins:
- "*"
allowedMethods:
- GET
- POST
- PUT
- DELETE
- PATCH
allowedHeaders:
- "*"
exposeHeaders:
- "*"
plugins:
- serverless-azure-functions
- serverless-dotenv-plugin
package:
exclude:
- env/**
- .env/**
- local.settings.json
- .vscode/**
- __pycache__/**
- node_modules/**
- .python_packages/**
- .funcignore
- package.json
- package-lock.json
- .gitignore
- .git/**
functions:
companies:
handler: src/handlers/companies.main
apim:
api: <api name>
backend: <api backend name>
operations:
- method: PUT
urlTemplate: companies
displayName: Companies
- method: GET
urlTemplate: companies
displayName: Companies
- method: DELETE
urlTemplate: companies
displayName: Companies
events:
- http: true
authLevel: function
@andrebianchessi facing the same issue, is there any workaround for this?