vsphere.DrsVmOverride
Explore with Pulumi AI
The vsphere.DrsVmOverride
resource can be used to add a DRS override to a
cluster for a specific virtual machine. With this resource, one can enable or
disable DRS and control the automation level for a single virtual machine
without affecting the rest of the cluster.
For more information on vSphere clusters and DRS, see this page.
NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Example Usage
The example below creates a virtual machine in a cluster using the
vsphere.VirtualMachine
resource, creating the
virtual machine in the cluster looked up by the
vsphere.ComputeCluster
data source, but also
pinning the VM to a host defined by the
vsphere.Host
data source, which is assumed to
be a host within the cluster. To ensure that the VM stays on this host and does
not need to be migrated back at any point in time, an override is entered using
the vsphere.DrsVmOverride
resource that disables DRS for this virtual
machine, ensuring that it does not move.
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 host = datacenter.then(datacenter => vsphere.getHost({
name: "esxi-01.example.com",
datacenterId: datacenter.id,
}));
const network = datacenter.then(datacenter => vsphere.getNetwork({
name: "network1",
datacenterId: datacenter.id,
}));
const vm = new vsphere.VirtualMachine("vm", {
name: "test",
resourcePoolId: cluster.then(cluster => cluster.resourcePoolId),
hostSystemId: host.then(host => host.id),
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 drsVmOverride = new vsphere.DrsVmOverride("drs_vm_override", {
computeClusterId: cluster.then(cluster => cluster.id),
virtualMachineId: vm.id,
drsEnabled: false,
});
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)
host = vsphere.get_host(name="esxi-01.example.com",
datacenter_id=datacenter.id)
network = vsphere.get_network(name="network1",
datacenter_id=datacenter.id)
vm = vsphere.VirtualMachine("vm",
name="test",
resource_pool_id=cluster.resource_pool_id,
host_system_id=host.id,
datastore_id=datastore.id,
num_cpus=2,
memory=2048,
guest_id="otherLinux64Guest",
network_interfaces=[{
"network_id": network.id,
}],
disks=[{
"label": "disk0",
"size": 20,
}])
drs_vm_override = vsphere.DrsVmOverride("drs_vm_override",
compute_cluster_id=cluster.id,
virtual_machine_id=vm.id,
drs_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
}
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
}
host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
Name: pulumi.StringRef("esxi-01.example.com"),
DatacenterId: 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
}
vm, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
Name: pulumi.String("test"),
ResourcePoolId: pulumi.String(cluster.ResourcePoolId),
HostSystemId: pulumi.String(host.Id),
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
}
_, err = vsphere.NewDrsVmOverride(ctx, "drs_vm_override", &vsphere.DrsVmOverrideArgs{
ComputeClusterId: pulumi.String(cluster.Id),
VirtualMachineId: vm.ID(),
DrsEnabled: pulumi.Bool(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 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 host = VSphere.GetHost.Invoke(new()
{
Name = "esxi-01.example.com",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var network = VSphere.GetNetwork.Invoke(new()
{
Name = "network1",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var vm = new VSphere.VirtualMachine("vm", new()
{
Name = "test",
ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
HostSystemId = host.Apply(getHostResult => getHostResult.Id),
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 drsVmOverride = new VSphere.DrsVmOverride("drs_vm_override", new()
{
ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id),
VirtualMachineId = vm.Id,
DrsEnabled = 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.GetDatastoreArgs;
import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
import com.pulumi.vsphere.inputs.GetHostArgs;
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.DrsVmOverride;
import com.pulumi.vsphere.DrsVmOverrideArgs;
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 host = VsphereFunctions.getHost(GetHostArgs.builder()
.name("esxi-01.example.com")
.datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
.name("network1")
.datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
.name("test")
.resourcePoolId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.resourcePoolId()))
.hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
.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 drsVmOverride = new DrsVmOverride("drsVmOverride", DrsVmOverrideArgs.builder()
.computeClusterId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.id()))
.virtualMachineId(vm.id())
.drsEnabled(false)
.build());
}
}
resources:
vm:
type: vsphere:VirtualMachine
properties:
name: test
resourcePoolId: ${cluster.resourcePoolId}
hostSystemId: ${host.id}
datastoreId: ${datastore.id}
numCpus: 2
memory: 2048
guestId: otherLinux64Guest
networkInterfaces:
- networkId: ${network.id}
disks:
- label: disk0
size: 20
drsVmOverride:
type: vsphere:DrsVmOverride
name: drs_vm_override
properties:
computeClusterId: ${cluster.id}
virtualMachineId: ${vm.id}
drsEnabled: false
variables:
datacenter:
fn::invoke:
function: vsphere:getDatacenter
arguments:
name: dc-01
datastore:
fn::invoke:
function: vsphere:getDatastore
arguments:
name: datastore1
datacenterId: ${datacenter.id}
cluster:
fn::invoke:
function: vsphere:getComputeCluster
arguments:
name: cluster-01
datacenterId: ${datacenter.id}
host:
fn::invoke:
function: vsphere:getHost
arguments:
name: esxi-01.example.com
datacenterId: ${datacenter.id}
network:
fn::invoke:
function: vsphere:getNetwork
arguments:
name: network1
datacenterId: ${datacenter.id}
Create DrsVmOverride Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DrsVmOverride(name: string, args: DrsVmOverrideArgs, opts?: CustomResourceOptions);
@overload
def DrsVmOverride(resource_name: str,
args: DrsVmOverrideArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DrsVmOverride(resource_name: str,
opts: Optional[ResourceOptions] = None,
compute_cluster_id: Optional[str] = None,
virtual_machine_id: Optional[str] = None,
drs_automation_level: Optional[str] = None,
drs_enabled: Optional[bool] = None)
func NewDrsVmOverride(ctx *Context, name string, args DrsVmOverrideArgs, opts ...ResourceOption) (*DrsVmOverride, error)
public DrsVmOverride(string name, DrsVmOverrideArgs args, CustomResourceOptions? opts = null)
public DrsVmOverride(String name, DrsVmOverrideArgs args)
public DrsVmOverride(String name, DrsVmOverrideArgs args, CustomResourceOptions options)
type: vsphere:DrsVmOverride
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 DrsVmOverrideArgs
- 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 DrsVmOverrideArgs
- 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 DrsVmOverrideArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DrsVmOverrideArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DrsVmOverrideArgs
- 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 drsVmOverrideResource = new VSphere.DrsVmOverride("drsVmOverrideResource", new()
{
ComputeClusterId = "string",
VirtualMachineId = "string",
DrsAutomationLevel = "string",
DrsEnabled = false,
});
example, err := vsphere.NewDrsVmOverride(ctx, "drsVmOverrideResource", &vsphere.DrsVmOverrideArgs{
ComputeClusterId: pulumi.String("string"),
VirtualMachineId: pulumi.String("string"),
DrsAutomationLevel: pulumi.String("string"),
DrsEnabled: pulumi.Bool(false),
})
var drsVmOverrideResource = new DrsVmOverride("drsVmOverrideResource", DrsVmOverrideArgs.builder()
.computeClusterId("string")
.virtualMachineId("string")
.drsAutomationLevel("string")
.drsEnabled(false)
.build());
drs_vm_override_resource = vsphere.DrsVmOverride("drsVmOverrideResource",
compute_cluster_id="string",
virtual_machine_id="string",
drs_automation_level="string",
drs_enabled=False)
const drsVmOverrideResource = new vsphere.DrsVmOverride("drsVmOverrideResource", {
computeClusterId: "string",
virtualMachineId: "string",
drsAutomationLevel: "string",
drsEnabled: false,
});
type: vsphere:DrsVmOverride
properties:
computeClusterId: string
drsAutomationLevel: string
drsEnabled: false
virtualMachineId: string
DrsVmOverride Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DrsVmOverride resource accepts the following input properties:
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- Virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- Drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- Drs
Enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- Virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- Drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- Drs
Enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- virtual
Machine StringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- drs
Automation StringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled Boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
- compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
- compute_
cluster_ strid - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- virtual_
machine_ strid - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- drs_
automation_ strlevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs_
enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- virtual
Machine StringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- drs
Automation StringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled Boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
.
Outputs
All input properties are implicitly available as output properties. Additionally, the DrsVmOverride 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 DrsVmOverride Resource
Get an existing DrsVmOverride 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?: DrsVmOverrideState, opts?: CustomResourceOptions): DrsVmOverride
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compute_cluster_id: Optional[str] = None,
drs_automation_level: Optional[str] = None,
drs_enabled: Optional[bool] = None,
virtual_machine_id: Optional[str] = None) -> DrsVmOverride
func GetDrsVmOverride(ctx *Context, name string, id IDInput, state *DrsVmOverrideState, opts ...ResourceOption) (*DrsVmOverride, error)
public static DrsVmOverride Get(string name, Input<string> id, DrsVmOverrideState? state, CustomResourceOptions? opts = null)
public static DrsVmOverride get(String name, Output<String> id, DrsVmOverrideState state, CustomResourceOptions options)
resources: _: type: vsphere:DrsVmOverride get: id: ${id}
- 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.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- Drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- Drs
Enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - Virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- Drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- Drs
Enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - Virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- drs
Automation StringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled Boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - virtual
Machine StringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- compute
Cluster stringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- drs
Automation stringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - virtual
Machine stringId - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- compute_
cluster_ strid - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- drs_
automation_ strlevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs_
enabled bool - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - virtual_
machine_ strid - The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
- drs
Automation StringLevel Overrides the automation level for this virtual machine in the cluster. Can be one of
manual
,partiallyAutomated
, orfullyAutomated
. Default:manual
.NOTE: Using this resource always implies an override, even if one of
drs_enabled
ordrs_automation_level
is omitted. Take note of the defaults for both options.- drs
Enabled Boolean - Overrides the default DRS setting for this virtual
machine. Can be either
true
orfalse
. Default:false
. - virtual
Machine StringId - 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 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/drsVmOverride:DrsVmOverride drs_vm_override \
‘{“compute_cluster_path”: “/dc1/host/cluster1”, \
“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.