1. Packages
  2. vSphere
  3. API Docs
  4. StorageDrsVmOverride
vSphere v4.11.4 published on Wednesday, Oct 9, 2024 by Pulumi

vsphere.StorageDrsVmOverride

Explore with Pulumi AI

vsphere logo
vSphere v4.11.4 published on Wednesday, Oct 9, 2024 by Pulumi

    The vsphere.StorageDrsVmOverride resource can be used to add a Storage DRS override to a datastore cluster for a specific virtual machine. With this resource, one can enable or disable Storage DRS, and control the automation level and disk affinity for a single virtual machine without affecting the rest of the datastore cluster.

    For more information on vSphere datastore clusters and Storage DRS, see this page.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const datacenter = vsphere.getDatacenter({
        name: "dc-01",
    });
    const datastoreCluster = datacenter.then(datacenter => vsphere.getDatastoreCluster({
        name: "datastore-cluster1",
        datacenterId: datacenter.id,
    }));
    const memberDatastore = datacenter.then(datacenter => vsphere.getDatastore({
        name: "datastore-cluster1-member1",
        datacenterId: datacenter.id,
    }));
    const pool = datacenter.then(datacenter => vsphere.getResourcePool({
        name: "cluster1/Resources",
        datacenterId: datacenter.id,
    }));
    const network = datacenter.then(datacenter => vsphere.getNetwork({
        name: "public",
        datacenterId: datacenter.id,
    }));
    const vm = new vsphere.VirtualMachine("vm", {
        name: "test",
        resourcePoolId: pool.then(pool => pool.id),
        datastoreId: memberDatastore.then(memberDatastore => memberDatastore.id),
        numCpus: 2,
        memory: 1024,
        guestId: "otherLinux64Guest",
        networkInterfaces: [{
            networkId: network.then(network => network.id),
        }],
        disks: [{
            label: "disk0",
            size: 20,
        }],
    });
    const drsVmOverride = new vsphere.StorageDrsVmOverride("drs_vm_override", {
        datastoreClusterId: datastoreCluster.then(datastoreCluster => datastoreCluster.id),
        virtualMachineId: vm.id,
        sdrsEnabled: "false",
    });
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    datacenter = vsphere.get_datacenter(name="dc-01")
    datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
        datacenter_id=datacenter.id)
    member_datastore = vsphere.get_datastore(name="datastore-cluster1-member1",
        datacenter_id=datacenter.id)
    pool = vsphere.get_resource_pool(name="cluster1/Resources",
        datacenter_id=datacenter.id)
    network = vsphere.get_network(name="public",
        datacenter_id=datacenter.id)
    vm = vsphere.VirtualMachine("vm",
        name="test",
        resource_pool_id=pool.id,
        datastore_id=member_datastore.id,
        num_cpus=2,
        memory=1024,
        guest_id="otherLinux64Guest",
        network_interfaces=[{
            "network_id": network.id,
        }],
        disks=[{
            "label": "disk0",
            "size": 20,
        }])
    drs_vm_override = vsphere.StorageDrsVmOverride("drs_vm_override",
        datastore_cluster_id=datastore_cluster.id,
        virtual_machine_id=vm.id,
        sdrs_enabled="false")
    
    package main
    
    import (
    	"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
    		}
    		datastoreCluster, err := vsphere.LookupDatastoreCluster(ctx, &vsphere.LookupDatastoreClusterArgs{
    			Name:         "datastore-cluster1",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		memberDatastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
    			Name:         "datastore-cluster1-member1",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		pool, err := vsphere.LookupResourcePool(ctx, &vsphere.LookupResourcePoolArgs{
    			Name:         pulumi.StringRef("cluster1/Resources"),
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
    			Name:         "public",
    			DatacenterId: pulumi.StringRef(datacenter.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vm, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
    			Name:           pulumi.String("test"),
    			ResourcePoolId: pulumi.String(pool.Id),
    			DatastoreId:    pulumi.String(memberDatastore.Id),
    			NumCpus:        pulumi.Int(2),
    			Memory:         pulumi.Int(1024),
    			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
    		}
    		_, err = vsphere.NewStorageDrsVmOverride(ctx, "drs_vm_override", &vsphere.StorageDrsVmOverrideArgs{
    			DatastoreClusterId: pulumi.String(datastoreCluster.Id),
    			VirtualMachineId:   vm.ID(),
    			SdrsEnabled:        pulumi.String("false"),
    		})
    		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 datastoreCluster = VSphere.GetDatastoreCluster.Invoke(new()
        {
            Name = "datastore-cluster1",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var memberDatastore = VSphere.GetDatastore.Invoke(new()
        {
            Name = "datastore-cluster1-member1",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var pool = VSphere.GetResourcePool.Invoke(new()
        {
            Name = "cluster1/Resources",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var network = VSphere.GetNetwork.Invoke(new()
        {
            Name = "public",
            DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
        });
    
        var vm = new VSphere.VirtualMachine("vm", new()
        {
            Name = "test",
            ResourcePoolId = pool.Apply(getResourcePoolResult => getResourcePoolResult.Id),
            DatastoreId = memberDatastore.Apply(getDatastoreResult => getDatastoreResult.Id),
            NumCpus = 2,
            Memory = 1024,
            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 drsVmOverride = new VSphere.StorageDrsVmOverride("drs_vm_override", new()
        {
            DatastoreClusterId = datastoreCluster.Apply(getDatastoreClusterResult => getDatastoreClusterResult.Id),
            VirtualMachineId = vm.Id,
            SdrsEnabled = "false",
        });
    
    });
    
    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.GetDatastoreClusterArgs;
    import com.pulumi.vsphere.inputs.GetDatastoreArgs;
    import com.pulumi.vsphere.inputs.GetResourcePoolArgs;
    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.StorageDrsVmOverride;
    import com.pulumi.vsphere.StorageDrsVmOverrideArgs;
    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 datastoreCluster = VsphereFunctions.getDatastoreCluster(GetDatastoreClusterArgs.builder()
                .name("datastore-cluster1")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            final var memberDatastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
                .name("datastore-cluster1-member1")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            final var pool = VsphereFunctions.getResourcePool(GetResourcePoolArgs.builder()
                .name("cluster1/Resources")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
                .name("public")
                .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
                .name("test")
                .resourcePoolId(pool.applyValue(getResourcePoolResult -> getResourcePoolResult.id()))
                .datastoreId(memberDatastore.applyValue(getDatastoreResult -> getDatastoreResult.id()))
                .numCpus(2)
                .memory(1024)
                .guestId("otherLinux64Guest")
                .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
                    .networkId(network.applyValue(getNetworkResult -> getNetworkResult.id()))
                    .build())
                .disks(VirtualMachineDiskArgs.builder()
                    .label("disk0")
                    .size(20)
                    .build())
                .build());
    
            var drsVmOverride = new StorageDrsVmOverride("drsVmOverride", StorageDrsVmOverrideArgs.builder()
                .datastoreClusterId(datastoreCluster.applyValue(getDatastoreClusterResult -> getDatastoreClusterResult.id()))
                .virtualMachineId(vm.id())
                .sdrsEnabled(false)
                .build());
    
        }
    }
    
    resources:
      vm:
        type: vsphere:VirtualMachine
        properties:
          name: test
          resourcePoolId: ${pool.id}
          datastoreId: ${memberDatastore.id}
          numCpus: 2
          memory: 1024
          guestId: otherLinux64Guest
          networkInterfaces:
            - networkId: ${network.id}
          disks:
            - label: disk0
              size: 20
      drsVmOverride:
        type: vsphere:StorageDrsVmOverride
        name: drs_vm_override
        properties:
          datastoreClusterId: ${datastoreCluster.id}
          virtualMachineId: ${vm.id}
          sdrsEnabled: false
    variables:
      datacenter:
        fn::invoke:
          Function: vsphere:getDatacenter
          Arguments:
            name: dc-01
      datastoreCluster:
        fn::invoke:
          Function: vsphere:getDatastoreCluster
          Arguments:
            name: datastore-cluster1
            datacenterId: ${datacenter.id}
      memberDatastore:
        fn::invoke:
          Function: vsphere:getDatastore
          Arguments:
            name: datastore-cluster1-member1
            datacenterId: ${datacenter.id}
      pool:
        fn::invoke:
          Function: vsphere:getResourcePool
          Arguments:
            name: cluster1/Resources
            datacenterId: ${datacenter.id}
      network:
        fn::invoke:
          Function: vsphere:getNetwork
          Arguments:
            name: public
            datacenterId: ${datacenter.id}
    

    Create StorageDrsVmOverride Resource

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

    Constructor syntax

    new StorageDrsVmOverride(name: string, args: StorageDrsVmOverrideArgs, opts?: CustomResourceOptions);
    @overload
    def StorageDrsVmOverride(resource_name: str,
                             args: StorageDrsVmOverrideArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageDrsVmOverride(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             datastore_cluster_id: Optional[str] = None,
                             virtual_machine_id: Optional[str] = None,
                             sdrs_automation_level: Optional[str] = None,
                             sdrs_enabled: Optional[str] = None,
                             sdrs_intra_vm_affinity: Optional[str] = None)
    func NewStorageDrsVmOverride(ctx *Context, name string, args StorageDrsVmOverrideArgs, opts ...ResourceOption) (*StorageDrsVmOverride, error)
    public StorageDrsVmOverride(string name, StorageDrsVmOverrideArgs args, CustomResourceOptions? opts = null)
    public StorageDrsVmOverride(String name, StorageDrsVmOverrideArgs args)
    public StorageDrsVmOverride(String name, StorageDrsVmOverrideArgs args, CustomResourceOptions options)
    
    type: vsphere:StorageDrsVmOverride
    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 StorageDrsVmOverrideArgs
    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 StorageDrsVmOverrideArgs
    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 StorageDrsVmOverrideArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageDrsVmOverrideArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageDrsVmOverrideArgs
    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 storageDrsVmOverrideResource = new VSphere.StorageDrsVmOverride("storageDrsVmOverrideResource", new()
    {
        DatastoreClusterId = "string",
        VirtualMachineId = "string",
        SdrsAutomationLevel = "string",
        SdrsEnabled = "string",
        SdrsIntraVmAffinity = "string",
    });
    
    example, err := vsphere.NewStorageDrsVmOverride(ctx, "storageDrsVmOverrideResource", &vsphere.StorageDrsVmOverrideArgs{
    	DatastoreClusterId:  pulumi.String("string"),
    	VirtualMachineId:    pulumi.String("string"),
    	SdrsAutomationLevel: pulumi.String("string"),
    	SdrsEnabled:         pulumi.String("string"),
    	SdrsIntraVmAffinity: pulumi.String("string"),
    })
    
    var storageDrsVmOverrideResource = new StorageDrsVmOverride("storageDrsVmOverrideResource", StorageDrsVmOverrideArgs.builder()
        .datastoreClusterId("string")
        .virtualMachineId("string")
        .sdrsAutomationLevel("string")
        .sdrsEnabled("string")
        .sdrsIntraVmAffinity("string")
        .build());
    
    storage_drs_vm_override_resource = vsphere.StorageDrsVmOverride("storageDrsVmOverrideResource",
        datastore_cluster_id="string",
        virtual_machine_id="string",
        sdrs_automation_level="string",
        sdrs_enabled="string",
        sdrs_intra_vm_affinity="string")
    
    const storageDrsVmOverrideResource = new vsphere.StorageDrsVmOverride("storageDrsVmOverrideResource", {
        datastoreClusterId: "string",
        virtualMachineId: "string",
        sdrsAutomationLevel: "string",
        sdrsEnabled: "string",
        sdrsIntraVmAffinity: "string",
    });
    
    type: vsphere:StorageDrsVmOverride
    properties:
        datastoreClusterId: string
        sdrsAutomationLevel: string
        sdrsEnabled: string
        sdrsIntraVmAffinity: string
        virtualMachineId: string
    

    StorageDrsVmOverride 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 StorageDrsVmOverride resource accepts the following input properties:

    DatastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    VirtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    SdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    SdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    SdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    DatastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    VirtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    SdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    SdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    SdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    datastoreClusterId String
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    virtualMachineId String
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    sdrsAutomationLevel String
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled String
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity String
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    datastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    virtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    sdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    datastore_cluster_id str
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    virtual_machine_id str
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    sdrs_automation_level str
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrs_enabled str
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrs_intra_vm_affinity str
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    datastoreClusterId String
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    virtualMachineId String
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    sdrsAutomationLevel String
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled String
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity String
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StorageDrsVmOverride 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 StorageDrsVmOverride Resource

    Get an existing StorageDrsVmOverride 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?: StorageDrsVmOverrideState, opts?: CustomResourceOptions): StorageDrsVmOverride
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            datastore_cluster_id: Optional[str] = None,
            sdrs_automation_level: Optional[str] = None,
            sdrs_enabled: Optional[str] = None,
            sdrs_intra_vm_affinity: Optional[str] = None,
            virtual_machine_id: Optional[str] = None) -> StorageDrsVmOverride
    func GetStorageDrsVmOverride(ctx *Context, name string, id IDInput, state *StorageDrsVmOverrideState, opts ...ResourceOption) (*StorageDrsVmOverride, error)
    public static StorageDrsVmOverride Get(string name, Input<string> id, StorageDrsVmOverrideState? state, CustomResourceOptions? opts = null)
    public static StorageDrsVmOverride get(String name, Output<String> id, StorageDrsVmOverrideState 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:
    DatastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    SdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    SdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    SdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    VirtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    DatastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    SdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    SdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    SdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    VirtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    datastoreClusterId String
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    sdrsAutomationLevel String
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled String
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity String
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    virtualMachineId String
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    datastoreClusterId string
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    sdrsAutomationLevel string
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled string
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity string
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    virtualMachineId string
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    datastore_cluster_id str
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    sdrs_automation_level str
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrs_enabled str
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrs_intra_vm_affinity str
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    virtual_machine_id str
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.
    datastoreClusterId String
    The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
    sdrsAutomationLevel String
    Overrides any Storage DRS automation levels for this virtual machine. Can be one of automated or manual. When not specified, the datastore cluster's settings are used according to the specific SDRS subsystem.
    sdrsEnabled String
    Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
    sdrsIntraVmAffinity String
    Overrides the intra-VM affinity setting for this virtual machine. When true, all disks for this virtual machine will be kept on the same datastore. When false, Storage DRS may locate individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used.
    virtualMachineId String
    The UUID of the virtual machine to create the override for. Forces a new resource if changed.

    Import

    An existing override can be imported into this resource by

    supplying both the path to the datastore cluster and the path to the virtual

    machine to pulumi import. If no override exists, an error will be given.

    An example is below:

    $ pulumi import vsphere:index/storageDrsVmOverride:StorageDrsVmOverride drs_vm_override \
    

    ‘{“datastore_cluster_path”: “/dc1/datastore/ds-cluster”, \

    “virtual_machine_path”: “/dc1/vm/srv1”}’

    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.4 published on Wednesday, Oct 9, 2024 by Pulumi