1. Packages
  2. vSphere
  3. API Docs
  4. ComputeClusterVmGroup
vSphere v4.11.3 published on Monday, Sep 30, 2024 by Pulumi

vsphere.ComputeClusterVmGroup

Explore with Pulumi AI

vsphere logo
vSphere v4.11.3 published on Monday, Sep 30, 2024 by Pulumi

    The vsphere.ComputeClusterVmGroup resource can be used to manage groups of virtual machines in a cluster, either created by the vsphere.ComputeCluster resource or looked up by the vsphere.ComputeCluster data source.

    This resource mainly serves as an input to the vsphere.ComputeClusterVmDependencyRule and vsphere.ComputeClusterVmHostRule resources. See the individual resource documentation pages for more information.

    NOTE: This resource requires vCenter and is not available on direct ESXi connections.

    Example Usage

    The example below creates two virtual machines in a cluster using the vsphere.VirtualMachine resource, creating the virtual machine in the cluster looked up by the vsphere.ComputeCluster data source. It then creates a group from these two virtual machines.

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore1",
        datacenterId: datacenter.id,
    }));
    const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
        name: "cluster-01",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "network1",
        datacenterId: datacenter.id,
    }));
    const vm: vsphere.VirtualMachine[] = [];
    for (const range = {value: 0}; range.value < 2; range.value++) {
        vm.push(new vsphere.VirtualMachine(`vm-${range.value}`, {
            name: `test-${range.value}`,
            resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
            datastoreId: datastore.then(datastore => datastore.id),
            numCpus: 2,
            memory: 2048,
            guestId: "otherLinux64Guest",
            networkInterfaces: [{
                networkId: network.then(network => network.id),
            }],
            disks: [{
                label: "disk0",
                size: 20,
            }],
        }));
    }
    const clusterVmGroup = new vsphere.ComputeClusterVmGroup("cluster_vm_group", {
        name: "test-cluster-vm-group",
        computeClusterId: cluster.then(cluster => cluster.id),
        virtualMachineIds: [vm.map(__item => __item.id)],
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore = vsphere.get_datastore(name="datastore1",
        datacenter_id=datacenter.id)
    cluster = vsphere.get_compute_cluster(name="cluster-01",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="network1",
        datacenter_id=datacenter.id)
    vm = []
    for range in [{"value": i} for i in range(0, 2)]:
        vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
            name=f"test-{range['value']}",
            resource_pool_id=cluster.resource_pool_id,
            datastore_id=datastore.id,
            num_cpus=2,
            memory=2048,
            guest_id="otherLinux64Guest",
            network_interfaces=[{
                "network_id": network.id,
            }],
            disks=[{
                "label": "disk0",
                "size": 20,
            }]))
    cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
        name="test-cluster-vm-group",
        compute_cluster_id=cluster.id,
        virtual_machine_ids=[[__item.id for __item in vm]])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
    Name: pulumi.StringRef("dc-01"),
    }, nil);
    if err != nil {
    return err
    }
    datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    Name: "datastore1",
    DatacenterId: pulumi.StringRef(datacenter.Id),
    }, nil);
    if err != nil {
    return err
    }
    cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
    Name: "cluster-01",
    DatacenterId: pulumi.StringRef(datacenter.Id),
    }, nil);
    if err != nil {
    return err
    }
    network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    Name: "network1",
    DatacenterId: pulumi.StringRef(datacenter.Id),
    }, nil);
    if err != nil {
    return err
    }
    var vm []*vsphere.VirtualMachine
    for index := 0; index < 2; index++ {
        key0 := index
        val0 := index
    __res, err := vsphere.NewVirtualMachine(ctx, fmt.Sprintf("vm-%v", key0), &vsphere.VirtualMachineArgs{
    Name: pulumi.Sprintf("test-%v", val0),
    ResourcePoolId: pulumi.String(cluster.ResourcePoolId),
    DatastoreId: pulumi.String(datastore.Id),
    NumCpus: pulumi.Int(2),
    Memory: pulumi.Int(2048),
    GuestId: pulumi.String("otherLinux64Guest"),
    NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
    &vsphere.VirtualMachineNetworkInterfaceArgs{
    NetworkId: pulumi.String(network.Id),
    },
    },
    Disks: vsphere.VirtualMachineDiskArray{
    &vsphere.VirtualMachineDiskArgs{
    Label: pulumi.String("disk0"),
    Size: pulumi.Int(20),
    },
    },
    })
    if err != nil {
    return err
    }
    vm = append(vm, __res)
    }
    _, err = vsphere.NewComputeClusterVmGroup(ctx, "cluster_vm_group", &vsphere.ComputeClusterVmGroupArgs{
    Name: pulumi.String("test-cluster-vm-group"),
    ComputeClusterId: pulumi.String(cluster.Id),
    VirtualMachineIds: pulumi.StringArray{
    pulumi.String(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:42,27-35)),
    },
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using VSphere = Pulumi.VSphere;
    
    return await Deployment.RunAsync(() => 
    {
        var datacenter = VSphere.GetDatacenter.Invoke(new()
        {
            Name = "dc-01",
        });
    
        var datastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore1",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var cluster = VSphere.GetComputeCluster.Invoke(new()
        {
            Name = "cluster-01",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "network1",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new List<VSphere.VirtualMachine>();
        for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            vm.Add(new VSphere.VirtualMachine($"vm-{range.Value}", new()
            {
                Name = $"test-{range.Value}",
                ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
                DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
                NumCpus = 2,
                Memory = 2048,
                GuestId = "otherLinux64Guest",
                NetworkInterfaces = new[]
                {
                    new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
                    {
                        NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
                    },
                },
                Disks = new[]
                {
                    new VSphere.Inputs.VirtualMachineDiskArgs
                    {
                        Label = "disk0",
                        Size = 20,
                    },
                },
            }));
        }
        var clusterVmGroup = new VSphere.ComputeClusterVmGroup("cluster_vm_group", new()
        {
            Name = "test-cluster-vm-group",
            ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id),
            VirtualMachineIds = new[]
            {
                vm.Select(__item => __item.Id).ToList(),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vsphere.VsphereFunctions;
    import com.pulumi.vsphere.inputs.GetDatacenterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
    import com.pulumi.vsphere.inputs.GetNetworkArgs;
    import com.pulumi.vsphere.VirtualMachine;
    import com.pulumi.vsphere.VirtualMachineArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
    import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
    import com.pulumi.vsphere.ComputeClusterVmGroup;
    import com.pulumi.vsphere.ComputeClusterVmGroupArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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 datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
                .name("dc-01")
                .build());
    
            final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore1")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
                .name("cluster-01")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("network1")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            for (var i = 0; i < 2; i++) {
                new VirtualMachine("vm-" + i, VirtualMachineArgs.builder()
                    .name(String.format("test-%s", range.value()))
                    .resourcePoolId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.resourcePoolId()))
                    .datastoreId(datastore.applyValue(getDatastoreResult -> getDatastoreResult.id()))
                    .numCpus(2)
                    .memory(2048)
                    .guestId("otherLinux64Guest")
                    .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                        .networkId(network.applyValue(getNetworkResult -> getNetworkResult.id()))
                        .build())
                    .disks(VirtualMachineDiskArgs.builder()
                        .label("disk0")
                        .size(20)
                        .build())
                    .build());
    
            
    }
            var clusterVmGroup = new ComputeClusterVmGroup("clusterVmGroup", ComputeClusterVmGroupArgs.builder()
                .name("test-cluster-vm-group")
                .computeClusterId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.id()))
                .virtualMachineIds(vm.stream().map(element -> element.id()).collect(toList()))
                .build());
    
        }
    }
    
    Coming soon!
    

    Create ComputeClusterVmGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ComputeClusterVmGroup(name: string, args: ComputeClusterVmGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ComputeClusterVmGroup(resource_name: str,
                              args: ComputeClusterVmGroupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeClusterVmGroup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              compute_cluster_id: Optional[str] = None,
                              name: Optional[str] = None,
                              virtual_machine_ids: Optional[Sequence[str]] = None)
    func NewComputeClusterVmGroup(ctx *Context, name string, args ComputeClusterVmGroupArgs, opts ...ResourceOption) (*ComputeClusterVmGroup, error)
    public ComputeClusterVmGroup(string name, ComputeClusterVmGroupArgs args, CustomResourceOptions? opts = null)
    public ComputeClusterVmGroup(String name, ComputeClusterVmGroupArgs args)
    public ComputeClusterVmGroup(String name, ComputeClusterVmGroupArgs args, CustomResourceOptions options)
    
    type: vsphere:ComputeClusterVmGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ComputeClusterVmGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ComputeClusterVmGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ComputeClusterVmGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeClusterVmGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeClusterVmGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var computeClusterVmGroupResource = new VSphere.ComputeClusterVmGroup("computeClusterVmGroupResource", new()
    {
        ComputeClusterId = "string",
        Name = "string",
        VirtualMachineIds = new[]
        {
            "string",
        },
    });
    
    example, err := vsphere.NewComputeClusterVmGroup(ctx, "computeClusterVmGroupResource", &vsphere.ComputeClusterVmGroupArgs{
    	ComputeClusterId: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	VirtualMachineIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var computeClusterVmGroupResource = new ComputeClusterVmGroup("computeClusterVmGroupResource", ComputeClusterVmGroupArgs.builder()
        .computeClusterId("string")
        .name("string")
        .virtualMachineIds("string")
        .build());
    
    compute_cluster_vm_group_resource = vsphere.ComputeClusterVmGroup("computeClusterVmGroupResource",
        compute_cluster_id="string",
        name="string",
        virtual_machine_ids=["string"])
    
    const computeClusterVmGroupResource = new vsphere.ComputeClusterVmGroup("computeClusterVmGroupResource", {
        computeClusterId: "string",
        name: "string",
        virtualMachineIds: ["string"],
    });
    
    type: vsphere:ComputeClusterVmGroup
    properties:
        computeClusterId: string
        name: string
        virtualMachineIds:
            - string
    

    ComputeClusterVmGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ComputeClusterVmGroup resource accepts the following input properties:

    ComputeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    Name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    VirtualMachineIds List<string>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    ComputeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    Name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    VirtualMachineIds []string

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId String
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name String
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds List<String>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds string[]

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    compute_cluster_id str
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name str
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtual_machine_ids Sequence[str]

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId String
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name String
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds List<String>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputeClusterVmGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ComputeClusterVmGroup Resource

    Get an existing ComputeClusterVmGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ComputeClusterVmGroupState, opts?: CustomResourceOptions): ComputeClusterVmGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute_cluster_id: Optional[str] = None,
            name: Optional[str] = None,
            virtual_machine_ids: Optional[Sequence[str]] = None) -> ComputeClusterVmGroup
    func GetComputeClusterVmGroup(ctx *Context, name string, id IDInput, state *ComputeClusterVmGroupState, opts ...ResourceOption) (*ComputeClusterVmGroup, error)
    public static ComputeClusterVmGroup Get(string name, Input<string> id, ComputeClusterVmGroupState? state, CustomResourceOptions? opts = null)
    public static ComputeClusterVmGroup get(String name, Output<String> id, ComputeClusterVmGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ComputeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    Name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    VirtualMachineIds List<string>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    ComputeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    Name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    VirtualMachineIds []string

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId String
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name String
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds List<String>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId string
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name string
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds string[]

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    compute_cluster_id str
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name str
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtual_machine_ids Sequence[str]

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    computeClusterId String
    The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
    name String
    The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
    virtualMachineIds List<String>

    The UUIDs of the virtual machines in this group.

    NOTE: The namespace for cluster names on this resource (defined by the name argument) is shared with the vsphere.ComputeClusterHostGroup resource. Make sure your names are unique across both resources.

    NOTE: To update a existing VM group, you must first import the group with import command in import section. When importing a VM group, validate that all virtual machines that need to be in the group are included in the virtual_machine_ids; otherwise, any virtual machines that are not in virtual_machine_ids the included will be removed from the group.

    Import

    An existing group can be imported into this resource by

    supplying both the path to the cluster, and the name of the VM group. If the

    name or cluster is not found, or if the group is of a different type, an error

    will be returned. An example is below:

    $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \
    

    ‘{“compute_cluster_path”: “/dc1/host/cluster1”, \

    “name”: “pulumi-test-cluster-vm-group”}’

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vsphere Terraform Provider.
    vsphere logo
    vSphere v4.11.3 published on Monday, Sep 30, 2024 by Pulumi