We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.appservice.getServicePlan
Explore with Pulumi AI
Use this data source to access information about an existing Service Plan.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.appservice.getServicePlan({
    name: "existing",
    resourceGroupName: "existing",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.appservice.get_service_plan(name="existing",
    resource_group_name="existing")
pulumi.export("id", 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.LookupServicePlan(ctx, &appservice.LookupServicePlanArgs{
			Name:              "existing",
			ResourceGroupName: "existing",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", 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.GetServicePlan.Invoke(new()
    {
        Name = "existing",
        ResourceGroupName = "existing",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getServicePlanResult => getServicePlanResult.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.GetServicePlanArgs;
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.getServicePlan(GetServicePlanArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .build());
        ctx.export("id", example.applyValue(getServicePlanResult -> getServicePlanResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:appservice:getServicePlan
      arguments:
        name: existing
        resourceGroupName: existing
outputs:
  id: ${example.id}
Using getServicePlan
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 getServicePlan(args: GetServicePlanArgs, opts?: InvokeOptions): Promise<GetServicePlanResult>
function getServicePlanOutput(args: GetServicePlanOutputArgs, opts?: InvokeOptions): Output<GetServicePlanResult>def get_service_plan(name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetServicePlanResult
def get_service_plan_output(name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetServicePlanResult]func LookupServicePlan(ctx *Context, args *LookupServicePlanArgs, opts ...InvokeOption) (*LookupServicePlanResult, error)
func LookupServicePlanOutput(ctx *Context, args *LookupServicePlanOutputArgs, opts ...InvokeOption) LookupServicePlanResultOutput> Note: This function is named LookupServicePlan in the Go SDK.
public static class GetServicePlan 
{
    public static Task<GetServicePlanResult> InvokeAsync(GetServicePlanArgs args, InvokeOptions? opts = null)
    public static Output<GetServicePlanResult> Invoke(GetServicePlanInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOptions options)
public static Output<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOptions options)
fn::invoke:
  function: azure:appservice/getServicePlan:getServicePlan
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of this Service Plan.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan exists.
- Name string
- The name of this Service Plan.
- ResourceGroup stringName 
- The name of the Resource Group where the Service Plan exists.
- name String
- The name of this Service Plan.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan exists.
- name string
- The name of this Service Plan.
- resourceGroup stringName 
- The name of the Resource Group where the Service Plan exists.
- name str
- The name of this Service Plan.
- resource_group_ strname 
- The name of the Resource Group where the Service Plan exists.
- name String
- The name of this Service Plan.
- resourceGroup StringName 
- The name of the Resource Group where the Service Plan exists.
getServicePlan Result
The following output properties are available:
- AppService stringEnvironment Id 
- The ID of the App Service Environment this Service Plan is part of.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- A string representing the Kind of Service Plan.
- Location string
- The Azure Region where the Service Plan exists.
- MaximumElastic intWorker Count 
- The maximum number of workers in use in an Elastic SKU Plan.
- Name string
- OsType string
- The O/S type for the App Services hosted in this plan.
- PerSite boolScaling Enabled 
- Is Per Site Scaling be enabled?
- Reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- ResourceGroup stringName 
- SkuName string
- The SKU for the Service Plan.
- Dictionary<string, string>
- A mapping of tags assigned to the Service Plan.
- WorkerCount int
- The number of Workers (instances) allocated.
- ZoneBalancing boolEnabled 
- Is the Service Plan balance across Availability Zones in the region?
- AppService stringEnvironment Id 
- The ID of the App Service Environment this Service Plan is part of.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- A string representing the Kind of Service Plan.
- Location string
- The Azure Region where the Service Plan exists.
- MaximumElastic intWorker Count 
- The maximum number of workers in use in an Elastic SKU Plan.
- Name string
- OsType string
- The O/S type for the App Services hosted in this plan.
- PerSite boolScaling Enabled 
- Is Per Site Scaling be enabled?
- Reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- ResourceGroup stringName 
- SkuName string
- The SKU for the Service Plan.
- map[string]string
- A mapping of tags assigned to the Service Plan.
- WorkerCount int
- The number of Workers (instances) allocated.
- ZoneBalancing boolEnabled 
- Is the Service Plan balance across Availability Zones in the region?
- appService StringEnvironment Id 
- The ID of the App Service Environment this Service Plan is part of.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- A string representing the Kind of Service Plan.
- location String
- The Azure Region where the Service Plan exists.
- maximumElastic IntegerWorker Count 
- The maximum number of workers in use in an Elastic SKU Plan.
- name String
- osType String
- The O/S type for the App Services hosted in this plan.
- perSite BooleanScaling Enabled 
- Is Per Site Scaling be enabled?
- reserved Boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup StringName 
- skuName String
- The SKU for the Service Plan.
- Map<String,String>
- A mapping of tags assigned to the Service Plan.
- workerCount Integer
- The number of Workers (instances) allocated.
- zoneBalancing BooleanEnabled 
- Is the Service Plan balance across Availability Zones in the region?
- appService stringEnvironment Id 
- The ID of the App Service Environment this Service Plan is part of.
- id string
- The provider-assigned unique ID for this managed resource.
- kind string
- A string representing the Kind of Service Plan.
- location string
- The Azure Region where the Service Plan exists.
- maximumElastic numberWorker Count 
- The maximum number of workers in use in an Elastic SKU Plan.
- name string
- osType string
- The O/S type for the App Services hosted in this plan.
- perSite booleanScaling Enabled 
- Is Per Site Scaling be enabled?
- reserved boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup stringName 
- skuName string
- The SKU for the Service Plan.
- {[key: string]: string}
- A mapping of tags assigned to the Service Plan.
- workerCount number
- The number of Workers (instances) allocated.
- zoneBalancing booleanEnabled 
- Is the Service Plan balance across Availability Zones in the region?
- app_service_ strenvironment_ id 
- The ID of the App Service Environment this Service Plan is part of.
- id str
- The provider-assigned unique ID for this managed resource.
- kind str
- A string representing the Kind of Service Plan.
- location str
- The Azure Region where the Service Plan exists.
- maximum_elastic_ intworker_ count 
- The maximum number of workers in use in an Elastic SKU Plan.
- name str
- os_type str
- The O/S type for the App Services hosted in this plan.
- per_site_ boolscaling_ enabled 
- Is Per Site Scaling be enabled?
- reserved bool
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resource_group_ strname 
- sku_name str
- The SKU for the Service Plan.
- Mapping[str, str]
- A mapping of tags assigned to the Service Plan.
- worker_count int
- The number of Workers (instances) allocated.
- zone_balancing_ boolenabled 
- Is the Service Plan balance across Availability Zones in the region?
- appService StringEnvironment Id 
- The ID of the App Service Environment this Service Plan is part of.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- A string representing the Kind of Service Plan.
- location String
- The Azure Region where the Service Plan exists.
- maximumElastic NumberWorker Count 
- The maximum number of workers in use in an Elastic SKU Plan.
- name String
- osType String
- The O/S type for the App Services hosted in this plan.
- perSite BooleanScaling Enabled 
- Is Per Site Scaling be enabled?
- reserved Boolean
- Whether this is a reserved Service Plan Type. trueifos_typeisLinux, otherwisefalse.
- resourceGroup StringName 
- skuName String
- The SKU for the Service Plan.
- Map<String>
- A mapping of tags assigned to the Service Plan.
- workerCount Number
- The number of Workers (instances) allocated.
- zoneBalancing BooleanEnabled 
- Is the Service Plan balance across Availability Zones in the region?
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.