Service Plan
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")
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 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
})
}
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
API Providers
This resource uses the following Azure API Providers:
Microsoft.Web
: 2023-12-01
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
Properties
The ID of the App Service Environment to create this Service Plan in.
The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabled
set to true
. Cannot be set unless using an Elastic or Premium SKU.
Should Per Site Scaling be enabled. Defaults to false
.
Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false
. Cannot be set unless using a Premium SKU.
The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.
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
.
The number of Workers (instances) to be allocated.
Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created.