We use serverless to deploy a graphql handler function as an Azure Function and access it via APIM.
We need to use our own custom domain (pointed via CNAME to Azure APIM domain), and can set this up manually via the Azure Portal, and uploading certificate + specifying certificate password for it.
However, if we execute "sls deploy" that custom domain setting gets removed, so we'd need to either retain it somehow or specify it via serverless.yml, but I cannot find any information on how to do this.
Current serverless.yml config:
service: my-service-${env:STAGE, 'develop'}
configValidationMode: off
provider:
name: azure
runtime: nodejs12
region: north-europe
resourceGroup: My-Service-Group
subscriptionId: MySubscriptionId
stage: ${env:STAGE, 'develop'}
apim: true
plugins:
- serverless-azure-functions
functions:
graphql:
handler: lib/azure.handler
events:
- http: true
methods:
- GET
- POST
authLevel: anonymous # can also be `function` or `admin`
route: graphql
- http: true
direction: out
name: "$return"
route: graphql
Any guidance in this would be much appreciated.
