Reputation: 3736
I have a function app with 2 slots - staging and production. Both staging and production slots have some functions.
I have the following YAML task to deploy to staging deployment slot:
- task: AzureFunctionApp@1
displayName: 'deploy ${{ parameters.name }} function app (staging)'
inputs:
appType: 'functionapp'
azureSubscription: sub
appName: 'appname'
Package: 'name.zip'
deploymentMethod: 'runFromPackage'
deployToSlotOrASE: true
slotName: 'staging'
resourceGroupName: 'rg'
After deployment I see functions inside staging slot but I see NO functions (or ONLY one function with the same name as function app) inside production slot. What am I missing?
UPDATE:
I have the following resources in bicep file before the above YAML step:
resource functionApp 'Microsoft.Web/sites@2018-02-01' = {
name: name
location: location
kind: kind
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
clientAffinityEnabled: false
httpsOnly: true
siteConfig: {
use32BitWorkerProcess : false
appSettings: secretSettings
}
}
identity: {
type: 'SystemAssigned'
}
}
resource functionAppSlot 'Microsoft.Web/sites/slots@2018-11-01' = {
name: name
kind: kind
location: location
properties: {
clientAffinityEnabled: true
enabled: true
httpsOnly: true
serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
siteConfig: {
use32BitWorkerProcess : false
appSettings: secretSettings
}
}
identity: {
type: 'SystemAssigned'
}
}
While creating the function app, does it delete all the existing functions in production slot?
Upvotes: 3
Views: 1056