vsphere.VappEntity
Explore with Pulumi AI
The vsphere.VappEntity
resource can be used to describe the behavior of an
entity (virtual machine or sub-vApp container) in a vApp container.
For more information on vSphere vApps, see this page.
Example Usage
The basic example below sets up a vApp container and a virtual machine in a compute cluster and then creates a vApp entity to change the virtual machine’s power on behavior in the vApp container.
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const config = new pulumi.Config();
const datacenter = config.get("datacenter") || "dc-01";
const cluster = config.get("cluster") || "cluster-01";
const datacenterGetDatacenter = vsphere.getDatacenter({
name: datacenter,
});
const computeCluster = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getComputeCluster({
name: cluster,
datacenterId: datacenterGetDatacenter.id,
}));
const network = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getNetwork({
name: "network1",
datacenterId: datacenterGetDatacenter.id,
}));
const datastore = datacenterGetDatacenter.then(datacenterGetDatacenter => vsphere.getDatastore({
name: "datastore1",
datacenterId: datacenterGetDatacenter.id,
}));
const vappContainer = new vsphere.VappContainer("vapp_container", {
name: "vapp-container-test",
parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.id),
});
const vm = new vsphere.VirtualMachine("vm", {
name: "virtual-machine-test",
resourcePoolId: vappContainer.id,
datastoreId: datastore.then(datastore => datastore.id),
numCpus: 2,
memory: 1024,
guestId: "ubuntu64Guest",
disks: [{
label: "disk0",
size: 1,
}],
networkInterfaces: [{
networkId: network.then(network => network.id),
}],
});
const vappEntity = new vsphere.VappEntity("vapp_entity", {
targetId: vm.moid,
containerId: vappContainer.id,
startAction: "none",
});
import pulumi
import pulumi_vsphere as vsphere
config = pulumi.Config()
datacenter = config.get("datacenter")
if datacenter is None:
datacenter = "dc-01"
cluster = config.get("cluster")
if cluster is None:
cluster = "cluster-01"
datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
compute_cluster = vsphere.get_compute_cluster(name=cluster,
datacenter_id=datacenter_get_datacenter.id)
network = vsphere.get_network(name="network1",
datacenter_id=datacenter_get_datacenter.id)
datastore = vsphere.get_datastore(name="datastore1",
datacenter_id=datacenter_get_datacenter.id)
vapp_container = vsphere.VappContainer("vapp_container",
name="vapp-container-test",
parent_resource_pool_id=compute_cluster.id)
vm = vsphere.VirtualMachine("vm",
name="virtual-machine-test",
resource_pool_id=vapp_container.id,
datastore_id=datastore.id,
num_cpus=2,
memory=1024,
guest_id="ubuntu64Guest",
disks=[{
"label": "disk0",
"size": 1,
}],
network_interfaces=[{
"network_id": network.id,
}])
vapp_entity = vsphere.VappEntity("vapp_entity",
target_id=vm.moid,
container_id=vapp_container.id,
start_action="none")
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
datacenter := "dc-01"
if param := cfg.Get("datacenter"); param != "" {
datacenter = param
}
cluster := "cluster-01"
if param := cfg.Get("cluster"); param != "" {
cluster = param
}
datacenterGetDatacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
Name: pulumi.StringRef(datacenter),
}, nil)
if err != nil {
return err
}
computeCluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
Name: cluster,
DatacenterId: pulumi.StringRef(datacenterGetDatacenter.Id),
}, nil)
if err != nil {
return err
}
network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{
Name: "network1",
DatacenterId: pulumi.StringRef(datacenterGetDatacenter.Id),
}, nil)
if err != nil {
return err
}
datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{
Name: "datastore1",
DatacenterId: pulumi.StringRef(datacenterGetDatacenter.Id),
}, nil)
if err != nil {
return err
}
vappContainer, err := vsphere.NewVappContainer(ctx, "vapp_container", &vsphere.VappContainerArgs{
Name: pulumi.String("vapp-container-test"),
ParentResourcePoolId: pulumi.String(computeCluster.Id),
})
if err != nil {
return err
}
vm, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
Name: pulumi.String("virtual-machine-test"),
ResourcePoolId: vappContainer.ID(),
DatastoreId: pulumi.String(datastore.Id),
NumCpus: pulumi.Int(2),
Memory: pulumi.Int(1024),
GuestId: pulumi.String("ubuntu64Guest"),
Disks: vsphere.VirtualMachineDiskArray{
&vsphere.VirtualMachineDiskArgs{
Label: pulumi.String("disk0"),
Size: pulumi.Int(1),
},
},
NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{
&vsphere.VirtualMachineNetworkInterfaceArgs{
NetworkId: pulumi.String(network.Id),
},
},
})
if err != nil {
return err
}
_, err = vsphere.NewVappEntity(ctx, "vapp_entity", &vsphere.VappEntityArgs{
TargetId: vm.Moid,
ContainerId: vappContainer.ID(),
StartAction: pulumi.String("none"),
})
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 config = new Config();
var datacenter = config.Get("datacenter") ?? "dc-01";
var cluster = config.Get("cluster") ?? "cluster-01";
var datacenterGetDatacenter = VSphere.GetDatacenter.Invoke(new()
{
Name = datacenter,
});
var computeCluster = VSphere.GetComputeCluster.Invoke(new()
{
Name = cluster,
DatacenterId = datacenterGetDatacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var network = VSphere.GetNetwork.Invoke(new()
{
Name = "network1",
DatacenterId = datacenterGetDatacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var datastore = VSphere.GetDatastore.Invoke(new()
{
Name = "datastore1",
DatacenterId = datacenterGetDatacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var vappContainer = new VSphere.VappContainer("vapp_container", new()
{
Name = "vapp-container-test",
ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult => getComputeClusterResult.Id),
});
var vm = new VSphere.VirtualMachine("vm", new()
{
Name = "virtual-machine-test",
ResourcePoolId = vappContainer.Id,
DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id),
NumCpus = 2,
Memory = 1024,
GuestId = "ubuntu64Guest",
Disks = new[]
{
new VSphere.Inputs.VirtualMachineDiskArgs
{
Label = "disk0",
Size = 1,
},
},
NetworkInterfaces = new[]
{
new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
{
NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id),
},
},
});
var vappEntity = new VSphere.VappEntity("vapp_entity", new()
{
TargetId = vm.Moid,
ContainerId = vappContainer.Id,
StartAction = "none",
});
});
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.GetComputeClusterArgs;
import com.pulumi.vsphere.inputs.GetNetworkArgs;
import com.pulumi.vsphere.inputs.GetDatastoreArgs;
import com.pulumi.vsphere.VappContainer;
import com.pulumi.vsphere.VappContainerArgs;
import com.pulumi.vsphere.VirtualMachine;
import com.pulumi.vsphere.VirtualMachineArgs;
import com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;
import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;
import com.pulumi.vsphere.VappEntity;
import com.pulumi.vsphere.VappEntityArgs;
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 config = ctx.config();
final var datacenter = config.get("datacenter").orElse("dc-01");
final var cluster = config.get("cluster").orElse("cluster-01");
final var datacenterGetDatacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
.name(datacenter)
.build());
final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
.name(cluster)
.datacenterId(datacenterGetDatacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
.name("network1")
.datacenterId(datacenterGetDatacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
.name("datastore1")
.datacenterId(datacenterGetDatacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
var vappContainer = new VappContainer("vappContainer", VappContainerArgs.builder()
.name("vapp-container-test")
.parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -> getComputeClusterResult.id()))
.build());
var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
.name("virtual-machine-test")
.resourcePoolId(vappContainer.id())
.datastoreId(datastore.applyValue(getDatastoreResult -> getDatastoreResult.id()))
.numCpus(2)
.memory(1024)
.guestId("ubuntu64Guest")
.disks(VirtualMachineDiskArgs.builder()
.label("disk0")
.size(1)
.build())
.networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()
.networkId(network.applyValue(getNetworkResult -> getNetworkResult.id()))
.build())
.build());
var vappEntity = new VappEntity("vappEntity", VappEntityArgs.builder()
.targetId(vm.moid())
.containerId(vappContainer.id())
.startAction("none")
.build());
}
}
configuration:
datacenter:
type: string
default: dc-01
cluster:
type: string
default: cluster-01
resources:
vappContainer:
type: vsphere:VappContainer
name: vapp_container
properties:
name: vapp-container-test
parentResourcePoolId: ${computeCluster.id}
vappEntity:
type: vsphere:VappEntity
name: vapp_entity
properties:
targetId: ${vm.moid}
containerId: ${vappContainer.id}
startAction: none
vm:
type: vsphere:VirtualMachine
properties:
name: virtual-machine-test
resourcePoolId: ${vappContainer.id}
datastoreId: ${datastore.id}
numCpus: 2
memory: 1024
guestId: ubuntu64Guest
disks:
- label: disk0
size: 1
networkInterfaces:
- networkId: ${network.id}
variables:
datacenterGetDatacenter:
fn::invoke:
Function: vsphere:getDatacenter
Arguments:
name: ${datacenter}
computeCluster:
fn::invoke:
Function: vsphere:getComputeCluster
Arguments:
name: ${cluster}
datacenterId: ${datacenterGetDatacenter.id}
network:
fn::invoke:
Function: vsphere:getNetwork
Arguments:
name: network1
datacenterId: ${datacenterGetDatacenter.id}
datastore:
fn::invoke:
Function: vsphere:getDatastore
Arguments:
name: datastore1
datacenterId: ${datacenterGetDatacenter.id}
Create VappEntity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VappEntity(name: string, args: VappEntityArgs, opts?: CustomResourceOptions);
@overload
def VappEntity(resource_name: str,
args: VappEntityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VappEntity(resource_name: str,
opts: Optional[ResourceOptions] = None,
container_id: Optional[str] = None,
target_id: Optional[str] = None,
custom_attributes: Optional[Mapping[str, str]] = None,
start_action: Optional[str] = None,
start_delay: Optional[int] = None,
start_order: Optional[int] = None,
stop_action: Optional[str] = None,
stop_delay: Optional[int] = None,
tags: Optional[Sequence[str]] = None,
wait_for_guest: Optional[bool] = None)
func NewVappEntity(ctx *Context, name string, args VappEntityArgs, opts ...ResourceOption) (*VappEntity, error)
public VappEntity(string name, VappEntityArgs args, CustomResourceOptions? opts = null)
public VappEntity(String name, VappEntityArgs args)
public VappEntity(String name, VappEntityArgs args, CustomResourceOptions options)
type: vsphere:VappEntity
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 VappEntityArgs
- 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 VappEntityArgs
- 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 VappEntityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VappEntityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VappEntityArgs
- 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 vappEntityResource = new VSphere.VappEntity("vappEntityResource", new()
{
ContainerId = "string",
TargetId = "string",
CustomAttributes =
{
{ "string", "string" },
},
StartAction = "string",
StartDelay = 0,
StartOrder = 0,
StopAction = "string",
StopDelay = 0,
Tags = new[]
{
"string",
},
WaitForGuest = false,
});
example, err := vsphere.NewVappEntity(ctx, "vappEntityResource", &vsphere.VappEntityArgs{
ContainerId: pulumi.String("string"),
TargetId: pulumi.String("string"),
CustomAttributes: pulumi.StringMap{
"string": pulumi.String("string"),
},
StartAction: pulumi.String("string"),
StartDelay: pulumi.Int(0),
StartOrder: pulumi.Int(0),
StopAction: pulumi.String("string"),
StopDelay: pulumi.Int(0),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
WaitForGuest: pulumi.Bool(false),
})
var vappEntityResource = new VappEntity("vappEntityResource", VappEntityArgs.builder()
.containerId("string")
.targetId("string")
.customAttributes(Map.of("string", "string"))
.startAction("string")
.startDelay(0)
.startOrder(0)
.stopAction("string")
.stopDelay(0)
.tags("string")
.waitForGuest(false)
.build());
vapp_entity_resource = vsphere.VappEntity("vappEntityResource",
container_id="string",
target_id="string",
custom_attributes={
"string": "string",
},
start_action="string",
start_delay=0,
start_order=0,
stop_action="string",
stop_delay=0,
tags=["string"],
wait_for_guest=False)
const vappEntityResource = new vsphere.VappEntity("vappEntityResource", {
containerId: "string",
targetId: "string",
customAttributes: {
string: "string",
},
startAction: "string",
startDelay: 0,
startOrder: 0,
stopAction: "string",
stopDelay: 0,
tags: ["string"],
waitForGuest: false,
});
type: vsphere:VappEntity
properties:
containerId: string
customAttributes:
string: string
startAction: string
startDelay: 0
startOrder: 0
stopAction: string
stopDelay: 0
tags:
- string
targetId: string
waitForGuest: false
VappEntity 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 VappEntity resource accepts the following input properties:
- Container
Id string - Managed object ID of the vApp container the entity is a member of.
- Target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- Custom
Attributes Dictionary<string, string> - A list of custom attributes to set on this resource.
- Start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- Start
Delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- Start
Order int - Order to start and stop target in vApp. Default: 1
- Stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- Stop
Delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<string>
- A list of tag IDs to apply to this object.
- Wait
For boolGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- Container
Id string - Managed object ID of the vApp container the entity is a member of.
- Target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- Custom
Attributes map[string]string - A list of custom attributes to set on this resource.
- Start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- Start
Delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- Start
Order int - Order to start and stop target in vApp. Default: 1
- Stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- Stop
Delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- []string
- A list of tag IDs to apply to this object.
- Wait
For boolGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id String - Managed object ID of the vApp container the entity is a member of.
- target
Id String - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- custom
Attributes Map<String,String> - A list of custom attributes to set on this resource.
- start
Action String - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay Integer - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order Integer - Order to start and stop target in vApp. Default: 1
- stop
Action String - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay Integer - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<String>
- A list of tag IDs to apply to this object.
- wait
For BooleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id string - Managed object ID of the vApp container the entity is a member of.
- target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- custom
Attributes {[key: string]: string} - A list of custom attributes to set on this resource.
- start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay number - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order number - Order to start and stop target in vApp. Default: 1
- stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay number - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- string[]
- A list of tag IDs to apply to this object.
- wait
For booleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container_
id str - Managed object ID of the vApp container the entity is a member of.
- target_
id str - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- custom_
attributes Mapping[str, str] - A list of custom attributes to set on this resource.
- start_
action str - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start_
delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start_
order int - Order to start and stop target in vApp. Default: 1
- stop_
action str - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop_
delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- Sequence[str]
- A list of tag IDs to apply to this object.
- wait_
for_ boolguest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id String - Managed object ID of the vApp container the entity is a member of.
- target
Id String - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- custom
Attributes Map<String> - A list of custom attributes to set on this resource.
- start
Action String - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay Number - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order Number - Order to start and stop target in vApp. Default: 1
- stop
Action String - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay Number - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<String>
- A list of tag IDs to apply to this object.
- wait
For BooleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
Outputs
All input properties are implicitly available as output properties. Additionally, the VappEntity 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 VappEntity Resource
Get an existing VappEntity 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?: VappEntityState, opts?: CustomResourceOptions): VappEntity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
container_id: Optional[str] = None,
custom_attributes: Optional[Mapping[str, str]] = None,
start_action: Optional[str] = None,
start_delay: Optional[int] = None,
start_order: Optional[int] = None,
stop_action: Optional[str] = None,
stop_delay: Optional[int] = None,
tags: Optional[Sequence[str]] = None,
target_id: Optional[str] = None,
wait_for_guest: Optional[bool] = None) -> VappEntity
func GetVappEntity(ctx *Context, name string, id IDInput, state *VappEntityState, opts ...ResourceOption) (*VappEntity, error)
public static VappEntity Get(string name, Input<string> id, VappEntityState? state, CustomResourceOptions? opts = null)
public static VappEntity get(String name, Output<String> id, VappEntityState 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.
- Container
Id string - Managed object ID of the vApp container the entity is a member of.
- Custom
Attributes Dictionary<string, string> - A list of custom attributes to set on this resource.
- Start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- Start
Delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- Start
Order int - Order to start and stop target in vApp. Default: 1
- Stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- Stop
Delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<string>
- A list of tag IDs to apply to this object.
- Target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- Wait
For boolGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- Container
Id string - Managed object ID of the vApp container the entity is a member of.
- Custom
Attributes map[string]string - A list of custom attributes to set on this resource.
- Start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- Start
Delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- Start
Order int - Order to start and stop target in vApp. Default: 1
- Stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- Stop
Delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- []string
- A list of tag IDs to apply to this object.
- Target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- Wait
For boolGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id String - Managed object ID of the vApp container the entity is a member of.
- custom
Attributes Map<String,String> - A list of custom attributes to set on this resource.
- start
Action String - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay Integer - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order Integer - Order to start and stop target in vApp. Default: 1
- stop
Action String - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay Integer - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<String>
- A list of tag IDs to apply to this object.
- target
Id String - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- wait
For BooleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id string - Managed object ID of the vApp container the entity is a member of.
- custom
Attributes {[key: string]: string} - A list of custom attributes to set on this resource.
- start
Action string - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay number - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order number - Order to start and stop target in vApp. Default: 1
- stop
Action string - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay number - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- string[]
- A list of tag IDs to apply to this object.
- target
Id string - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- wait
For booleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container_
id str - Managed object ID of the vApp container the entity is a member of.
- custom_
attributes Mapping[str, str] - A list of custom attributes to set on this resource.
- start_
action str - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start_
delay int - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start_
order int - Order to start and stop target in vApp. Default: 1
- stop_
action str - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop_
delay int - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- Sequence[str]
- A list of tag IDs to apply to this object.
- target_
id str - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- wait_
for_ boolguest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
- container
Id String - Managed object ID of the vApp container the entity is a member of.
- custom
Attributes Map<String> - A list of custom attributes to set on this resource.
- start
Action String - How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
- start
Delay Number - Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
- start
Order Number - Order to start and stop target in vApp. Default: 1
- stop
Action String - Defines the stop action for the entity. Can be set to none, powerOff, guestShutdown, or suspend. If set to none, then the entity does not participate in auto-stop. Default: powerOff
- stop
Delay Number - Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
- List<String>
- A list of tag IDs to apply to this object.
- target
Id String - Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
- wait
For BooleanGuest - Determines if the VM should be marked as being
started when VMware Tools are ready instead of waiting for
start_delay
. This property has no effect for vApps. Default: false
Import
An existing vApp entity can be imported into this resource via
the ID of the vApp Entity.
$ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
The above would import the vApp entity that governs the behavior of the virtual
machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
container with the [managed object ID][docs-about-morefs] res-456.
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.