Plan

Manages an App Service Plan component.

Example Usage

Dedicated)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "Standard",
                Size = "S1",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        _, err = appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Sku: &appservice.PlanSkuArgs{
                Tier: pulumi.String("Standard"),
                Size: pulumi.String("S1"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: {
        tier: "Standard",
        size: "S1",
    },
});

Shared / Consumption Plan)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Kind = "FunctionApp",
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "Dynamic",
                Size = "Y1",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        _, err = appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Kind:              pulumi.String("FunctionApp"),
            Sku: &appservice.PlanSkuArgs{
                Tier: pulumi.String("Dynamic"),
                Size: pulumi.String("Y1"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="FunctionApp",
    sku={
        "tier": "Dynamic",
        "size": "Y1",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    kind: "FunctionApp",
    sku: {
        tier: "Dynamic",
        size: "Y1",
    },
});

Linux)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Kind = "Linux",
            Reserved = true,
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "Standard",
                Size = "S1",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        _, err = appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Kind:              pulumi.String("Linux"),
            Reserved:          pulumi.Bool(true),
            Sku: &appservice.PlanSkuArgs{
                Tier: pulumi.String("Standard"),
                Size: pulumi.String("S1"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="Linux",
    reserved=True,
    sku={
        "tier": "Standard",
        "size": "S1",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    kind: "Linux",
    reserved: true,
    sku: {
        tier: "Standard",
        size: "S1",
    },
});

Windows Container)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Kind = "xenon",
            IsXenon = true,
            Sku = new Azure.AppService.Inputs.PlanSkuArgs
            {
                Tier = "PremiumContainer",
                Size = "PC2",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        _, err = appservice.NewPlan(ctx, "examplePlan", &appservice.PlanArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Kind:              pulumi.String("xenon"),
            IsXenon:           pulumi.Bool(true),
            Sku: &appservice.PlanSkuArgs{
                Tier: pulumi.String("PremiumContainer"),
                Size: pulumi.String("PC2"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_plan = azure.appservice.Plan("examplePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    kind="xenon",
    is_xenon=True,
    sku={
        "tier": "PremiumContainer",
        "size": "PC2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const examplePlan = new azure.appservice.Plan("examplePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    kind: "xenon",
    isXenon: true,
    sku: {
        tier: "PremiumContainer",
        size: "PC2",
    },
});

Create a Plan Resource

new Plan(name: string, args: PlanArgs, opts?: CustomResourceOptions);
def Plan(resource_name, opts=None, app_service_environment_id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None, __props__=None);
func NewPlan(ctx *Context, name string, args PlanArgs, opts ...ResourceOption) (*Plan, error)
public Plan(string name, PlanArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Plan Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Plan resource accepts the following input properties:

ResourceGroupName string

The name of the resource group in which to create the App Service Plan component.

Sku PlanSkuArgs

A sku block as documented below.

AppServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

IsXenon bool
Kind string

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaximumElasticWorkerCount int

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

Name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

PerSiteScaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

Reserved bool

Is this App Service Plan Reserved. Defaults to false.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ResourceGroupName string

The name of the resource group in which to create the App Service Plan component.

Sku PlanSku

A sku block as documented below.

AppServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

IsXenon bool
Kind interface{}

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaximumElasticWorkerCount int

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

Name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

PerSiteScaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

Reserved bool

Is this App Service Plan Reserved. Defaults to false.

Tags map[string]string

A mapping of tags to assign to the resource.

resourceGroupName string

The name of the resource group in which to create the App Service Plan component.

sku PlanSku

A sku block as documented below.

appServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

isXenon boolean
kind string | Kind

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maximumElasticWorkerCount number

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

perSiteScaling boolean

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

reserved boolean

Is this App Service Plan Reserved. Defaults to false.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

resource_group_name str

The name of the resource group in which to create the App Service Plan component.

sku Dict[PlanSku]

A sku block as documented below.

app_service_environment_id str

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

is_xenon bool
kind string | str

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maximum_elastic_worker_count float

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

name str

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

per_site_scaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

reserved bool

Is this App Service Plan Reserved. Defaults to false.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Plan resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
MaximumNumberOfWorkers int

The maximum number of workers supported with the App Service Plan’s sku.

Id string
The provider-assigned unique ID for this managed resource.
MaximumNumberOfWorkers int

The maximum number of workers supported with the App Service Plan’s sku.

id string
The provider-assigned unique ID for this managed resource.
maximumNumberOfWorkers number

The maximum number of workers supported with the App Service Plan’s sku.

id str
The provider-assigned unique ID for this managed resource.
maximum_number_of_workers float

The maximum number of workers supported with the App Service Plan’s sku.

Look up an Existing Plan Resource

Get an existing Plan 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?: PlanState, opts?: CustomResourceOptions): Plan
static get(resource_name, id, opts=None, app_service_environment_id=None, is_xenon=None, kind=None, location=None, maximum_elastic_worker_count=None, maximum_number_of_workers=None, name=None, per_site_scaling=None, reserved=None, resource_group_name=None, sku=None, tags=None, __props__=None);
func GetPlan(ctx *Context, name string, id IDInput, state *PlanState, opts ...ResourceOption) (*Plan, error)
public static Plan Get(string name, Input<string> id, PlanState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AppServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

IsXenon bool
Kind string

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaximumElasticWorkerCount int

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

MaximumNumberOfWorkers int

The maximum number of workers supported with the App Service Plan’s sku.

Name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

PerSiteScaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

Reserved bool

Is this App Service Plan Reserved. Defaults to false.

ResourceGroupName string

The name of the resource group in which to create the App Service Plan component.

Sku PlanSkuArgs

A sku block as documented below.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

AppServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

IsXenon bool
Kind interface{}

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaximumElasticWorkerCount int

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

MaximumNumberOfWorkers int

The maximum number of workers supported with the App Service Plan’s sku.

Name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

PerSiteScaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

Reserved bool

Is this App Service Plan Reserved. Defaults to false.

ResourceGroupName string

The name of the resource group in which to create the App Service Plan component.

Sku PlanSku

A sku block as documented below.

Tags map[string]string

A mapping of tags to assign to the resource.

appServiceEnvironmentId string

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

isXenon boolean
kind string | Kind

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maximumElasticWorkerCount number

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

maximumNumberOfWorkers number

The maximum number of workers supported with the App Service Plan’s sku.

name string

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

perSiteScaling boolean

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

reserved boolean

Is this App Service Plan Reserved. Defaults to false.

resourceGroupName string

The name of the resource group in which to create the App Service Plan component.

sku PlanSku

A sku block as documented below.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

app_service_environment_id str

The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.

is_xenon bool
kind string | str

The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maximum_elastic_worker_count float

The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

maximum_number_of_workers float

The maximum number of workers supported with the App Service Plan’s sku.

name str

Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.

per_site_scaling bool

Can Apps assigned to this App Service Plan be scaled independently? If set to false apps assigned to this plan will scale to all instances of the plan. Defaults to false.

reserved bool

Is this App Service Plan Reserved. Defaults to false.

resource_group_name str

The name of the resource group in which to create the App Service Plan component.

sku Dict[PlanSku]

A sku block as documented below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

Supporting Types

PlanSku

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Size string

Specifies the plan’s instance size.

Tier string

Specifies the plan’s pricing tier.

Capacity int

Specifies the number of workers associated with this App Service Plan.

Size string

Specifies the plan’s instance size.

Tier string

Specifies the plan’s pricing tier.

Capacity int

Specifies the number of workers associated with this App Service Plan.

size string

Specifies the plan’s instance size.

tier string

Specifies the plan’s pricing tier.

capacity number

Specifies the number of workers associated with this App Service Plan.

size str

Specifies the plan’s instance size.

tier str

Specifies the plan’s pricing tier.

capacity float

Specifies the number of workers associated with this App Service Plan.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.