getAppServicePlan

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 5.0 of the provider and will be removed in version 6.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)
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 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
})
}
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.id());
}
}
variables:
example:
fn::invoke:
function: azure:appservice:getAppServicePlan
arguments:
name: search-app-service-plan
resourceGroupName: search-service
outputs:
appServicePlanId: ${example.id}

Return

A collection of values returned by getAppServicePlan.

Parameters

argument

A collection of arguments for invoking getAppServicePlan.


suspend fun getAppServicePlan(name: String, resourceGroupName: String): GetAppServicePlanResult

Return

A collection of values returned by getAppServicePlan.

Parameters

name

The name of the App Service Plan.

resourceGroupName

The Name of the Resource Group where the App Service Plan exists.

See also


Return

A collection of values returned by getAppServicePlan.

Parameters

argument

Builder for com.pulumi.azure.appservice.kotlin.inputs.GetAppServicePlanPlainArgs.

See also