azureazure-resource-managerazure-bicepazure-app-service-plansazure-autoscaling-block

Setting autoscaling to automatic (preview) for a resource in Azure on bicep


I need to set the autoscaling for a resource to automatic (the option which is currently in preview). I can do it through the portal but couldn't find any documentation to do it in a bicep file. Is it even possible, any ideas?


Solution

  • According to the documentation, you have these two properties to configure automatic autoscaling:

    resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
      name: appServicePlanName
      location: location
      sku: {
        // Need to be Premium V2 or V3
      }
      properties: {
        elasticScaleEnabled: true
        maximumElasticWorkerCount: 30
      }
    }