We recommend using Azure Native.
azure.appservice.ServicePlan
Explore with Pulumi AI
Manages an App Service: Service Plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleServicePlan = new azure.appservice.ServicePlan("example", {
    name: "example",
    resourceGroupName: example.name,
    location: example.location,
    osType: "Linux",
    skuName: "P1v2",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_service_plan = azure.appservice.ServicePlan("example",
    name="example",
    resource_group_name=example.name,
    location=example.location,
    os_type="Linux",
    sku_name="P1v2")
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{
			Name:              pulumi.String("example"),
			ResourceGroupName: example.Name,
			Location:          example.Location,
			OsType:            pulumi.String("Linux"),
			SkuName:           pulumi.String("P1v2"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var exampleServicePlan = new Azure.AppService.ServicePlan("example", new()
    {
        Name = "example",
        ResourceGroupName = example.Name,
        Location = example.Location,
        OsType = "Linux",
        SkuName = "P1v2",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
            .name("example")
            .resourceGroupName(example.name())
            .location(example.location())
            .osType("Linux")
            .skuName("P1v2")
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleServicePlan:
    type: azure:appservice:ServicePlan
    name: example
    properties:
      name: example
      resourceGroupName: ${example.name}
      location: ${example.location}
      osType: Linux
      skuName: P1v2
Create ServicePlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServicePlan(name: string, args: ServicePlanArgs, opts?: CustomResourceOptions);@overload
def ServicePlan(resource_name: str,
                args: ServicePlanArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def ServicePlan(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                os_type: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                sku_name: Optional[str] = None,
                app_service_environment_id: Optional[str] = None,
                location: Optional[str] = None,
                maximum_elastic_worker_count: Optional[int] = None,
                name: Optional[str] = None,
                per_site_scaling_enabled: Optional[bool] = None,
                premium_plan_auto_scale_enabled: Optional[bool] = None,
                tags: Optional[Mapping[str, str]] = None,
                worker_count: Optional[int] = None,
                zone_balancing_enabled: Optional[bool] = None)func NewServicePlan(ctx *Context, name string, args ServicePlanArgs, opts ...ResourceOption) (*ServicePlan, error)public ServicePlan(string name, ServicePlanArgs args, CustomResourceOptions? opts = null)
public ServicePlan(String name, ServicePlanArgs args)
public ServicePlan(String name, ServicePlanArgs args, CustomResourceOptions options)
type: azure:appservice:ServicePlan
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ServicePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServicePlanArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServicePlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServicePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServicePlanArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var servicePlanResource = new Azure.AppService.ServicePlan("servicePlanResource", new()
{
    OsType = "string",
    ResourceGroupName = "string",
    SkuName = "string",
    AppServiceEnvironmentId = "string",
    Location = "string",
    MaximumElasticWorkerCount = 0,
    Name = "string",
    PerSiteScalingEnabled = false,
    PremiumPlanAutoScaleEnabled = false,
    Tags = 
    {
        { "string", "string" },
    },
    WorkerCount = 0,
    ZoneBalancingEnabled = false,
});
example, err := appservice.NewServicePlan(ctx, "servicePlanResource", &appservice.ServicePlanArgs{
	OsType:                      pulumi.String("string"),
	ResourceGroupName:           pulumi.String("string"),
	SkuName:                     pulumi.String("string"),
	AppServiceEnvironmentId:     pulumi.String("string"),
	Location:                    pulumi.String("string"),
	MaximumElasticWorkerCount:   pulumi.Int(0),
	Name:                        pulumi.String("string"),
	PerSiteScalingEnabled:       pulumi.Bool(false),
	PremiumPlanAutoScaleEnabled: pulumi.Bool(false),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	WorkerCount:          pulumi.Int(0),
	ZoneBalancingEnabled: pulumi.Bool(false),
})
var servicePlanResource = new ServicePlan("servicePlanResource", ServicePlanArgs.builder()
    .osType("string")
    .resourceGroupName("string")
    .skuName("string")
    .appServiceEnvironmentId("string")
    .location("string")
    .maximumElasticWorkerCount(0)
    .name("string")
    .perSiteScalingEnabled(false)
    .premiumPlanAutoScaleEnabled(false)
    .tags(Map.of("string", "string"))
    .workerCount(0)
    .zoneBalancingEnabled(false)
    .build());
service_plan_resource = azure.appservice.ServicePlan("servicePlanResource",
    os_type="string",
    resource_group_name="string",
    sku_name="string",
    app_service_environment_id="string",
    location="string",
    maximum_elastic_worker_count=0,
    name="string",
    per_site_scaling_enabled=False,
    premium_plan_auto_scale_enabled=False,
    tags={
        "string": "string",
    },
    worker_count=0,
    zone_balancing_enabled=False)
const servicePlanResource = new azure.appservice.ServicePlan("servicePlanResource", {
    osType: "string",
    resourceGroupName: "string",
    skuName: "string",
    appServiceEnvironmentId: "string",
    location: "string",
    maximumElasticWorkerCount: 0,
    name: "string",
    perSiteScalingEnabled: false,
    premiumPlanAutoScaleEnabled: false,
    tags: {
        string: "string",
    },
    workerCount: 0,
    zoneBalancingEnabled: false,
});
type: azure:appservice:ServicePlan
properties:
    appServiceEnvironmentId: string
    location: string
    maximumElasticWorkerCount: 0
    name: string
    osType: string
    perSiteScalingEnabled: false
    premiumPlanAutoScaleEnabled: false
    resourceGroupName: string
    skuName: string
    tags:
        string: string
    workerCount: 0
    zoneBalancingEnabled: false
ServicePlan Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServicePlan resource accepts the following input properties:
- OsType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- SkuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- AppService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- Location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- MaximumElastic intWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- Name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- PerSite boolScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Dictionary<string, string>
- A mapping of tags which should be assigned to the AppService.
- WorkerCount int
- The number of Workers (instances) to be allocated.
- ZoneBalancing boolEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- OsType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- SkuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- AppService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- Location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- MaximumElastic intWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- Name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- PerSite boolScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- map[string]string
- A mapping of tags which should be assigned to the AppService.
- WorkerCount int
- The number of Workers (instances) to be allocated.
- ZoneBalancing boolEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- osType String
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName String
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- appService StringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- location String
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic IntegerWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name String
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- perSite BooleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- Boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Map<String,String>
- A mapping of tags which should be assigned to the AppService.
- workerCount Integer
- The number of Workers (instances) to be allocated.
- zoneBalancing BooleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- osType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- resourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- appService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic numberWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- perSite booleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- {[key: string]: string}
- A mapping of tags which should be assigned to the AppService.
- workerCount number
- The number of Workers (instances) to be allocated.
- zoneBalancing booleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- os_type str
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- resource_group_ strname 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- sku_name str
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- app_service_ strenvironment_ id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- location str
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximum_elastic_ intworker_ count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name str
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- per_site_ boolscaling_ enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Mapping[str, str]
- A mapping of tags which should be assigned to the AppService.
- worker_count int
- The number of Workers (instances) to be allocated.
- zone_balancing_ boolenabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- osType String
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName String
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- appService StringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- location String
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic NumberWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name String
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- perSite BooleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- Boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Map<String>
- A mapping of tags which should be assigned to the AppService.
- workerCount Number
- The number of Workers (instances) to be allocated.
- zoneBalancing BooleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServicePlan resource produces the following output properties:
Look up Existing ServicePlan Resource
Get an existing ServicePlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServicePlanState, opts?: CustomResourceOptions): ServicePlan@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_service_environment_id: Optional[str] = None,
        kind: Optional[str] = None,
        location: Optional[str] = None,
        maximum_elastic_worker_count: Optional[int] = None,
        name: Optional[str] = None,
        os_type: Optional[str] = None,
        per_site_scaling_enabled: Optional[bool] = None,
        premium_plan_auto_scale_enabled: Optional[bool] = None,
        reserved: Optional[bool] = None,
        resource_group_name: Optional[str] = None,
        sku_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        worker_count: Optional[int] = None,
        zone_balancing_enabled: Optional[bool] = None) -> ServicePlanfunc GetServicePlan(ctx *Context, name string, id IDInput, state *ServicePlanState, opts ...ResourceOption) (*ServicePlan, error)public static ServicePlan Get(string name, Input<string> id, ServicePlanState? state, CustomResourceOptions? opts = null)public static ServicePlan get(String name, Output<String> id, ServicePlanState state, CustomResourceOptions options)resources:  _:    type: azure:appservice:ServicePlan    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AppService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- Kind string
- A string representing the Kind of Service Plan.
- Location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- MaximumElastic intWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- Name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- OsType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- PerSite boolScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- SkuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- Dictionary<string, string>
- A mapping of tags which should be assigned to the AppService.
- WorkerCount int
- The number of Workers (instances) to be allocated.
- ZoneBalancing boolEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- AppService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- Kind string
- A string representing the Kind of Service Plan.
- Location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- MaximumElastic intWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- Name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- OsType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- PerSite boolScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- Reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- SkuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- map[string]string
- A mapping of tags which should be assigned to the AppService.
- WorkerCount int
- The number of Workers (instances) to be allocated.
- ZoneBalancing boolEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- appService StringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- kind String
- A string representing the Kind of Service Plan.
- location String
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic IntegerWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name String
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- osType String
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- perSite BooleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- Boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- reserved Boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName String
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- Map<String,String>
- A mapping of tags which should be assigned to the AppService.
- workerCount Integer
- The number of Workers (instances) to be allocated.
- zoneBalancing BooleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- appService stringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- kind string
- A string representing the Kind of Service Plan.
- location string
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic numberWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name string
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- osType string
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- perSite booleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- reserved boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup stringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName string
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- {[key: string]: string}
- A mapping of tags which should be assigned to the AppService.
- workerCount number
- The number of Workers (instances) to be allocated.
- zoneBalancing booleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- app_service_ strenvironment_ id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- kind str
- A string representing the Kind of Service Plan.
- location str
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximum_elastic_ intworker_ count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name str
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- os_type str
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- per_site_ boolscaling_ enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- bool
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resource_group_ strname 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- sku_name str
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- Mapping[str, str]
- A mapping of tags which should be assigned to the AppService.
- worker_count int
- The number of Workers (instances) to be allocated.
- zone_balancing_ boolenabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
- appService StringEnvironment Id 
- The ID of the App Service Environment to create this Service Plan in. - NOTE: Requires an Isolated SKU for - azure.appservice.EnvironmentV3, supported values include- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2, and- I6v2.
- kind String
- A string representing the Kind of Service Plan.
- location String
- The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- maximumElastic NumberWorker Count 
- The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabledset totrue. Cannot be set unless using an Elastic or Premium SKU.
- name String
- The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.
- osType String
- The O/S type for the App Services to be hosted in this plan. Possible values include Windows,Linux, andWindowsContainer. Changing this forces a new resource to be created.
- perSite BooleanScaling Enabled 
- Should Per Site Scaling be enabled. Defaults to false.
- Boolean
- Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.
- reserved Boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
- skuName String
- The SKU for the plan. Possible values include - B1,- B2,- B3,- D1,- F1,- I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2,- I4v2,- I4mv2,- I5v2,- I5mv2,- I6v2,- P1v2,- P2v2,- P3v2,- P0v3,- P1v3,- P2v3,- P3v3,- P1mv3,- P2mv3,- P3mv3,- P4mv3,- P5mv3,- S1,- S2,- S3,- SHARED,- EP1,- EP2,- EP3,- FC1,- WS1,- WS2,- WS3, and- Y1.- NOTE: Isolated SKUs ( - I1,- I2,- I3,- I1v2,- I1mv2,- I2v2,- I2mv2,- I3v2,- I3mv2) can only be used with App Service Environments- NOTE: Elastic and Consumption SKUs ( - Y1,- FC1,- EP1,- EP2, and- EP3) are for use with Function Apps.
- Map<String>
- A mapping of tags which should be assigned to the AppService.
- workerCount Number
- The number of Workers (instances) to be allocated.
- zoneBalancing BooleanEnabled 
- Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created. - NOTE: If this setting is set to - trueand the- worker_countvalue is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
Import
AppServices can be imported using the resource id, e.g.
$ pulumi import azure:appservice/servicePlan:ServicePlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/serverFarms/farm1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.