Scale Set Standby Pool
Manages a Standby Pool for Virtual Machine Scale Sets.
NOTE : please follow the prerequisites mentioned in this article before using this resource.
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 exampleOrchestratedVirtualMachineScaleSet = new azure.compute.OrchestratedVirtualMachineScaleSet("example", {
name: "example-ovmss",
location: example.location,
resourceGroupName: example.name,
platformFaultDomainCount: 1,
zones: ["1"],
});
const exampleScaleSetStandbyPool = new azure.compute.ScaleSetStandbyPool("example", {
name: "example-spsvmp",
resourceGroupName: example.name,
location: "West Europe",
attachedVirtualMachineScaleSetId: exampleOrchestratedVirtualMachineScaleSet.id,
virtualMachineState: "Running",
elasticityProfile: {
maxReadyCapacity: 10,
minReadyCapacity: 5,
},
tags: {
key: "value",
},
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_orchestrated_virtual_machine_scale_set = azure.compute.OrchestratedVirtualMachineScaleSet("example",
name="example-ovmss",
location=example.location,
resource_group_name=example.name,
platform_fault_domain_count=1,
zones=["1"])
example_scale_set_standby_pool = azure.compute.ScaleSetStandbyPool("example",
name="example-spsvmp",
resource_group_name=example.name,
location="West Europe",
attached_virtual_machine_scale_set_id=example_orchestrated_virtual_machine_scale_set.id,
virtual_machine_state="Running",
elasticity_profile={
"max_ready_capacity": 10,
"min_ready_capacity": 5,
},
tags={
"key": "value",
})
Content copied to clipboard
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 exampleOrchestratedVirtualMachineScaleSet = new Azure.Compute.OrchestratedVirtualMachineScaleSet("example", new()
{
Name = "example-ovmss",
Location = example.Location,
ResourceGroupName = example.Name,
PlatformFaultDomainCount = 1,
Zones = new[]
{
"1",
},
});
var exampleScaleSetStandbyPool = new Azure.Compute.ScaleSetStandbyPool("example", new()
{
Name = "example-spsvmp",
ResourceGroupName = example.Name,
Location = "West Europe",
AttachedVirtualMachineScaleSetId = exampleOrchestratedVirtualMachineScaleSet.Id,
VirtualMachineState = "Running",
ElasticityProfile = new Azure.Compute.Inputs.ScaleSetStandbyPoolElasticityProfileArgs
{
MaxReadyCapacity = 10,
MinReadyCapacity = 5,
},
Tags =
{
{ "key", "value" },
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"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
}
exampleOrchestratedVirtualMachineScaleSet, err := compute.NewOrchestratedVirtualMachineScaleSet(ctx, "example", &compute.OrchestratedVirtualMachineScaleSetArgs{
Name: pulumi.String("example-ovmss"),
Location: example.Location,
ResourceGroupName: example.Name,
PlatformFaultDomainCount: pulumi.Int(1),
Zones: pulumi.StringArray{
pulumi.String("1"),
},
})
if err != nil {
return err
}
_, err = compute.NewScaleSetStandbyPool(ctx, "example", &compute.ScaleSetStandbyPoolArgs{
Name: pulumi.String("example-spsvmp"),
ResourceGroupName: example.Name,
Location: pulumi.String("West Europe"),
AttachedVirtualMachineScaleSetId: exampleOrchestratedVirtualMachineScaleSet.ID(),
VirtualMachineState: pulumi.String("Running"),
ElasticityProfile: &compute.ScaleSetStandbyPoolElasticityProfileArgs{
MaxReadyCapacity: pulumi.Int(10),
MinReadyCapacity: pulumi.Int(5),
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.compute.OrchestratedVirtualMachineScaleSet;
import com.pulumi.azure.compute.OrchestratedVirtualMachineScaleSetArgs;
import com.pulumi.azure.compute.ScaleSetStandbyPool;
import com.pulumi.azure.compute.ScaleSetStandbyPoolArgs;
import com.pulumi.azure.compute.inputs.ScaleSetStandbyPoolElasticityProfileArgs;
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 exampleOrchestratedVirtualMachineScaleSet = new OrchestratedVirtualMachineScaleSet("exampleOrchestratedVirtualMachineScaleSet", OrchestratedVirtualMachineScaleSetArgs.builder()
.name("example-ovmss")
.location(example.location())
.resourceGroupName(example.name())
.platformFaultDomainCount(1)
.zones("1")
.build());
var exampleScaleSetStandbyPool = new ScaleSetStandbyPool("exampleScaleSetStandbyPool", ScaleSetStandbyPoolArgs.builder()
.name("example-spsvmp")
.resourceGroupName(example.name())
.location("West Europe")
.attachedVirtualMachineScaleSetId(exampleOrchestratedVirtualMachineScaleSet.id())
.virtualMachineState("Running")
.elasticityProfile(ScaleSetStandbyPoolElasticityProfileArgs.builder()
.maxReadyCapacity(10)
.minReadyCapacity(5)
.build())
.tags(Map.of("key", "value"))
.build());
}
}
Content copied to clipboard
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleOrchestratedVirtualMachineScaleSet:
type: azure:compute:OrchestratedVirtualMachineScaleSet
name: example
properties:
name: example-ovmss
location: ${example.location}
resourceGroupName: ${example.name}
platformFaultDomainCount: 1
zones:
- '1'
exampleScaleSetStandbyPool:
type: azure:compute:ScaleSetStandbyPool
name: example
properties:
name: example-spsvmp
resourceGroupName: ${example.name}
location: West Europe
attachedVirtualMachineScaleSetId: ${exampleOrchestratedVirtualMachineScaleSet.id}
virtualMachineState: Running
elasticityProfile:
maxReadyCapacity: 10
minReadyCapacity: 5
tags:
key: value
Content copied to clipboard
Import
Standby Pool can be imported using the resource id
, e.g.
$ pulumi import azure:compute/scaleSetStandbyPool:ScaleSetStandbyPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/standbyVirtualMachinePool1
Content copied to clipboard
Properties
Link copied to clipboard
Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.
Link copied to clipboard
An elasticity_profile
block as defined below.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Specifies the name of the Resource Group where the Standby Pool should exist. Changing this forces a new Standby Pool to be created.
Link copied to clipboard
Specifies the desired state of virtual machines in the pool. Possible values are Running
and Deallocated
.