import * as pulumi from "@pulumi/pulumi"; /** * Manages an App Service: Service Plan. * * ## Example Usage * * ```typescript * 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", * }); * ``` * * ## 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. * * ```sh * $ pulumi import azure:appservice/servicePlan:ServicePlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/serverFarms/farm1 * ``` */ export declare class ServicePlan extends pulumi.CustomResource { /** * Get an existing ServicePlan resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ServicePlanState, opts?: pulumi.CustomResourceOptions): ServicePlan; /** * Returns true if the given object is an instance of ServicePlan. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ServicePlan; /** * 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`. */ readonly appServiceEnvironmentId: pulumi.Output; /** * A string representing the Kind of Service Plan. */ readonly kind: pulumi.Output; /** * The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ readonly location: pulumi.Output; /** * The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have `premiumPlanAutoScaleEnabled` set to `true`. Cannot be set unless using an Elastic or Premium SKU. */ readonly maximumElasticWorkerCount: pulumi.Output; /** * The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created. */ readonly name: pulumi.Output; /** * The O/S type for the App Services to be hosted in this plan. Possible values include `Windows`, `Linux`, and `WindowsContainer`. Changing this forces a new resource to be created. */ readonly osType: pulumi.Output; /** * Should Per Site Scaling be enabled. Defaults to `false`. */ readonly perSiteScalingEnabled: pulumi.Output; /** * Should automatic scaling be enabled for the Premium SKU Plan. Defaults to `false`. Cannot be set unless using a Premium SKU. */ readonly premiumPlanAutoScaleEnabled: pulumi.Output; /** * Whether this is a reserved Service Plan Type. `true` if `osType` is `Linux`, otherwise `false`. */ readonly reserved: pulumi.Output; /** * The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ readonly resourceGroupName: pulumi.Output; /** * 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`, `P0v4`, `P1v4`, `P2v4`, `P3v4`, `P1mv4`, `P2mv4`, `P3mv4`, `P4mv4`, `P5mv4`, `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. * * > **Note:** Hosting Azure Functions on Linux using the Consumption plan will be retired after September 30, 2028. It is recommended to use the Flex Consumption plan for Linux Function Apps. See [here](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) for more information. */ readonly skuName: pulumi.Output; /** * A mapping of tags which should be assigned to the AppService. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The number of Workers (instances) to be allocated. */ readonly workerCount: pulumi.Output; /** * Should the Service Plan balance across Availability Zones in the region. * * > **Note:** If this setting is set to `true` and the `workerCount` value 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. * * > **Note:** `zoneBalancingEnabled` can only be set to `true` on Consumption, Premium, Isolated, or Workflow SKUs. It can be disabled. To enable it, the `workerCount` must be greater than `1`, and the Service Plan must support more than one availability zone. In all other cases, changing this forces a new resource to be created. For more information, please see the [Availability Zone Support](https://learn.microsoft.com/en-us/azure/reliability/reliability-app-service?tabs=azurecli&pivots=free-shared-basic#availability-zone-support). */ readonly zoneBalancingEnabled: pulumi.Output; /** * Create a ServicePlan resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServicePlanArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServicePlan resources. */ export interface ServicePlanState { /** * 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`. */ appServiceEnvironmentId?: pulumi.Input; /** * A string representing the Kind of Service Plan. */ kind?: pulumi.Input; /** * The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ location?: pulumi.Input; /** * The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have `premiumPlanAutoScaleEnabled` set to `true`. Cannot be set unless using an Elastic or Premium SKU. */ maximumElasticWorkerCount?: pulumi.Input; /** * The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created. */ name?: pulumi.Input; /** * The O/S type for the App Services to be hosted in this plan. Possible values include `Windows`, `Linux`, and `WindowsContainer`. Changing this forces a new resource to be created. */ osType?: pulumi.Input; /** * Should Per Site Scaling be enabled. Defaults to `false`. */ perSiteScalingEnabled?: pulumi.Input; /** * Should automatic scaling be enabled for the Premium SKU Plan. Defaults to `false`. Cannot be set unless using a Premium SKU. */ premiumPlanAutoScaleEnabled?: pulumi.Input; /** * Whether this is a reserved Service Plan Type. `true` if `osType` is `Linux`, otherwise `false`. */ reserved?: pulumi.Input; /** * The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ resourceGroupName?: pulumi.Input; /** * 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`, `P0v4`, `P1v4`, `P2v4`, `P3v4`, `P1mv4`, `P2mv4`, `P3mv4`, `P4mv4`, `P5mv4`, `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. * * > **Note:** Hosting Azure Functions on Linux using the Consumption plan will be retired after September 30, 2028. It is recommended to use the Flex Consumption plan for Linux Function Apps. See [here](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) for more information. */ skuName?: pulumi.Input; /** * A mapping of tags which should be assigned to the AppService. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The number of Workers (instances) to be allocated. */ workerCount?: pulumi.Input; /** * Should the Service Plan balance across Availability Zones in the region. * * > **Note:** If this setting is set to `true` and the `workerCount` value 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. * * > **Note:** `zoneBalancingEnabled` can only be set to `true` on Consumption, Premium, Isolated, or Workflow SKUs. It can be disabled. To enable it, the `workerCount` must be greater than `1`, and the Service Plan must support more than one availability zone. In all other cases, changing this forces a new resource to be created. For more information, please see the [Availability Zone Support](https://learn.microsoft.com/en-us/azure/reliability/reliability-app-service?tabs=azurecli&pivots=free-shared-basic#availability-zone-support). */ zoneBalancingEnabled?: pulumi.Input; } /** * The set of arguments for constructing a ServicePlan resource. */ export interface ServicePlanArgs { /** * 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`. */ appServiceEnvironmentId?: pulumi.Input; /** * The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ location?: pulumi.Input; /** * The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have `premiumPlanAutoScaleEnabled` set to `true`. Cannot be set unless using an Elastic or Premium SKU. */ maximumElasticWorkerCount?: pulumi.Input; /** * The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created. */ name?: pulumi.Input; /** * The O/S type for the App Services to be hosted in this plan. Possible values include `Windows`, `Linux`, and `WindowsContainer`. Changing this forces a new resource to be created. */ osType: pulumi.Input; /** * Should Per Site Scaling be enabled. Defaults to `false`. */ perSiteScalingEnabled?: pulumi.Input; /** * Should automatic scaling be enabled for the Premium SKU Plan. Defaults to `false`. Cannot be set unless using a Premium SKU. */ premiumPlanAutoScaleEnabled?: pulumi.Input; /** * The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created. */ resourceGroupName: pulumi.Input; /** * 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`, `P0v4`, `P1v4`, `P2v4`, `P3v4`, `P1mv4`, `P2mv4`, `P3mv4`, `P4mv4`, `P5mv4`, `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. * * > **Note:** Hosting Azure Functions on Linux using the Consumption plan will be retired after September 30, 2028. It is recommended to use the Flex Consumption plan for Linux Function Apps. See [here](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) for more information. */ skuName: pulumi.Input; /** * A mapping of tags which should be assigned to the AppService. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The number of Workers (instances) to be allocated. */ workerCount?: pulumi.Input; /** * Should the Service Plan balance across Availability Zones in the region. * * > **Note:** If this setting is set to `true` and the `workerCount` value 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. * * > **Note:** `zoneBalancingEnabled` can only be set to `true` on Consumption, Premium, Isolated, or Workflow SKUs. It can be disabled. To enable it, the `workerCount` must be greater than `1`, and the Service Plan must support more than one availability zone. In all other cases, changing this forces a new resource to be created. For more information, please see the [Availability Zone Support](https://learn.microsoft.com/en-us/azure/reliability/reliability-app-service?tabs=azurecli&pivots=free-shared-basic#availability-zone-support). */ zoneBalancingEnabled?: pulumi.Input; }