Plan
Manages an App Service Plan component. !>NOTE: This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use azure.appservice.ServicePlan
resource instead.
Example Usage
Dedicated)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "api-rg-pro",
location: "West Europe",
});
const examplePlan = new azure.appservice.Plan("example", {
name: "api-appserviceplan-pro",
location: example.location,
resourceGroupName: example.name,
sku: {
tier: "Standard",
size: "S1",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="api-rg-pro",
location="West Europe")
example_plan = azure.appservice.Plan("example",
name="api-appserviceplan-pro",
location=example.location,
resource_group_name=example.name,
sku={
"tier": "Standard",
"size": "S1",
})
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 = "api-rg-pro",
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("example", new()
{
Name = "api-appserviceplan-pro",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Standard",
Size = "S1",
},
});
});
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("api-rg-pro"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
Name: pulumi.String("api-appserviceplan-pro"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: &appservice.PlanSkuArgs{
Tier: pulumi.String("Standard"),
Size: pulumi.String("S1"),
},
})
if err != nil {
return err
}
return nil
})
}
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.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
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("api-rg-pro")
.location("West Europe")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.name("api-appserviceplan-pro")
.location(example.location())
.resourceGroupName(example.name())
.sku(PlanSkuArgs.builder()
.tier("Standard")
.size("S1")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: api-rg-pro
location: West Europe
examplePlan:
type: azure:appservice:Plan
name: example
properties:
name: api-appserviceplan-pro
location: ${example.location}
resourceGroupName: ${example.name}
sku:
tier: Standard
size: S1
Shared / Consumption Plan)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "api-rg-pro",
location: "West Europe",
});
const examplePlan = new azure.appservice.Plan("example", {
name: "api-appserviceplan-pro",
location: example.location,
resourceGroupName: example.name,
kind: "FunctionApp",
sku: {
tier: "Dynamic",
size: "Y1",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="api-rg-pro",
location="West Europe")
example_plan = azure.appservice.Plan("example",
name="api-appserviceplan-pro",
location=example.location,
resource_group_name=example.name,
kind="FunctionApp",
sku={
"tier": "Dynamic",
"size": "Y1",
})
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 = "api-rg-pro",
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("example", new()
{
Name = "api-appserviceplan-pro",
Location = example.Location,
ResourceGroupName = example.Name,
Kind = "FunctionApp",
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Dynamic",
Size = "Y1",
},
});
});
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("api-rg-pro"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
Name: pulumi.String("api-appserviceplan-pro"),
Location: example.Location,
ResourceGroupName: example.Name,
Kind: pulumi.Any("FunctionApp"),
Sku: &appservice.PlanSkuArgs{
Tier: pulumi.String("Dynamic"),
Size: pulumi.String("Y1"),
},
})
if err != nil {
return err
}
return nil
})
}
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.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
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("api-rg-pro")
.location("West Europe")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.name("api-appserviceplan-pro")
.location(example.location())
.resourceGroupName(example.name())
.kind("FunctionApp")
.sku(PlanSkuArgs.builder()
.tier("Dynamic")
.size("Y1")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: api-rg-pro
location: West Europe
examplePlan:
type: azure:appservice:Plan
name: example
properties:
name: api-appserviceplan-pro
location: ${example.location}
resourceGroupName: ${example.name}
kind: FunctionApp
sku:
tier: Dynamic
size: Y1
Linux)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "api-rg-pro",
location: "West Europe",
});
const examplePlan = new azure.appservice.Plan("example", {
name: "api-appserviceplan-pro",
location: example.location,
resourceGroupName: example.name,
kind: "Linux",
reserved: true,
sku: {
tier: "Standard",
size: "S1",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="api-rg-pro",
location="West Europe")
example_plan = azure.appservice.Plan("example",
name="api-appserviceplan-pro",
location=example.location,
resource_group_name=example.name,
kind="Linux",
reserved=True,
sku={
"tier": "Standard",
"size": "S1",
})
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 = "api-rg-pro",
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("example", new()
{
Name = "api-appserviceplan-pro",
Location = example.Location,
ResourceGroupName = example.Name,
Kind = "Linux",
Reserved = true,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Standard",
Size = "S1",
},
});
});
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("api-rg-pro"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
Name: pulumi.String("api-appserviceplan-pro"),
Location: example.Location,
ResourceGroupName: example.Name,
Kind: pulumi.Any("Linux"),
Reserved: pulumi.Bool(true),
Sku: &appservice.PlanSkuArgs{
Tier: pulumi.String("Standard"),
Size: pulumi.String("S1"),
},
})
if err != nil {
return err
}
return nil
})
}
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.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
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("api-rg-pro")
.location("West Europe")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.name("api-appserviceplan-pro")
.location(example.location())
.resourceGroupName(example.name())
.kind("Linux")
.reserved(true)
.sku(PlanSkuArgs.builder()
.tier("Standard")
.size("S1")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: api-rg-pro
location: West Europe
examplePlan:
type: azure:appservice:Plan
name: example
properties:
name: api-appserviceplan-pro
location: ${example.location}
resourceGroupName: ${example.name}
kind: Linux
reserved: true
sku:
tier: Standard
size: S1
Windows Container)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "api-rg-pro",
location: "West Europe",
});
const examplePlan = new azure.appservice.Plan("example", {
name: "api-appserviceplan-pro",
location: example.location,
resourceGroupName: example.name,
kind: "xenon",
isXenon: true,
sku: {
tier: "PremiumContainer",
size: "PC2",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="api-rg-pro",
location="West Europe")
example_plan = azure.appservice.Plan("example",
name="api-appserviceplan-pro",
location=example.location,
resource_group_name=example.name,
kind="xenon",
is_xenon=True,
sku={
"tier": "PremiumContainer",
"size": "PC2",
})
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 = "api-rg-pro",
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("example", new()
{
Name = "api-appserviceplan-pro",
Location = example.Location,
ResourceGroupName = example.Name,
Kind = "xenon",
IsXenon = true,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "PremiumContainer",
Size = "PC2",
},
});
});
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("api-rg-pro"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
Name: pulumi.String("api-appserviceplan-pro"),
Location: example.Location,
ResourceGroupName: example.Name,
Kind: pulumi.Any("xenon"),
IsXenon: pulumi.Bool(true),
Sku: &appservice.PlanSkuArgs{
Tier: pulumi.String("PremiumContainer"),
Size: pulumi.String("PC2"),
},
})
if err != nil {
return err
}
return nil
})
}
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.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
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("api-rg-pro")
.location("West Europe")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.name("api-appserviceplan-pro")
.location(example.location())
.resourceGroupName(example.name())
.kind("xenon")
.isXenon(true)
.sku(PlanSkuArgs.builder()
.tier("PremiumContainer")
.size("PC2")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: api-rg-pro
location: West Europe
examplePlan:
type: azure:appservice:Plan
name: example
properties:
name: api-appserviceplan-pro
location: ${example.location}
resourceGroupName: ${example.name}
kind: xenon
isXenon: true
sku:
tier: PremiumContainer
size: PC2
Import
App Service Plan instances can be imported using the resource id
, e.g.
$ pulumi import azure:appservice/plan:Plan instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/serverFarms/instance1
Properties
The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
The maximum number of workers supported with the App Service Plan's sku.
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.
The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created.
Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.