Service Plan
Manages a Lab Service Plan. !>Note: This resource is being deprecated by Azure. This resource will be removed in version 4.0 of the provider.
Note: Before using this resource, it's required to submit the request of registering the provider with Azure CLI
az provider register --namespace Microsoft.LabServices
.
Example Usage
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.lab.ServicePlan("example", {
name: "example-lp",
resourceGroupName: example.name,
location: example.location,
allowedRegions: [example.location],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service_plan = azure.lab.ServicePlan("example",
name="example-lp",
resource_group_name=example.name,
location=example.location,
allowed_regions=[example.location])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleServicePlan = new Azure.Lab.ServicePlan("example", new()
{
Name = "example-lp",
ResourceGroupName = example.Name,
Location = example.Location,
AllowedRegions = new[]
{
example.Location,
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = lab.NewServicePlan(ctx, "example", &lab.ServicePlanArgs{
Name: pulumi.String("example-lp"),
ResourceGroupName: example.Name,
Location: example.Location,
AllowedRegions: pulumi.StringArray{
example.Location,
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.lab.ServicePlan;
import com.pulumi.azure.lab.ServicePlanArgs;
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) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.name("example-lp")
.resourceGroupName(example.name())
.location(example.location())
.allowedRegions(example.location())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleServicePlan:
type: azure:lab:ServicePlan
name: example
properties:
name: example-lp
resourceGroupName: ${example.name}
location: ${example.location}
allowedRegions:
- ${example.location}
Import
Lab Service Plans can be imported using the resource id
, e.g.
$ pulumi import azure:lab/servicePlan:ServicePlan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labPlans/labPlan1
Properties
The allowed regions for the lab creator to use when creating labs using this Lab Service Plan. The allowed region's count must be between 1
and 28
.
A default_auto_shutdown
block as defined below.
A default_connection
block as defined below.
The resource ID of the Subnet for the Lab Service Plan network profile.
The name of the Resource Group where the Lab Service Plan should exist. Changing this forces a new resource to be created.
The resource ID of the Shared Image Gallery attached to this Lab Service Plan. When saving a lab template virtual machine image it will be persisted in this gallery. The shared images from the gallery can be made available to use when creating new labs.
A support
block as defined below.