title: ARM template and YAML tasks for function app and slot
body: <p>I have the following bicep file for creating function app and slot:</p>
  <pre><code>
  resource functionApp 'Microsoft.Web/sites@2018-02-01' = {
    name: name  
    kind: kind
    location: location
    properties: {
      serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
      clientAffinityEnabled: false
      httpsOnly: true
      siteConfig: {      
        appSettings: secretSettings
      }
    }
    identity: {
      type: 'SystemAssigned'
    }
  }
  
  resource functionApp 'Microsoft.Web/sites/slots@2018-11-01' = {
    name: name
    kind: kind
    location: location
    properties: {
      serverFarmId: resourceId('Microsoft.Web/serverfarms', servicePlanName)
      clientAffinityEnabled: true   
      httpsOnly: true  
      siteConfig: {
        appSettings: secretSettings
      }
    }
    identity: {
      type: 'SystemAssigned'
    }
  }
  </code></pre>
  <p>And a yaml task to deploy to slot and function app:</p>
  <pre><code>- task: AzureFunctionApp@1
    displayName: 'deploy function app(staging)'
    inputs:
      appType: 'functionapp'
      azureSubscription: ${{parameters.serviceConnection}}
      appName: 'AppName'
      Package: 'AppName.zip'
      deploymentMethod: 'runFromPackage'
      deployToSlotOrASE: true
      SlotName: &quot;staging&quot;
      resourceGroupName: 'RG'
  
  - task: AzureFunctionApp@1
    displayName: 'deploy function app'
    inputs:
      appType: 'functionapp'
      azureSubscription: ${{parameters.serviceConnection}}
      appName: 'AppName'
      Package: 'AppName.zip'
      deploymentMethod: 'runFromPackage'
      resourceGroupName: 'RG'
  </code></pre>
  <p>Also, as you can see above, there is no difference in the code between function app and slot except:</p>
  <blockquote>
  <p>Microsoft.Web/sites@2018-02-01
  Microsoft.Web/sites/slots@2018-11-0</p>
  </blockquote>
  <blockquote>
  <p>displayName: 'deploy function app(staging)'
  displayName: 'deploy function app'</p>
  </blockquote>
  <p>and 2 additional inputs in slot:</p>
  <blockquote>
  <p>deployToSlotOrASE: true
  SlotName: &quot;staging&quot;</p>
  </blockquote>
  <p>Should these be different? Is there a yaml task for swapping/reverting between function app and slot?</p>