The disable-function-if-exists.template.yml
below is a sample Azure DevOps YAML pipeline template
that can be used to disable an Azure Function if it exists.
In some deployment scenarios you may need to disable an Azure Function, such as a queue triggered function, before deploying down stream resources. The function to be disabled may not exist the first time the deployment pipeline is run in a particular environment, so the template checks for its existance before attempting to disalbe it.