Skip to content

Data Source: azurermAppServicePlan

Use this data source to access information about an existing App Service Plan (formerly known as a serverFarm).

!> Note: The azurermAppServicePlan data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azurermServicePlan data source instead.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermAppServicePlanExample =
  new azurerm.dataAzurermAppServicePlan.DataAzurermAppServicePlan(
    this,
    "example",
    {
      name: "search-app-service-plan",
      resource_group_name: "search-service",
    }
  );
new cdktf.TerraformOutput(this, "app_service_plan_id", {
  value: dataAzurermAppServicePlanExample.id,
});

Argument Reference

  • name - The name of the App Service Plan.
  • resourceGroupName - The Name of the Resource Group where the App Service Plan exists.

Attributes Reference

  • id - The ID of the App Service Plan.

  • location - The Azure location where the App Service Plan exists

  • kind - The Operating System type of the App Service Plan

  • sku - A sku block as documented below.

  • appServiceEnvironmentId - The ID of the App Service Environment where the App Service Plan is located.

  • maximumNumberOfWorkers - Maximum number of instances that can be assigned to this App Service plan.

  • reserved - Is this App Service Plan reserved?

  • perSiteScaling - Can Apps assigned to this App Service Plan be scaled independently?

  • tags - A mapping of tags assigned to the resource.

  • maximumElasticWorkerCount - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.

  • isXenon - A flag that indicates if it's a xenon plan (support for Windows Container)

  • maximumNumberOfWorkers - The maximum number of workers supported with the App Service Plan's sku.

  • zoneRedundant - App Service Plan perform availability zone balancing.


A sku block supports the following:

  • tier - Specifies the plan's pricing tier.

  • size - Specifies the plan's instance size.

  • capacity - Specifies the number of workers associated with this App Service Plan.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the App Service Plan.