We recommend using Azure Native.
azure.appservice.getAppServicePlan
Explore with Pulumi AI
Use this data source to access information about an existing App Service Plan (formerly known as a Server Farm).
!> Note: The azure.appservice.Plan data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azure.appservice.ServicePlan data source instead.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.appservice.getAppServicePlan({
    name: "search-app-service-plan",
    resourceGroupName: "search-service",
});
export const appServicePlanId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.appservice.get_app_service_plan(name="search-app-service-plan",
    resource_group_name="search-service")
pulumi.export("appServicePlanId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := appservice.GetAppServicePlan(ctx, &appservice.GetAppServicePlanArgs{
			Name:              "search-app-service-plan",
			ResourceGroupName: "search-service",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("appServicePlanId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.AppService.GetAppServicePlan.Invoke(new()
    {
        Name = "search-app-service-plan",
        ResourceGroupName = "search-service",
    });
    return new Dictionary<string, object?>
    {
        ["appServicePlanId"] = example.Apply(getAppServicePlanResult => getAppServicePlanResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.AppserviceFunctions;
import com.pulumi.azure.appservice.inputs.GetAppServicePlanArgs;
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) {
        final var example = AppserviceFunctions.getAppServicePlan(GetAppServicePlanArgs.builder()
            .name("search-app-service-plan")
            .resourceGroupName("search-service")
            .build());
        ctx.export("appServicePlanId", example.applyValue(getAppServicePlanResult -> getAppServicePlanResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:appservice:getAppServicePlan
      arguments:
        name: search-app-service-plan
        resourceGroupName: search-service
outputs:
  appServicePlanId: ${example.id}
Using getAppServicePlan
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAppServicePlan(args: GetAppServicePlanArgs, opts?: InvokeOptions): Promise<GetAppServicePlanResult>
function getAppServicePlanOutput(args: GetAppServicePlanOutputArgs, opts?: InvokeOptions): Output<GetAppServicePlanResult>def get_app_service_plan(name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAppServicePlanResult
def get_app_service_plan_output(name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetAppServicePlanResult]func GetAppServicePlan(ctx *Context, args *GetAppServicePlanArgs, opts ...InvokeOption) (*GetAppServicePlanResult, error)
func GetAppServicePlanOutput(ctx *Context, args *GetAppServicePlanOutputArgs, opts ...InvokeOption) GetAppServicePlanResultOutput> Note: This function is named GetAppServicePlan in the Go SDK.
public static class GetAppServicePlan 
{
    public static Task<GetAppServicePlanResult> InvokeAsync(GetAppServicePlanArgs args, InvokeOptions? opts = null)
    public static Output<GetAppServicePlanResult> Invoke(GetAppServicePlanInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAppServicePlanResult> getAppServicePlan(GetAppServicePlanArgs args, InvokeOptions options)
public static Output<GetAppServicePlanResult> getAppServicePlan(GetAppServicePlanArgs args, InvokeOptions options)
fn::invoke:
  function: azure:appservice/getAppServicePlan:getAppServicePlan
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the App Service Plan.
- ResourceGroup stringName 
- The Name of the Resource Group where the App Service Plan exists.
- Name string
- The name of the App Service Plan.
- ResourceGroup stringName 
- The Name of the Resource Group where the App Service Plan exists.
- name String
- The name of the App Service Plan.
- resourceGroup StringName 
- The Name of the Resource Group where the App Service Plan exists.
- name string
- The name of the App Service Plan.
- resourceGroup stringName 
- The Name of the Resource Group where the App Service Plan exists.
- name str
- The name of the App Service Plan.
- resource_group_ strname 
- The Name of the Resource Group where the App Service Plan exists.
- name String
- The name of the App Service Plan.
- resourceGroup StringName 
- The Name of the Resource Group where the App Service Plan exists.
getAppServicePlan Result
The following output properties are available:
- AppService stringEnvironment Id 
- The ID of the App Service Environment where the App Service Plan is located.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsXenon bool
- A flag that indicates if it's a xenon plan (support for Windows Container)
- Kind string
- The Operating System type of the App Service Plan
- Location string
- The Azure location where the App Service Plan exists
- MaximumElastic intWorker Count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- MaximumNumber intOf Workers 
- The maximum number of workers supported with the App Service Plan's sku.
- Name string
- PerSite boolScaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- Reserved bool
- Is this App Service Plan Reserved?
- ResourceGroup stringName 
- Sku
GetApp Service Plan Sku 
- A skublock as documented below.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- ZoneRedundant bool
- App Service Plan perform availability zone balancing.
- AppService stringEnvironment Id 
- The ID of the App Service Environment where the App Service Plan is located.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsXenon bool
- A flag that indicates if it's a xenon plan (support for Windows Container)
- Kind string
- The Operating System type of the App Service Plan
- Location string
- The Azure location where the App Service Plan exists
- MaximumElastic intWorker Count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- MaximumNumber intOf Workers 
- The maximum number of workers supported with the App Service Plan's sku.
- Name string
- PerSite boolScaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- Reserved bool
- Is this App Service Plan Reserved?
- ResourceGroup stringName 
- Sku
GetApp Service Plan Sku 
- A skublock as documented below.
- map[string]string
- A mapping of tags assigned to the resource.
- ZoneRedundant bool
- App Service Plan perform availability zone balancing.
- appService StringEnvironment Id 
- The ID of the App Service Environment where the App Service Plan is located.
- id String
- The provider-assigned unique ID for this managed resource.
- isXenon Boolean
- A flag that indicates if it's a xenon plan (support for Windows Container)
- kind String
- The Operating System type of the App Service Plan
- location String
- The Azure location where the App Service Plan exists
- maximumElastic IntegerWorker Count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximumNumber IntegerOf Workers 
- The maximum number of workers supported with the App Service Plan's sku.
- name String
- perSite BooleanScaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- reserved Boolean
- Is this App Service Plan Reserved?
- resourceGroup StringName 
- sku
GetApp Service Plan Sku 
- A skublock as documented below.
- Map<String,String>
- A mapping of tags assigned to the resource.
- zoneRedundant Boolean
- App Service Plan perform availability zone balancing.
- appService stringEnvironment Id 
- The ID of the App Service Environment where the App Service Plan is located.
- id string
- The provider-assigned unique ID for this managed resource.
- isXenon boolean
- A flag that indicates if it's a xenon plan (support for Windows Container)
- kind string
- The Operating System type of the App Service Plan
- location string
- The Azure location where the App Service Plan exists
- maximumElastic numberWorker Count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximumNumber numberOf Workers 
- The maximum number of workers supported with the App Service Plan's sku.
- name string
- perSite booleanScaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- reserved boolean
- Is this App Service Plan Reserved?
- resourceGroup stringName 
- sku
GetApp Service Plan Sku 
- A skublock as documented below.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- zoneRedundant boolean
- App Service Plan perform availability zone balancing.
- app_service_ strenvironment_ id 
- The ID of the App Service Environment where the App Service Plan is located.
- id str
- The provider-assigned unique ID for this managed resource.
- is_xenon bool
- A flag that indicates if it's a xenon plan (support for Windows Container)
- kind str
- The Operating System type of the App Service Plan
- location str
- The Azure location where the App Service Plan exists
- maximum_elastic_ intworker_ count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximum_number_ intof_ workers 
- The maximum number of workers supported with the App Service Plan's sku.
- name str
- per_site_ boolscaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- reserved bool
- Is this App Service Plan Reserved?
- resource_group_ strname 
- sku
GetApp Service Plan Sku 
- A skublock as documented below.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- zone_redundant bool
- App Service Plan perform availability zone balancing.
- appService StringEnvironment Id 
- The ID of the App Service Environment where the App Service Plan is located.
- id String
- The provider-assigned unique ID for this managed resource.
- isXenon Boolean
- A flag that indicates if it's a xenon plan (support for Windows Container)
- kind String
- The Operating System type of the App Service Plan
- location String
- The Azure location where the App Service Plan exists
- maximumElastic NumberWorker Count 
- The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximumNumber NumberOf Workers 
- The maximum number of workers supported with the App Service Plan's sku.
- name String
- perSite BooleanScaling 
- Can Apps assigned to this App Service Plan be scaled independently?
- reserved Boolean
- Is this App Service Plan Reserved?
- resourceGroup StringName 
- sku Property Map
- A skublock as documented below.
- Map<String>
- A mapping of tags assigned to the resource.
- zoneRedundant Boolean
- App Service Plan perform availability zone balancing.
Supporting Types
GetAppServicePlanSku    
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.