Pulumi vSphere

class pulumi_vsphere.ComputeCluster(resource_name, opts=None, custom_attributes=None, datacenter_id=None, dpm_automation_level=None, dpm_enabled=None, dpm_threshold=None, drs_advanced_options=None, drs_automation_level=None, drs_enable_predictive_drs=None, drs_enable_vm_overrides=None, drs_enabled=None, drs_migration_threshold=None, folder=None, force_evacuate_on_destroy=None, ha_admission_control_failover_host_system_ids=None, ha_admission_control_host_failure_tolerance=None, ha_admission_control_performance_tolerance=None, ha_admission_control_policy=None, ha_admission_control_resource_percentage_auto_compute=None, ha_admission_control_resource_percentage_cpu=None, ha_admission_control_resource_percentage_memory=None, ha_admission_control_slot_policy_explicit_cpu=None, ha_admission_control_slot_policy_explicit_memory=None, ha_admission_control_slot_policy_use_explicit_size=None, ha_advanced_options=None, ha_datastore_apd_recovery_action=None, ha_datastore_apd_response=None, ha_datastore_apd_response_delay=None, ha_datastore_pdl_response=None, ha_enabled=None, ha_heartbeat_datastore_ids=None, ha_heartbeat_datastore_policy=None, ha_host_isolation_response=None, ha_host_monitoring=None, ha_vm_component_protection=None, ha_vm_dependency_restart_condition=None, ha_vm_failure_interval=None, ha_vm_maximum_failure_window=None, ha_vm_maximum_resets=None, ha_vm_minimum_uptime=None, ha_vm_monitoring=None, ha_vm_restart_additional_delay=None, ha_vm_restart_priority=None, ha_vm_restart_timeout=None, host_cluster_exit_timeout=None, host_system_ids=None, name=None, proactive_ha_automation_level=None, proactive_ha_enabled=None, proactive_ha_moderate_remediation=None, proactive_ha_provider_ids=None, proactive_ha_severe_remediation=None, tags=None, __name__=None, __opts__=None)
A note on the naming of this resource: VMware refers to clusters of hosts in the UI and documentation as clusters, HA clusters, or DRS clusters. All of these refer to the same kind of resource (with the latter two referring to specific features of clustering). In Terraform, we use vsphere_compute_cluster to differentiate host clusters from datastore clusters, which are clusters of datastores that can be used to distribute load and ensure fault tolerance via distribution of virtual machines. Datastore clusters can also be managed through Terraform, via the ``vsphere_datastore_cluster` resource </docs/providers/vsphere/r/datastore_cluster.html>`_.

The vsphere_compute_cluster resource can be used to create and manage clusters of hosts allowing for resource control of compute resources, load balancing through DRS, and high availability through vSphere HA.

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

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

A large number of settings in the vsphere_compute_cluster resource require a specific version of vSphere to function. Rather than include warnings at every setting or section, these settings are documented below. Note that this list is for cluster-specific attributes only, and does not include the tags parameter, which requires vSphere 6.0 or higher across all resources that can be tagged.

All settings are footnoted by an asterisk (*) in their specific section in the documentation, which takes you here.

These settings require vSphere 6.0 or higher:

  • ha_datastore_apd_recovery_action
  • ha_datastore_apd_response
  • ha_datastore_apd_response_delay
  • ha_datastore_pdl_response
  • ha_vm_component_protection

These settings require vSphere 6.5 or higher:

  • drs_enable_predictive_drs
  • ha_admission_control_host_failure_tolerance (When ha_admission_control_policy is set to resourcePercentage or slotPolicy. Permitted in all versions under failoverHosts)
  • ha_admission_control_resource_percentage_auto_compute
  • ha_vm_restart_timeout
  • ha_vm_dependency_restart_condition
  • ha_vm_restart_additional_delay
  • proactive_ha_automation_level
  • proactive_ha_enabled
  • proactive_ha_moderate_remediation
  • proactive_ha_provider_ids
  • proactive_ha_severe_remediation
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • custom_attributes (pulumi.Input[dict]) – A map of custom attribute ids to attribute value strings to set for the datastore cluster. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datacenter_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the datacenter to create the cluster in. Forces a new resource if changed.
  • dpm_automation_level (pulumi.Input[str]) – The automation level for host power operations in this cluster. Can be one of manual or automated. Default: manual.
  • dpm_enabled (pulumi.Input[bool]) – Enable DPM support for DRS in this cluster. Requires drs_enabled to be true in order to be effective. Default: false.
  • dpm_threshold (pulumi.Input[int]) – A value between 1 and 5 indicating the threshold of load within the cluster that influences host power operations. This affects both power on and power off operations - a lower setting will tolerate more of a surplus/deficit than a higher setting. Default: 3.
  • drs_advanced_options (pulumi.Input[dict]) – A key/value map that specifies advanced options for DRS and DPM.
  • drs_automation_level (pulumi.Input[str]) – The default automation level for all virtual machines in this cluster. Can be one of manual, partiallyAutomated, or fullyAutomated. Default: manual.
  • drs_enable_predictive_drs (pulumi.Input[bool]) – When true, enables DRS to use data from [vRealize Operations Manager][ref-vsphere-vro] to make proactive DRS recommendations. \*
  • drs_enable_vm_overrides (pulumi.Input[bool]) – Allow individual DRS overrides to be set for virtual machines in the cluster. Default: true.
  • drs_enabled (pulumi.Input[bool]) – Enable DRS for this cluster. Default: false.
  • drs_migration_threshold (pulumi.Input[int]) – A value between 1 and 5 indicating the threshold of imbalance tolerated between hosts. A lower setting will tolerate more imbalance while a higher setting will tolerate less. Default: 3.
  • folder (pulumi.Input[str]) – The relative path to a folder to put this cluster in. This is a path relative to the datacenter you are deploying the cluster to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a cluster named terraform-compute-cluster-test in a host folder located at /dc1/host/foo/bar, with the final inventory path being /dc1/host/foo/bar/terraform-datastore-cluster-test.
  • force_evacuate_on_destroy (pulumi.Input[bool]) – When destroying the resource, setting this to true will auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out of host_system_ids (see below). This is an advanced option and should only be used for testing. Default: false.
  • ha_admission_control_failover_host_system_ids (pulumi.Input[list]) – Defines the [managed object IDs][docs-about-morefs] of hosts to use as dedicated failover hosts. These hosts are kept as available as possible - admission control will block access to the host, and DRS will ignore the host when making recommendations.
  • ha_admission_control_host_failure_tolerance (pulumi.Input[int]) – The maximum number of failed hosts that admission control tolerates when making decisions on whether to permit virtual machine operations. The maximum is one less than the number of hosts in the cluster. Default: 1. \*
  • ha_admission_control_performance_tolerance (pulumi.Input[int]) – The percentage of resource reduction that a cluster of virtual machines can tolerate in case of a failover. A value of 0 produces warnings only, whereas a value of 100 disables the setting. Default: 100 (disabled).
  • ha_admission_control_policy (pulumi.Input[str]) – The type of admission control policy to use with vSphere HA. Can be one of resourcePercentage, slotPolicy, failoverHosts, or disabled. Default: resourcePercentage.
  • ha_admission_control_resource_percentage_auto_compute (pulumi.Input[bool]) – Automatically determine available resource percentages by subtracting the average number of host resources represented by the ha_admission_control_host_failure_tolerance setting from the total amount of resources in the cluster. Disable to supply user-defined values. Default: true. \*
  • ha_admission_control_resource_percentage_cpu (pulumi.Input[int]) – Controls the user-defined percentage of CPU resources in the cluster to reserve for failover. Default: 100.
  • ha_admission_control_resource_percentage_memory (pulumi.Input[int]) – Controls the user-defined percentage of memory resources in the cluster to reserve for failover. Default: 100.
  • ha_admission_control_slot_policy_explicit_cpu (pulumi.Input[int]) – Controls the user-defined CPU slot size, in MHz. Default: 32.
  • ha_admission_control_slot_policy_explicit_memory (pulumi.Input[int]) – Controls the user-defined memory slot size, in MB. Default: 100.
  • ha_admission_control_slot_policy_use_explicit_size (pulumi.Input[bool]) – Controls whether or not you wish to supply explicit values to CPU and memory slot sizes. The default is false, which tells vSphere to gather a automatic average based on all powered-on virtual machines currently in the cluster.
  • ha_advanced_options (pulumi.Input[dict]) – A key/value map that specifies advanced options for vSphere HA.
  • ha_datastore_apd_recovery_action (pulumi.Input[str]) – Controls the action to take on virtual machines if an APD status on an affected datastore clears in the middle of an APD event. Can be one of none or reset. Default: none. \*
  • ha_datastore_apd_response (pulumi.Input[str]) – Controls the action to take on virtual machines when the cluster has detected loss to all paths to a relevant datastore. Can be one of disabled, warning, restartConservative, or restartAggressive. Default: disabled. \*
  • ha_datastore_apd_response_delay (pulumi.Input[int]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in ha_datastore_apd_response. Default: 3 minutes. \*
  • ha_datastore_pdl_response (pulumi.Input[str]) – Controls the action to take on virtual machines when the cluster has detected a permanent device loss to a relevant datastore. Can be one of disabled, warning, or restartAggressive. Default: disabled. \*
  • ha_enabled (pulumi.Input[bool]) – Enable vSphere HA for this cluster. Default: false.
  • ha_heartbeat_datastore_ids (pulumi.Input[list]) – The list of managed object IDs for preferred datastores to use for HA heartbeating. This setting is only useful when ha_heartbeat_datastore_policy is set to either userSelectedDs or allFeasibleDsWithUserPreference.
  • ha_heartbeat_datastore_policy (pulumi.Input[str]) – The selection policy for HA heartbeat datastores. Can be one of allFeasibleDs, userSelectedDs, or allFeasibleDsWithUserPreference. Default: allFeasibleDsWithUserPreference.
  • ha_host_isolation_response (pulumi.Input[str]) – The action to take on virtual machines when a host has detected that it has been isolated from the rest of the cluster. Can be one of none, powerOff, or shutdown. Default: none.
  • ha_host_monitoring (pulumi.Input[str]) – Global setting that controls whether vSphere HA remediates virtual machines on host failure. Can be one of enabled or disabled. Default: enabled.
  • ha_vm_component_protection (pulumi.Input[str]) – Controls vSphere VM component protection for virtual machines in this cluster. Can be one of enabled or disabled. Default: enabled. \*
  • ha_vm_dependency_restart_condition (pulumi.Input[str]) – The condition used to determine whether or not virtual machines in a certain restart priority class are online, allowing HA to move on to restarting virtual machines on the next priority. Can be one of none, poweredOn, guestHbStatusGreen, or appHbStatusGreen. The default is none, which means that a virtual machine is considered ready immediately after a host is found to start it on. \*
  • ha_vm_failure_interval (pulumi.Input[int]) – If a heartbeat from a virtual machine is not received within this configured interval, the virtual machine is marked as failed. The value is in seconds. Default: 30.
  • ha_vm_maximum_failure_window (pulumi.Input[int]) – The length of the reset window in which ha_vm_maximum_resets can operate. When this window expires, no more resets are attempted regardless of the setting configured in ha_vm_maximum_resets. -1 means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default: -1 (no window).
  • ha_vm_maximum_resets (pulumi.Input[int]) – The maximum number of resets that HA will perform to a virtual machine when responding to a failure event. Default: 3
  • ha_vm_minimum_uptime (pulumi.Input[int]) – The time, in seconds, that HA waits after powering on a virtual machine before monitoring for heartbeats. Default: 120 (2 minutes).
  • ha_vm_monitoring (pulumi.Input[str]) – The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of vmMonitoringDisabled, vmMonitoringOnly, or vmAndAppMonitoring. Default: vmMonitoringDisabled.
  • ha_vm_restart_additional_delay (pulumi.Input[int]) – Additional delay in seconds after ready condition is met. A VM is considered ready at this point. Default: 0 (no delay). \*
  • ha_vm_restart_priority (pulumi.Input[str]) – The default restart priority for affected virtual machines when vSphere detects a host failure. Can be one of lowest, low, medium, high, or highest. Default: medium.
  • ha_vm_restart_timeout (pulumi.Input[int]) – The maximum time, in seconds, that vSphere HA will wait for virtual machines in one priority to be ready before proceeding with the next priority. Default: 600 (10 minutes). \*
  • host_cluster_exit_timeout (pulumi.Input[int]) – The timeout for each host maintenance mode operation when removing hosts from a cluster. The value is specified in seconds. Default: 3600 (1 hour).
  • host_system_ids (pulumi.Input[list]) – The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster.
  • name (pulumi.Input[str]) – The name of the cluster.
  • proactive_ha_automation_level (pulumi.Input[str]) – Determines how the host quarantine, maintenance mode, or virtual machine migration recommendations made by proactive HA are to be handled. Can be one of Automated or Manual. Default: Manual. \*
  • proactive_ha_enabled (pulumi.Input[bool]) – Enables Proactive HA. Default: false. \*
  • proactive_ha_moderate_remediation (pulumi.Input[str]) – The configured remediation for moderately degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to MaintenanceMode when proactive_ha_severe_remediation is set to QuarantineMode. Default: QuarantineMode. \*
  • proactive_ha_provider_ids (pulumi.Input[list]) – The list of IDs for health update providers configured for this cluster. \*
  • proactive_ha_severe_remediation (pulumi.Input[str]) – The configured remediation for severely degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to QuarantineMode when proactive_ha_moderate_remediation is set to MaintenanceMode. Default: QuarantineMode. \*
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
custom_attributes = None

A map of custom attribute ids to attribute value strings to set for the datastore cluster. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datacenter_id = None

The [managed object ID][docs-about-morefs] of the datacenter to create the cluster in. Forces a new resource if changed.

dpm_automation_level = None

The automation level for host power operations in this cluster. Can be one of manual or automated. Default: manual.

dpm_enabled = None

Enable DPM support for DRS in this cluster. Requires drs_enabled to be true in order to be effective. Default: false.

dpm_threshold = None

A value between 1 and 5 indicating the threshold of load within the cluster that influences host power operations. This affects both power on and power off operations - a lower setting will tolerate more of a surplus/deficit than a higher setting. Default: 3.

drs_advanced_options = None

A key/value map that specifies advanced options for DRS and DPM.

drs_automation_level = None

The default automation level for all virtual machines in this cluster. Can be one of manual, partiallyAutomated, or fullyAutomated. Default: manual.

drs_enable_predictive_drs = None

When true, enables DRS to use data from [vRealize Operations Manager][ref-vsphere-vro] to make proactive DRS recommendations. \*

drs_enable_vm_overrides = None

Allow individual DRS overrides to be set for virtual machines in the cluster. Default: true.

drs_enabled = None

Enable DRS for this cluster. Default: false.

drs_migration_threshold = None

A value between 1 and 5 indicating the threshold of imbalance tolerated between hosts. A lower setting will tolerate more imbalance while a higher setting will tolerate less. Default: 3.

folder = None

The relative path to a folder to put this cluster in. This is a path relative to the datacenter you are deploying the cluster to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a cluster named terraform-compute-cluster-test in a host folder located at /dc1/host/foo/bar, with the final inventory path being /dc1/host/foo/bar/terraform-datastore-cluster-test.

force_evacuate_on_destroy = None

When destroying the resource, setting this to true will auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out of host_system_ids (see below). This is an advanced option and should only be used for testing. Default: false.

ha_admission_control_failover_host_system_ids = None

Defines the [managed object IDs][docs-about-morefs] of hosts to use as dedicated failover hosts. These hosts are kept as available as possible - admission control will block access to the host, and DRS will ignore the host when making recommendations.

ha_admission_control_host_failure_tolerance = None

The maximum number of failed hosts that admission control tolerates when making decisions on whether to permit virtual machine operations. The maximum is one less than the number of hosts in the cluster. Default: 1. \*

ha_admission_control_performance_tolerance = None

The percentage of resource reduction that a cluster of virtual machines can tolerate in case of a failover. A value of 0 produces warnings only, whereas a value of 100 disables the setting. Default: 100 (disabled).

ha_admission_control_policy = None

The type of admission control policy to use with vSphere HA. Can be one of resourcePercentage, slotPolicy, failoverHosts, or disabled. Default: resourcePercentage.

ha_admission_control_resource_percentage_auto_compute = None

Automatically determine available resource percentages by subtracting the average number of host resources represented by the ha_admission_control_host_failure_tolerance setting from the total amount of resources in the cluster. Disable to supply user-defined values. Default: true. \*

ha_admission_control_resource_percentage_cpu = None

Controls the user-defined percentage of CPU resources in the cluster to reserve for failover. Default: 100.

ha_admission_control_resource_percentage_memory = None

Controls the user-defined percentage of memory resources in the cluster to reserve for failover. Default: 100.

ha_admission_control_slot_policy_explicit_cpu = None

Controls the user-defined CPU slot size, in MHz. Default: 32.

ha_admission_control_slot_policy_explicit_memory = None

Controls the user-defined memory slot size, in MB. Default: 100.

ha_admission_control_slot_policy_use_explicit_size = None

Controls whether or not you wish to supply explicit values to CPU and memory slot sizes. The default is false, which tells vSphere to gather a automatic average based on all powered-on virtual machines currently in the cluster.

ha_advanced_options = None

A key/value map that specifies advanced options for vSphere HA.

ha_datastore_apd_recovery_action = None

Controls the action to take on virtual machines if an APD status on an affected datastore clears in the middle of an APD event. Can be one of none or reset. Default: none. \*

ha_datastore_apd_response = None

Controls the action to take on virtual machines when the cluster has detected loss to all paths to a relevant datastore. Can be one of disabled, warning, restartConservative, or restartAggressive. Default: disabled. \*

ha_datastore_apd_response_delay = None

Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in ha_datastore_apd_response. Default: 3 minutes. \*

ha_datastore_pdl_response = None

Controls the action to take on virtual machines when the cluster has detected a permanent device loss to a relevant datastore. Can be one of disabled, warning, or restartAggressive. Default: disabled. \*

ha_enabled = None

Enable vSphere HA for this cluster. Default: false.

ha_heartbeat_datastore_ids = None

The list of managed object IDs for preferred datastores to use for HA heartbeating. This setting is only useful when ha_heartbeat_datastore_policy is set to either userSelectedDs or allFeasibleDsWithUserPreference.

ha_heartbeat_datastore_policy = None

The selection policy for HA heartbeat datastores. Can be one of allFeasibleDs, userSelectedDs, or allFeasibleDsWithUserPreference. Default: allFeasibleDsWithUserPreference.

ha_host_isolation_response = None

The action to take on virtual machines when a host has detected that it has been isolated from the rest of the cluster. Can be one of none, powerOff, or shutdown. Default: none.

ha_host_monitoring = None

Global setting that controls whether vSphere HA remediates virtual machines on host failure. Can be one of enabled or disabled. Default: enabled.

ha_vm_component_protection = None

Controls vSphere VM component protection for virtual machines in this cluster. Can be one of enabled or disabled. Default: enabled. \*

ha_vm_dependency_restart_condition = None

The condition used to determine whether or not virtual machines in a certain restart priority class are online, allowing HA to move on to restarting virtual machines on the next priority. Can be one of none, poweredOn, guestHbStatusGreen, or appHbStatusGreen. The default is none, which means that a virtual machine is considered ready immediately after a host is found to start it on. \*

ha_vm_failure_interval = None

If a heartbeat from a virtual machine is not received within this configured interval, the virtual machine is marked as failed. The value is in seconds. Default: 30.

ha_vm_maximum_failure_window = None

The length of the reset window in which ha_vm_maximum_resets can operate. When this window expires, no more resets are attempted regardless of the setting configured in ha_vm_maximum_resets. -1 means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default: -1 (no window).

ha_vm_maximum_resets = None

The maximum number of resets that HA will perform to a virtual machine when responding to a failure event. Default: 3

ha_vm_minimum_uptime = None

The time, in seconds, that HA waits after powering on a virtual machine before monitoring for heartbeats. Default: 120 (2 minutes).

ha_vm_monitoring = None

The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of vmMonitoringDisabled, vmMonitoringOnly, or vmAndAppMonitoring. Default: vmMonitoringDisabled.

ha_vm_restart_additional_delay = None

Additional delay in seconds after ready condition is met. A VM is considered ready at this point. Default: 0 (no delay). \*

ha_vm_restart_priority = None

The default restart priority for affected virtual machines when vSphere detects a host failure. Can be one of lowest, low, medium, high, or highest. Default: medium.

ha_vm_restart_timeout = None

The maximum time, in seconds, that vSphere HA will wait for virtual machines in one priority to be ready before proceeding with the next priority. Default: 600 (10 minutes). \*

host_cluster_exit_timeout = None

The timeout for each host maintenance mode operation when removing hosts from a cluster. The value is specified in seconds. Default: 3600 (1 hour).

host_system_ids = None

The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster.

name = None

The name of the cluster.

proactive_ha_automation_level = None

Determines how the host quarantine, maintenance mode, or virtual machine migration recommendations made by proactive HA are to be handled. Can be one of Automated or Manual. Default: Manual. \*

proactive_ha_enabled = None

Enables Proactive HA. Default: false. \*

proactive_ha_moderate_remediation = None

The configured remediation for moderately degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to MaintenanceMode when proactive_ha_severe_remediation is set to QuarantineMode. Default: QuarantineMode. \*

proactive_ha_provider_ids = None

The list of IDs for health update providers configured for this cluster. \*

proactive_ha_severe_remediation = None

The configured remediation for severely degraded hosts. Can be one of MaintenanceMode or QuarantineMode. Note that this cannot be set to QuarantineMode when proactive_ha_moderate_remediation is set to MaintenanceMode. Default: QuarantineMode. \*

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterHostGroup(resource_name, opts=None, compute_cluster_id=None, host_system_ids=None, name=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_host_group resource can be used to manage groups of hosts in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

This resource mainly serves as an input to the ``vsphere_compute_cluster_vm_host_rule` </docs/providers/vsphere/r/compute_cluster_vm_host_rule.html>`_ resource - see the documentation for that resource for further details on how to use host groups.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • host_system_ids (pulumi.Input[list]) – The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster.
  • name (pulumi.Input[str]) – The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

host_system_ids = None

The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster.

name = None

The name of the host group. This must be unique in the cluster. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterVmAffinityRule(resource_name, opts=None, compute_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_vm_affinity_rule resource can be used to manage VM affinity rules in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

This rule can be used to tell a set to virtual machines to run together on a single host within a cluster. When configured, DRS will make a best effort to ensure that the virtual machines run on the same host, or prevent any operation that would keep that from happening, depending on the value of the mandatory flag.

Keep in mind that this rule can only be used to tell VMs to run together on a non-specific host - it can’t be used to pin VMs to a host. For that, see the ``vsphere_compute_cluster_vm_host_rule` </docs/providers/vsphere/r/compute_cluster_vm_host_rule.html>`_ resource.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • enabled (pulumi.Input[bool]) – Enable this rule in the cluster. Default: true.
  • mandatory (pulumi.Input[bool]) – When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.
  • name (pulumi.Input[str]) – The name of the rule. This must be unique in the cluster.
  • virtual_machine_ids (pulumi.Input[list]) – The UUIDs of the virtual machines to run on the same host together.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

enabled = None

Enable this rule in the cluster. Default: true.

mandatory = None

When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.

name = None

The name of the rule. This must be unique in the cluster.

virtual_machine_ids = None

The UUIDs of the virtual machines to run on the same host together.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterVmAntiAffinityRule(resource_name, opts=None, compute_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_vm_anti_affinity_rule resource can be used to manage VM anti-affinity rules in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

This rule can be used to tell a set to virtual machines to run on different hosts within a cluster, useful for preventing single points of failure in application cluster scenarios. When configured, DRS will make a best effort to ensure that the virtual machines run on different hosts, or prevent any operation that would keep that from happening, depending on the value of the mandatory flag.

Keep in mind that this rule can only be used to tell VMs to run separately on non-specific hosts - specific hosts cannot be specified with this rule. For that, see the ``vsphere_compute_cluster_vm_host_rule` </docs/providers/vsphere/r/compute_cluster_vm_host_rule.html>`_ resource.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • enabled (pulumi.Input[bool]) – Enable this rule in the cluster. Default: true.
  • mandatory (pulumi.Input[bool]) – When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.
  • name (pulumi.Input[str]) – The name of the rule. This must be unique in the cluster.
  • virtual_machine_ids (pulumi.Input[list]) – The UUIDs of the virtual machines to run on hosts different from each other.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

enabled = None

Enable this rule in the cluster. Default: true.

mandatory = None

When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.

name = None

The name of the rule. This must be unique in the cluster.

virtual_machine_ids = None

The UUIDs of the virtual machines to run on hosts different from each other.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterVmDependencyRule(resource_name, opts=None, compute_cluster_id=None, dependency_vm_group_name=None, enabled=None, mandatory=None, name=None, vm_group_name=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_vm_dependency_rule resource can be used to manage VM dependency rules in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

A virtual machine dependency rule applies to vSphere HA, and allows user-defined startup orders for virtual machines in the case of host failure. Virtual machines are supplied via groups, which can be managed via the ``vsphere_compute_cluster_vm_group` </docs/providers/vsphere/r/compute_cluster_vm_group.html>`_ resource.

NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • dependency_vm_group_name (pulumi.Input[str]) – The name of the VM group that this rule depends on. The VMs defined in the group specified by vm_group_name will not be started until the VMs in this group are started.
  • enabled (pulumi.Input[bool]) – Enable this rule in the cluster. Default: true.
  • mandatory (pulumi.Input[bool]) – When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.
  • name (pulumi.Input[str]) – The name of the rule. This must be unique in the cluster.
  • vm_group_name (pulumi.Input[str]) – The name of the VM group that is the subject of this rule. The VMs defined in this group will not be started until the VMs in the group specified by dependency_vm_group_name are started.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

dependency_vm_group_name = None

The name of the VM group that this rule depends on. The VMs defined in the group specified by vm_group_name will not be started until the VMs in this group are started.

enabled = None

Enable this rule in the cluster. Default: true.

mandatory = None

When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.

name = None

The name of the rule. This must be unique in the cluster.

vm_group_name = None

The name of the VM group that is the subject of this rule. The VMs defined in this group will not be started until the VMs in the group specified by dependency_vm_group_name are started.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterVmGroup(resource_name, opts=None, compute_cluster_id=None, name=None, virtual_machine_ids=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_vm_group resource can be used to manage groups of virtual machines in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

This resource mainly serves as an input to the ``vsphere_compute_cluster_vm_dependency_rule` </docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html>`_ and ``vsphere_compute_cluster_vm_host_rule` </docs/providers/vsphere/r/compute_cluster_vm_host_rule.html>`_ resources. See the individual resource documentation pages for more information.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • name (pulumi.Input[str]) – The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
  • virtual_machine_ids (pulumi.Input[list]) – The UUIDs of the virtual machines in this group.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

name = None

The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.

virtual_machine_ids = None

The UUIDs of the virtual machines in this group.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ComputeClusterVmHostRule(resource_name, opts=None, affinity_host_group_name=None, anti_affinity_host_group_name=None, compute_cluster_id=None, enabled=None, mandatory=None, name=None, vm_group_name=None, __name__=None, __opts__=None)

The vsphere_compute_cluster_vm_host_rule resource can be used to manage VM-to-host rules in a cluster, either created by the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the ``vsphere_compute_cluster` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.

This resource can create both affinity rules, where virtual machines run on specified hosts, or anti-affinity rules, where virtual machines run on hosts outside of the ones specified in the rule. Virtual machines and hosts are supplied via groups, which can be managed via the ``vsphere_compute_cluster_vm_group` </docs/providers/vsphere/r/compute_cluster_vm_group.html>`_ and ``vsphere_compute_cluster_host_group` </docs/providers/vsphere/r/compute_cluster_host_group.html>`_ resources.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • affinity_host_group_name (pulumi.Input[str]) – When this field is used, the virtual machines defined in vm_group_name will be run on the hosts defined in this host group.
  • anti_affinity_host_group_name (pulumi.Input[str]) – When this field is used, the virtual machines defined in vm_group_name will not be run on the hosts defined in this host group.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.
  • enabled (pulumi.Input[bool]) – Enable this rule in the cluster. Default: true.
  • mandatory (pulumi.Input[bool]) – When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.
  • name (pulumi.Input[str]) – The name of the rule. This must be unique in the cluster.
  • vm_group_name (pulumi.Input[str]) – The name of the virtual machine group to use with this rule.
affinity_host_group_name = None

When this field is used, the virtual machines defined in vm_group_name will be run on the hosts defined in this host group.

anti_affinity_host_group_name = None

When this field is used, the virtual machines defined in vm_group_name will not be run on the hosts defined in this host group.

compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the group in. Forces a new resource if changed.

enabled = None

Enable this rule in the cluster. Default: true.

mandatory = None

When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.

name = None

The name of the rule. This must be unique in the cluster.

vm_group_name = None

The name of the virtual machine group to use with this rule.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.CustomAttribute(resource_name, opts=None, managed_object_type=None, name=None, __name__=None, __opts__=None)

The vsphere_custom_attribute resource can be used to create and manage custom attributes, which allow users to associate user-specific meta-information with vSphere managed objects. Custom attribute values must be strings and are stored on the vCenter Server and not the managed object.

For more information about custom attributes, click here.

NOTE: Custom attributes are unsupported on direct ESXi connections and require vCenter.

The following table will help you determine what value you need to enter for the managed object type you want the attribute to apply to.

Note that if you want a attribute to apply to all objects, leave the type unspecified.

TypeValue
Folders`Folder`
Clusters`ClusterComputeResource`
Datacenters`Datacenter`
Datastores`Datastore`
Datastore Clusters`StoragePod`
DVS Portgroups`DistributedVirtualPortgroup`
Distributed vSwitches`DistributedVirtualSwitch`
`VmwareDistributedVirtualSwitch`
Hosts`HostSystem`
Content Libraries`com.vmware.content.Library`
Content Library Items`com.vmware.content.library.Item`
Networks`HostNetwork`
`Network`
`OpaqueNetwork`
Resource Pools`ResourcePool`
vApps`VirtualApp`
Virtual Machines`VirtualMachine`
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • managed_object_type (pulumi.Input[str]) – The object type that this attribute may be applied to. If not set, the custom attribute may be applied to any object type. For a full list, click here. Forces a new resource if changed.
  • name (pulumi.Input[str]) – The name of the custom attribute.
managed_object_type = None

The object type that this attribute may be applied to. If not set, the custom attribute may be applied to any object type. For a full list, click here. Forces a new resource if changed.

name = None

The name of the custom attribute.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.Datacenter(resource_name, opts=None, custom_attributes=None, folder=None, name=None, tags=None, __name__=None, __opts__=None)

Provides a VMware vSphere datacenter resource. This can be used as the primary container of inventory objects such as hosts and virtual machines.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • folder (pulumi.Input[str]) – The folder where the datacenter should be created. Forces a new resource if changed.
  • name (pulumi.Input[str]) – The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
custom_attributes = None

Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

folder = None

The folder where the datacenter should be created. Forces a new resource if changed.

moid = None

[Managed object ID][docs-about-morefs] of this datacenter.

name = None

The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DatastoreCluster(resource_name, opts=None, custom_attributes=None, datacenter_id=None, folder=None, name=None, sdrs_advanced_options=None, sdrs_automation_level=None, sdrs_default_intra_vm_affinity=None, sdrs_enabled=None, sdrs_free_space_threshold=None, sdrs_free_space_threshold_mode=None, sdrs_free_space_utilization_difference=None, sdrs_io_balance_automation_level=None, sdrs_io_latency_threshold=None, sdrs_io_load_balance_enabled=None, sdrs_io_load_imbalance_threshold=None, sdrs_io_reservable_iops_threshold=None, sdrs_io_reservable_percent_threshold=None, sdrs_io_reservable_threshold_mode=None, sdrs_load_balance_interval=None, sdrs_policy_enforcement_automation_level=None, sdrs_rule_enforcement_automation_level=None, sdrs_space_balance_automation_level=None, sdrs_space_utilization_threshold=None, sdrs_vm_evacuation_automation_level=None, tags=None, __name__=None, __opts__=None)

The vsphere_datastore_cluster resource can be used to create and manage datastore clusters. This can be used to create groups of datastores with a shared management interface, allowing for resource control and load balancing through Storage DRS.

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

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

NOTE: Storage DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • custom_attributes (pulumi.Input[dict]) – A map of custom attribute ids to attribute value strings to set for the datastore cluster. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datacenter_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the datacenter to create the datastore cluster in. Forces a new resource if changed.
  • folder (pulumi.Input[str]) – The relative path to a folder to put this datastore cluster in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore cluster named terraform-datastore-cluster-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-datastore-cluster-test.
  • name (pulumi.Input[str]) – The name of the datastore cluster.
  • sdrs_advanced_options (pulumi.Input[dict]) – A key/value map of advanced Storage DRS settings that are not exposed via Terraform or the vSphere client.
  • sdrs_automation_level (pulumi.Input[str]) – The global automation level for all virtual machines in this datastore cluster. Default: manual.
  • sdrs_default_intra_vm_affinity (pulumi.Input[bool]) – When true, all disks in a single virtual machine will be kept on the same datastore. Default: true.
  • sdrs_enabled (pulumi.Input[bool]) – Enable Storage DRS for this datastore cluster. Default: false.
  • sdrs_free_space_threshold (pulumi.Input[int]) – The free space threshold to use. When set to utilization, drs_space_utilization_threshold is used, and when set to freeSpace, drs_free_space_threshold is used. Default: utilization.

:param pulumi.Input[str] sdrs_free_space_threshold_mode :param pulumi.Input[int] sdrs_free_space_utilization_difference: The threshold, in

percent, of difference between space utilization in datastores before storage DRS makes decisions to balance the space. Default: 5 percent.
Parameters:
  • sdrs_io_balance_automation_level (pulumi.Input[str]) – Overrides the default automation settings when correcting I/O load imbalances.
  • sdrs_io_latency_threshold (pulumi.Input[int]) – The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this datastore. Default: 15 seconds.
  • sdrs_io_load_balance_enabled (pulumi.Input[bool]) – Enable I/O load balancing for this datastore cluster. Default: true.
  • sdrs_io_load_imbalance_threshold (pulumi.Input[int]) – The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. Default: 5 percent.
  • sdrs_io_reservable_iops_threshold (pulumi.Input[int]) – The threshold of reservable IOPS of all virtual machines on the datastore before storage DRS makes recommendations to move VMs off of a datastore. Note that this setting should only be set if sdrs_io_reservable_percent_threshold cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set to roughly 50-60% of the worst case peak performance of the backing LUNs.
  • sdrs_io_reservable_percent_threshold (pulumi.Input[int]) – The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when the total reservable IOPS exceeds the threshold. Default: 60 percent.
  • sdrs_io_reservable_threshold_mode (pulumi.Input[str]) – The reservable IOPS threshold setting to use, sdrs_io_reservable_percent_threshold in the event of automatic, or sdrs_io_reservable_iops_threshold in the event of manual. Default: automatic.
  • sdrs_load_balance_interval (pulumi.Input[int]) – The storage DRS poll interval, in minutes. Default: 480 minutes.
  • sdrs_policy_enforcement_automation_level (pulumi.Input[str]) – Overrides the default automation settings when correcting storage and VM policy violations.
  • sdrs_rule_enforcement_automation_level (pulumi.Input[str]) – Overrides the default automation settings when correcting affinity rule violations.
  • sdrs_space_balance_automation_level (pulumi.Input[str]) – Overrides the default automation settings when correcting disk space imbalances.

:param pulumi.Input[int] sdrs_space_utilization_threshold :param pulumi.Input[str] sdrs_vm_evacuation_automation_level: Overrides the default

automation settings when generating recommendations for datastore evacuation.
Parameters:tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
custom_attributes = None

A map of custom attribute ids to attribute value strings to set for the datastore cluster. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datacenter_id = None

The [managed object ID][docs-about-morefs] of the datacenter to create the datastore cluster in. Forces a new resource if changed.

folder = None

The relative path to a folder to put this datastore cluster in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore cluster named terraform-datastore-cluster-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-datastore-cluster-test.

name = None

The name of the datastore cluster.

sdrs_advanced_options = None

A key/value map of advanced Storage DRS settings that are not exposed via Terraform or the vSphere client.

sdrs_automation_level = None

The global automation level for all virtual machines in this datastore cluster. Default: manual.

sdrs_default_intra_vm_affinity = None

When true, all disks in a single virtual machine will be kept on the same datastore. Default: true.

sdrs_enabled = None

Enable Storage DRS for this datastore cluster. Default: false.

sdrs_free_space_threshold = None

The free space threshold to use. When set to utilization, drs_space_utilization_threshold is used, and when set to freeSpace, drs_free_space_threshold is used. Default: utilization.

sdrs_free_space_utilization_difference = None

The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to balance the space. Default: 5 percent.

sdrs_io_balance_automation_level = None

Overrides the default automation settings when correcting I/O load imbalances.

sdrs_io_latency_threshold = None

The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this datastore. Default: 15 seconds.

sdrs_io_load_balance_enabled = None

Enable I/O load balancing for this datastore cluster. Default: true.

sdrs_io_load_imbalance_threshold = None

The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. Default: 5 percent.

sdrs_io_reservable_iops_threshold = None

The threshold of reservable IOPS of all virtual machines on the datastore before storage DRS makes recommendations to move VMs off of a datastore. Note that this setting should only be set if sdrs_io_reservable_percent_threshold cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set to roughly 50-60% of the worst case peak performance of the backing LUNs.

sdrs_io_reservable_percent_threshold = None

The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when the total reservable IOPS exceeds the threshold. Default: 60 percent.

sdrs_io_reservable_threshold_mode = None

The reservable IOPS threshold setting to use, sdrs_io_reservable_percent_threshold in the event of automatic, or sdrs_io_reservable_iops_threshold in the event of manual. Default: automatic.

sdrs_load_balance_interval = None

The storage DRS poll interval, in minutes. Default: 480 minutes.

sdrs_policy_enforcement_automation_level = None

Overrides the default automation settings when correcting storage and VM policy violations.

sdrs_rule_enforcement_automation_level = None

Overrides the default automation settings when correcting affinity rule violations.

sdrs_space_balance_automation_level = None

Overrides the default automation settings when correcting disk space imbalances.

sdrs_vm_evacuation_automation_level = None

Overrides the default automation settings when generating recommendations for datastore evacuation.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DatastoreClusterVmAntiAffinityRule(resource_name, opts=None, datastore_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None, __name__=None, __opts__=None)

The vsphere_datastore_cluster_vm_anti_affinity_rule resource can be used to manage VM anti-affinity rules in a datastore cluster, either created by the ``vsphere_datastore_cluster` </docs/providers/vsphere/r/datastore_cluster.html>`_ resource or looked up by the ``vsphere_datastore_cluster` </docs/providers/vsphere/d/datastore_cluster.html>`_ data source.

This rule can be used to tell a set to virtual machines to run on different datastores within a cluster, useful for preventing single points of failure in application cluster scenarios. When configured, Storage DRS will make a best effort to ensure that the virtual machines run on different datastores, or prevent any operation that would keep that from happening, depending on the value of the mandatory flag.

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

NOTE: Storage DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • datastore_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the datastore cluster to put the group in. Forces a new resource if changed.
  • enabled (pulumi.Input[bool]) – Enable this rule in the cluster. Default: true.
  • mandatory (pulumi.Input[bool]) – When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.
  • name (pulumi.Input[str]) – The name of the rule. This must be unique in the cluster.
  • virtual_machine_ids (pulumi.Input[list]) – The UUIDs of the virtual machines to run on different datastores from each other.
datastore_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the datastore cluster to put the group in. Forces a new resource if changed.

enabled = None

Enable this rule in the cluster. Default: true.

mandatory = None

When this value is true, prevents any virtual machine operations that may violate this rule. Default: false.

name = None

The name of the rule. This must be unique in the cluster.

virtual_machine_ids = None

The UUIDs of the virtual machines to run on different datastores from each other.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DistributedPortGroup(resource_name, opts=None, active_uplinks=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, auto_expand=None, block_all_ports=None, block_override_allowed=None, check_beacon=None, custom_attributes=None, description=None, directpath_gen2_allowed=None, distributed_virtual_switch_uuid=None, egress_shaping_average_bandwidth=None, egress_shaping_burst_size=None, egress_shaping_enabled=None, egress_shaping_peak_bandwidth=None, failback=None, ingress_shaping_average_bandwidth=None, ingress_shaping_burst_size=None, ingress_shaping_enabled=None, ingress_shaping_peak_bandwidth=None, lacp_enabled=None, lacp_mode=None, live_port_moving_allowed=None, name=None, netflow_enabled=None, netflow_override_allowed=None, network_resource_pool_key=None, network_resource_pool_override_allowed=None, notify_switches=None, number_of_ports=None, port_config_reset_at_disconnect=None, port_name_format=None, port_private_secondary_vlan_id=None, security_policy_override_allowed=None, shaping_override_allowed=None, standby_uplinks=None, tags=None, teaming_policy=None, traffic_filter_override_allowed=None, tx_uplink=None, type=None, uplink_teaming_override_allowed=None, vlan_id=None, vlan_override_allowed=None, vlan_ranges=None, __name__=None, __opts__=None)

The vsphere_distributed_port_group resource can be used to manage vSphere distributed virtual port groups. These port groups are connected to distributed virtual switches, which can be managed by the ``vsphere_distributed_virtual_switch` </docs/providers/vsphere/r/distributed_virtual_switch.html>`_ resource.

Distributed port groups can be used as networks for virtual machines, allowing VMs to use the networking supplied by a distributed virtual switch (DVS), with a set of policies that apply to that individual newtork, if desired.

For an overview on vSphere networking concepts, see this page. For more information on vSphere DVS portgroups, see this page.

NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.

:param pulumi.Input[list] active_uplinks :param pulumi.Input[bool] allow_forged_transmits :param pulumi.Input[bool] allow_mac_changes :param pulumi.Input[bool] allow_promiscuous :param pulumi.Input[bool] auto_expand: Allows the port group to create additional ports

past the limit specified in number_of_ports if necessary. Default: true.

:param pulumi.Input[bool] block_all_ports :param pulumi.Input[bool] block_override_allowed: Allow the [port shutdown

policy][port-shutdown-policy] to be overridden on an individual port.

:param pulumi.Input[bool] check_beacon :param pulumi.Input[dict] custom_attributes: Map of custom attribute ids to attribute

value string to set for port group. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
Parameters:description (pulumi.Input[str]) – An optional description for the port group.

:param pulumi.Input[bool] directpath_gen2_allowed :param pulumi.Input[str] distributed_virtual_switch_uuid: The ID of the DVS to add the

port group to. Forces a new resource if changed.

:param pulumi.Input[int] egress_shaping_average_bandwidth :param pulumi.Input[int] egress_shaping_burst_size :param pulumi.Input[bool] egress_shaping_enabled :param pulumi.Input[int] egress_shaping_peak_bandwidth :param pulumi.Input[bool] failback :param pulumi.Input[int] ingress_shaping_average_bandwidth :param pulumi.Input[int] ingress_shaping_burst_size :param pulumi.Input[bool] ingress_shaping_enabled :param pulumi.Input[int] ingress_shaping_peak_bandwidth :param pulumi.Input[bool] lacp_enabled :param pulumi.Input[str] lacp_mode :param pulumi.Input[bool] live_port_moving_allowed: Allow a port in this port group to be

moved to another port group while it is connected.
Parameters:name (pulumi.Input[str]) – The name of the port group.

:param pulumi.Input[bool] netflow_enabled :param pulumi.Input[bool] netflow_override_allowed: Allow the [Netflow

policy][netflow-policy] on this port group to be overridden on an individual port.
Parameters:
  • network_resource_pool_key (pulumi.Input[str]) – The key of a network resource pool to associate with this port group. The default is -1, which implies no association.
  • network_resource_pool_override_allowed (pulumi.Input[bool]) – Allow the network resource pool set on this port group to be overridden on an individual port.

:param pulumi.Input[bool] notify_switches :param pulumi.Input[int] number_of_ports: The number of ports available on this port

group. Cannot be decreased below the amount of used ports on the port group.
Parameters:
  • port_config_reset_at_disconnect (pulumi.Input[bool]) – Reset a port’s settings to the settings defined on this port group policy when the port disconnects.
  • port_name_format (pulumi.Input[str]) – An optional formatting policy for naming of the ports in this port group. See the portNameFormat attribute listed [here][ext-vsphere-portname-format] for details on the format syntax.

:param pulumi.Input[int] port_private_secondary_vlan_id :param pulumi.Input[bool] security_policy_override_allowed: Allow the [security policy

settings][sec-policy-settings] defined in this port group policy to be overridden on an individual port.
Parameters:shaping_override_allowed (pulumi.Input[bool]) – Allow the [traffic shaping options][traffic-shaping-settings] on this port group policy to be overridden on an individual port.

:param pulumi.Input[list] standby_uplinks :param pulumi.Input[list] tags :param pulumi.Input[str] teaming_policy :param pulumi.Input[bool] traffic_filter_override_allowed: Allow any traffic filters on

this port group to be overridden on an individual port.

:param pulumi.Input[bool] tx_uplink :param pulumi.Input[str] type: The port group type. Can be one of earlyBinding (static

binding) or ephemeral. Default: earlyBinding.
Parameters:uplink_teaming_override_allowed (pulumi.Input[bool]) – Allow the [uplink teaming options][uplink-teaming-settings] on this port group to be overridden on an individual port.

:param pulumi.Input[int] vlan_id :param pulumi.Input[bool] vlan_override_allowed: Allow the [VLAN settings][vlan-settings]

on this port group to be overridden on an individual port.

:param pulumi.Input[list] vlan_ranges

auto_expand = None

Allows the port group to create additional ports past the limit specified in number_of_ports if necessary. Default: true.

block_override_allowed = None

Allow the [port shutdown policy][port-shutdown-policy] to be overridden on an individual port.

custom_attributes = None

Map of custom attribute ids to attribute value string to set for port group. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

description = None

An optional description for the port group.

distributed_virtual_switch_uuid = None

The ID of the DVS to add the port group to. Forces a new resource if changed.

live_port_moving_allowed = None

Allow a port in this port group to be moved to another port group while it is connected.

name = None

The name of the port group.

netflow_override_allowed = None

Allow the [Netflow policy][netflow-policy] on this port group to be overridden on an individual port.

network_resource_pool_key = None

The key of a network resource pool to associate with this port group. The default is -1, which implies no association.

network_resource_pool_override_allowed = None

Allow the network resource pool set on this port group to be overridden on an individual port.

number_of_ports = None

The number of ports available on this port group. Cannot be decreased below the amount of used ports on the port group.

port_config_reset_at_disconnect = None

Reset a port’s settings to the settings defined on this port group policy when the port disconnects.

port_name_format = None

An optional formatting policy for naming of the ports in this port group. See the portNameFormat attribute listed [here][ext-vsphere-portname-format] for details on the format syntax.

security_policy_override_allowed = None

Allow the [security policy settings][sec-policy-settings] defined in this port group policy to be overridden on an individual port.

shaping_override_allowed = None

Allow the [traffic shaping options][traffic-shaping-settings] on this port group policy to be overridden on an individual port.

traffic_filter_override_allowed = None

Allow any traffic filters on this port group to be overridden on an individual port.

type = None

The port group type. Can be one of earlyBinding (static binding) or ephemeral. Default: earlyBinding.

Allow the [uplink teaming options][uplink-teaming-settings] on this port group to be overridden on an individual port.

vlan_override_allowed = None

Allow the [VLAN settings][vlan-settings] on this port group to be overridden on an individual port.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DistributedVirtualSwitch(resource_name, opts=None, active_uplinks=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, block_all_ports=None, check_beacon=None, contact_detail=None, contact_name=None, custom_attributes=None, datacenter_id=None, description=None, directpath_gen2_allowed=None, egress_shaping_average_bandwidth=None, egress_shaping_burst_size=None, egress_shaping_enabled=None, egress_shaping_peak_bandwidth=None, failback=None, faulttolerance_maximum_mbit=None, faulttolerance_reservation_mbit=None, faulttolerance_share_count=None, faulttolerance_share_level=None, folder=None, hbr_maximum_mbit=None, hbr_reservation_mbit=None, hbr_share_count=None, hbr_share_level=None, hosts=None, ingress_shaping_average_bandwidth=None, ingress_shaping_burst_size=None, ingress_shaping_enabled=None, ingress_shaping_peak_bandwidth=None, ipv4_address=None, iscsi_maximum_mbit=None, iscsi_reservation_mbit=None, iscsi_share_count=None, iscsi_share_level=None, lacp_api_version=None, lacp_enabled=None, lacp_mode=None, link_discovery_operation=None, link_discovery_protocol=None, management_maximum_mbit=None, management_reservation_mbit=None, management_share_count=None, management_share_level=None, max_mtu=None, multicast_filtering_mode=None, name=None, netflow_active_flow_timeout=None, netflow_collector_ip_address=None, netflow_collector_port=None, netflow_enabled=None, netflow_idle_flow_timeout=None, netflow_internal_flows_only=None, netflow_observation_domain_id=None, netflow_sampling_rate=None, network_resource_control_enabled=None, network_resource_control_version=None, nfs_maximum_mbit=None, nfs_reservation_mbit=None, nfs_share_count=None, nfs_share_level=None, notify_switches=None, port_private_secondary_vlan_id=None, standby_uplinks=None, tags=None, teaming_policy=None, tx_uplink=None, uplinks=None, vdp_maximum_mbit=None, vdp_reservation_mbit=None, vdp_share_count=None, vdp_share_level=None, version=None, virtualmachine_maximum_mbit=None, virtualmachine_reservation_mbit=None, virtualmachine_share_count=None, virtualmachine_share_level=None, vlan_id=None, vlan_ranges=None, vmotion_maximum_mbit=None, vmotion_reservation_mbit=None, vmotion_share_count=None, vmotion_share_level=None, vsan_maximum_mbit=None, vsan_reservation_mbit=None, vsan_share_count=None, vsan_share_level=None, __name__=None, __opts__=None)

The vsphere_distributed_virtual_switch resource can be used to manage VMware Distributed Virtual Switches.

An essential component of a distributed, scalable VMware datacenter, the vSphere Distributed Virtual Switch (DVS) provides centralized management and monitoring of the networking configuration of all the hosts that are associated with the switch. In addition to adding port groups (see the ``vsphere_distributed_port_group` </docs/providers/vsphere/r/distributed_port_group.html>`_ resource) that can be used as networks for virtual machines, a DVS can be configured to perform advanced high availability, traffic shaping, network monitoring, and more.

For an overview on vSphere networking concepts, see this page. For more information on vSphere DVS, see this page.

NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • active_uplinks (pulumi.Input[list]) – A list of active uplinks to be used in load balancing. These uplinks need to match the definitions in the uplinks DVS argument. See here for more details.
  • allow_forged_transmits (pulumi.Input[bool]) – Controls whether or not a virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
  • allow_mac_changes (pulumi.Input[bool]) – Controls whether or not the Media Access Control (MAC) address can be changed.
  • allow_promiscuous (pulumi.Input[bool]) – Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
  • block_all_ports (pulumi.Input[bool]) – Shuts down all ports in the port groups that this policy applies to, effectively blocking all network access to connected virtual devices.
  • check_beacon (pulumi.Input[bool]) – Enables beacon probing as an additional measure to detect NIC failure.
  • contact_detail (pulumi.Input[str]) – The detailed contact information for the person who is responsible for the DVS.
  • contact_name (pulumi.Input[str]) – The name of the person who is responsible for the DVS.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set for virtual switch. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datacenter_id (pulumi.Input[str]) – The ID of the datacenter where the distributed virtual switch will be created. Forces a new resource if changed.
  • description (pulumi.Input[str]) – A detailed description for the DVS.
  • directpath_gen2_allowed (pulumi.Input[bool]) – Allow VMDirectPath Gen2 for the ports for which this policy applies to.
  • egress_shaping_average_bandwidth (pulumi.Input[int]) – The average bandwidth in bits per second if egress traffic shaping is enabled on the port.
  • egress_shaping_burst_size (pulumi.Input[int]) – The maximum burst size allowed in bytes if egress traffic shaping is enabled on the port.
  • egress_shaping_enabled (pulumi.Input[bool]) – true if the traffic shaper is enabled on the port for egress traffic.
  • egress_shaping_peak_bandwidth (pulumi.Input[int]) – The peak bandwidth during bursts in bits per second if egress traffic shaping is enabled on the port.
  • failback (pulumi.Input[bool]) – If true, the teaming policy will re-activate failed uplinks higher in precedence when they come back up.

:param pulumi.Input[int] faulttolerance_maximum_mbit :param pulumi.Input[int] faulttolerance_reservation_mbit :param pulumi.Input[int] faulttolerance_share_count :param pulumi.Input[str] faulttolerance_share_level :param pulumi.Input[str] folder: The folder to create the DVS in. Forces a new resource

if changed.

:param pulumi.Input[int] hbr_maximum_mbit :param pulumi.Input[int] hbr_reservation_mbit :param pulumi.Input[int] hbr_share_count :param pulumi.Input[str] hbr_share_level :param pulumi.Input[list] hosts: Use the host block to declare a host specification. The

options are:
Parameters:
  • ingress_shaping_average_bandwidth (pulumi.Input[int]) – The average bandwidth in bits per second if ingress traffic shaping is enabled on the port.
  • ingress_shaping_burst_size (pulumi.Input[int]) – The maximum burst size allowed in bytes if ingress traffic shaping is enabled on the port.
  • ingress_shaping_enabled (pulumi.Input[bool]) – true if the traffic shaper is enabled on the port for ingress traffic.
  • ingress_shaping_peak_bandwidth (pulumi.Input[int]) – The peak bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.
  • ipv4_address (pulumi.Input[str]) – An IPv4 address to identify the switch. This is mostly useful when used with the Netflow arguments found below.

:param pulumi.Input[int] iscsi_maximum_mbit :param pulumi.Input[int] iscsi_reservation_mbit :param pulumi.Input[int] iscsi_share_count :param pulumi.Input[str] iscsi_share_level :param pulumi.Input[str] lacp_api_version: The Link Aggregation Control Protocol group

version to use with the switch. Possible values are singleLag and multipleLag.
Parameters:
  • lacp_enabled (pulumi.Input[bool]) – Enables LACP for the ports that this policy applies to.
  • lacp_mode (pulumi.Input[str]) – The LACP mode. Can be one of active or passive.
  • link_discovery_operation (pulumi.Input[str]) – Whether to advertise or listen for link discovery traffic.
  • link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are cdp and lldp.

:param pulumi.Input[int] management_maximum_mbit :param pulumi.Input[int] management_reservation_mbit :param pulumi.Input[int] management_share_count :param pulumi.Input[str] management_share_level :param pulumi.Input[int] max_mtu: The maximum transmission unit (MTU) for the virtual

switch.
Parameters:
  • multicast_filtering_mode (pulumi.Input[str]) – The multicast filtering mode to use with the switch. Can be one of legacyFiltering or snooping.
  • name (pulumi.Input[str]) – The name of the distributed virtual switch.
  • netflow_active_flow_timeout (pulumi.Input[int]) – The number of seconds after which active flows are forced to be exported to the collector. Allowed range is 60 to 3600. Default: 60.
  • netflow_collector_ip_address (pulumi.Input[str]) – IP address for the Netflow collector, using IPv4 or IPv6. IPv6 is supported in vSphere Distributed Switch Version 6.0 or later. Must be set before Netflow can be enabled.
  • netflow_collector_port (pulumi.Input[int]) – Port for the Netflow collector. This must be set before Netflow can be enabled.
  • netflow_enabled (pulumi.Input[bool]) – Enables Netflow on all ports that this policy applies to.
  • netflow_idle_flow_timeout (pulumi.Input[int]) – The number of seconds after which idle flows are forced to be exported to the collector. Allowed range is 10 to 600. Default: 15.
  • netflow_internal_flows_only (pulumi.Input[bool]) – Whether to limit analysis to traffic that has both source and destination served by the same host. Default: false.
  • netflow_observation_domain_id (pulumi.Input[int]) – The observation domain ID for the Netflow collector.
  • netflow_sampling_rate (pulumi.Input[int]) – The ratio of total number of packets to the number of packets analyzed. The default is 0, which indicates that the switch should analyze all packets. The maximum value is 1000, which indicates an analysis rate of 0.001%.
  • network_resource_control_enabled (pulumi.Input[bool]) – Set to true to enable network I/O control. Default: false.
  • network_resource_control_version (pulumi.Input[str]) – The version of network I/O control to use. Can be one of version2 or version3. Default: version2.

:param pulumi.Input[int] nfs_maximum_mbit :param pulumi.Input[int] nfs_reservation_mbit :param pulumi.Input[int] nfs_share_count :param pulumi.Input[str] nfs_share_level :param pulumi.Input[bool] notify_switches: If true, the teaming policy will notify the

broadcast network of an uplink failover, triggering cache updates.
Parameters:
  • port_private_secondary_vlan_id (pulumi.Input[int]) – Used to define a secondary VLAN ID when using private VLANs.
  • standby_uplinks (pulumi.Input[list]) – A list of standby uplinks to be used in failover. These uplinks need to match the definitions in the uplinks DVS argument. See here for more details.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
  • teaming_policy (pulumi.Input[str]) – The uplink teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
  • tx_uplink (pulumi.Input[bool]) – Forward all traffic transmitted by ports for which this policy applies to its DVS uplinks.
  • uplinks (pulumi.Input[list]) – A list of strings that uniquely identifies the names of the uplinks on the DVS across hosts. The number of items in this list controls the number of uplinks that exist on the DVS, in addition to the names. See here for an example on how to use this option.

:param pulumi.Input[int] vdp_maximum_mbit :param pulumi.Input[int] vdp_reservation_mbit :param pulumi.Input[int] vdp_share_count :param pulumi.Input[str] vdp_share_level :param pulumi.Input[str] version: - The version of the DVS to create. The default is to

create the DVS at the latest version supported by the version of vSphere being used. A DVS can be upgraded to another version, but cannot be downgraded.

:param pulumi.Input[int] virtualmachine_maximum_mbit :param pulumi.Input[int] virtualmachine_reservation_mbit :param pulumi.Input[int] virtualmachine_share_count :param pulumi.Input[str] virtualmachine_share_level :param pulumi.Input[int] vlan_id :param pulumi.Input[list] vlan_ranges: Used to denote VLAN trunking. Use the min_vlan

and max_vlan sub-arguments to define the tagged VLAN range. Multiple vlan_range definitions are allowed, but they must not overlap. Example below:

:param pulumi.Input[int] vmotion_maximum_mbit :param pulumi.Input[int] vmotion_reservation_mbit :param pulumi.Input[int] vmotion_share_count :param pulumi.Input[str] vmotion_share_level :param pulumi.Input[int] vsan_maximum_mbit :param pulumi.Input[int] vsan_reservation_mbit :param pulumi.Input[int] vsan_share_count :param pulumi.Input[str] vsan_share_level

A list of active uplinks to be used in load balancing. These uplinks need to match the definitions in the uplinks DVS argument. See here for more details.

allow_forged_transmits = None

Controls whether or not a virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.

allow_mac_changes = None

Controls whether or not the Media Access Control (MAC) address can be changed.

allow_promiscuous = None

Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.

block_all_ports = None

Shuts down all ports in the port groups that this policy applies to, effectively blocking all network access to connected virtual devices.

check_beacon = None

Enables beacon probing as an additional measure to detect NIC failure.

contact_detail = None

The detailed contact information for the person who is responsible for the DVS.

contact_name = None

The name of the person who is responsible for the DVS.

custom_attributes = None

Map of custom attribute ids to attribute value strings to set for virtual switch. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datacenter_id = None

The ID of the datacenter where the distributed virtual switch will be created. Forces a new resource if changed.

description = None

A detailed description for the DVS.

directpath_gen2_allowed = None

Allow VMDirectPath Gen2 for the ports for which this policy applies to.

egress_shaping_average_bandwidth = None

The average bandwidth in bits per second if egress traffic shaping is enabled on the port.

egress_shaping_burst_size = None

The maximum burst size allowed in bytes if egress traffic shaping is enabled on the port.

egress_shaping_enabled = None

true if the traffic shaper is enabled on the port for egress traffic.

egress_shaping_peak_bandwidth = None

The peak bandwidth during bursts in bits per second if egress traffic shaping is enabled on the port.

failback = None

If true, the teaming policy will re-activate failed uplinks higher in precedence when they come back up.

folder = None

The folder to create the DVS in. Forces a new resource if changed.

hosts = None

Use the host block to declare a host specification. The options are:

ingress_shaping_average_bandwidth = None

The average bandwidth in bits per second if ingress traffic shaping is enabled on the port.

ingress_shaping_burst_size = None

The maximum burst size allowed in bytes if ingress traffic shaping is enabled on the port.

ingress_shaping_enabled = None

true if the traffic shaper is enabled on the port for ingress traffic.

ingress_shaping_peak_bandwidth = None

The peak bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.

ipv4_address = None

An IPv4 address to identify the switch. This is mostly useful when used with the Netflow arguments found below.

lacp_api_version = None

The Link Aggregation Control Protocol group version to use with the switch. Possible values are singleLag and multipleLag.

lacp_enabled = None

Enables LACP for the ports that this policy applies to.

lacp_mode = None

The LACP mode. Can be one of active or passive.

Whether to advertise or listen for link discovery traffic.

The discovery protocol type. Valid types are cdp and lldp.

max_mtu = None

The maximum transmission unit (MTU) for the virtual switch.

multicast_filtering_mode = None

The multicast filtering mode to use with the switch. Can be one of legacyFiltering or snooping.

name = None

The name of the distributed virtual switch.

netflow_active_flow_timeout = None

The number of seconds after which active flows are forced to be exported to the collector. Allowed range is 60 to 3600. Default: 60.

netflow_collector_ip_address = None

IP address for the Netflow collector, using IPv4 or IPv6. IPv6 is supported in vSphere Distributed Switch Version 6.0 or later. Must be set before Netflow can be enabled.

netflow_collector_port = None

Port for the Netflow collector. This must be set before Netflow can be enabled.

netflow_enabled = None

Enables Netflow on all ports that this policy applies to.

netflow_idle_flow_timeout = None

The number of seconds after which idle flows are forced to be exported to the collector. Allowed range is 10 to 600. Default: 15.

netflow_internal_flows_only = None

Whether to limit analysis to traffic that has both source and destination served by the same host. Default: false.

netflow_observation_domain_id = None

The observation domain ID for the Netflow collector.

netflow_sampling_rate = None

The ratio of total number of packets to the number of packets analyzed. The default is 0, which indicates that the switch should analyze all packets. The maximum value is 1000, which indicates an analysis rate of 0.001%.

network_resource_control_enabled = None

Set to true to enable network I/O control. Default: false.

network_resource_control_version = None

The version of network I/O control to use. Can be one of version2 or version3. Default: version2.

notify_switches = None

If true, the teaming policy will notify the broadcast network of an uplink failover, triggering cache updates.

port_private_secondary_vlan_id = None

Used to define a secondary VLAN ID when using private VLANs.

A list of standby uplinks to be used in failover. These uplinks need to match the definitions in the uplinks DVS argument. See here for more details.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

teaming_policy = None

The uplink teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.

Forward all traffic transmitted by ports for which this policy applies to its DVS uplinks.

A list of strings that uniquely identifies the names of the uplinks on the DVS across hosts. The number of items in this list controls the number of uplinks that exist on the DVS, in addition to the names. See here for an example on how to use this option.

version = None
  • The version of the DVS to create. The default is to create the DVS at the latest version supported by the version of vSphere being used. A DVS can be upgraded to another version, but cannot be downgraded.
vlan_ranges = None

Used to denote VLAN trunking. Use the min_vlan and max_vlan sub-arguments to define the tagged VLAN range. Multiple vlan_range definitions are allowed, but they must not overlap. Example below:

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DpmHostOverride(resource_name, opts=None, compute_cluster_id=None, dpm_automation_level=None, dpm_enabled=None, host_system_id=None, __name__=None, __opts__=None)

The vsphere_dpm_host_override resource can be used to add a DPM override to a cluster for a particular host. This allows you to control the power management settings for individual hosts in the cluster while leaving any unspecified ones at the default power management settings.

For more information on DPM within vSphere clusters, see this page.

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

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.
  • dpm_automation_level (pulumi.Input[str]) – The automation level for host power operations on this host. Can be one of manual or automated. Default: manual.
  • dpm_enabled (pulumi.Input[bool]) – Enable DPM support for this host. Default: false.

:param pulumi.Input[str] host_system_id

compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.

dpm_automation_level = None

The automation level for host power operations on this host. Can be one of manual or automated. Default: manual.

dpm_enabled = None

Enable DPM support for this host. Default: false.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.DrsVmOverride(resource_name, opts=None, compute_cluster_id=None, drs_automation_level=None, drs_enabled=None, virtual_machine_id=None, __name__=None, __opts__=None)

The vsphere_drs_vm_override 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.

NOTE: vSphere DRS requires a vSphere Enterprise Plus license.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.
  • drs_automation_level (pulumi.Input[str]) – Overrides the automation level for this virtual machine in the cluster. Can be one of manual, partiallyAutomated, or fullyAutomated. Default: manual.
  • drs_enabled (pulumi.Input[bool]) – Overrides the default DRS setting for this virtual machine. Can be either true or false. Default: false.
  • virtual_machine_id (pulumi.Input[str]) – The UUID of the virtual machine to create the override for. Forces a new resource if changed.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.

drs_automation_level = None

Overrides the automation level for this virtual machine in the cluster. Can be one of manual, partiallyAutomated, or fullyAutomated. Default: manual.

drs_enabled = None

Overrides the default DRS setting for this virtual machine. Can be either true or false. Default: false.

virtual_machine_id = None

The UUID of the virtual machine to create the override for. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.File(resource_name, opts=None, create_directories=None, datacenter=None, datastore=None, destination_file=None, source_datacenter=None, source_datastore=None, source_file=None, __name__=None, __opts__=None)

The vsphere_file resource can be used to upload files (such as virtual disk files) from the host machine that Terraform is running on to a target datastore. The resource can also be used to copy files between datastores, or from one location to another on the same datastore.

Updates to destination parameters such as datacenter, datastore, or destination_file will move the managed file a new destination based on the values of the new settings. If any source parameter is changed, such as source_datastore, source_datacenter or source_file), the resource will be re-created. Depending on if destination parameters are being changed as well, this may result in the destination file either being overwritten or deleted at the old location.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • create_directories (pulumi.Input[bool]) – Create directories in destination_file path parameter if any missing for copy operation.
  • datacenter (pulumi.Input[str]) – The name of a datacenter in which the file will be uploaded to.
  • datastore (pulumi.Input[str]) – The name of the datastore in which to upload the file to.
  • destination_file (pulumi.Input[str]) – The path to where the file should be uploaded or copied to on vSphere.
  • source_datacenter (pulumi.Input[str]) – The name of a datacenter in which the file will be copied from. Forces a new resource if changed.
  • source_datastore (pulumi.Input[str]) – The name of the datastore in which file will be copied from. Forces a new resource if changed.
  • source_file (pulumi.Input[str]) – The path to the file being uploaded from the Terraform host to vSphere or copied within vSphere. Forces a new resource if changed.
create_directories = None

Create directories in destination_file path parameter if any missing for copy operation.

datacenter = None

The name of a datacenter in which the file will be uploaded to.

datastore = None

The name of the datastore in which to upload the file to.

destination_file = None

The path to where the file should be uploaded or copied to on vSphere.

source_datacenter = None

The name of a datacenter in which the file will be copied from. Forces a new resource if changed.

source_datastore = None

The name of the datastore in which file will be copied from. Forces a new resource if changed.

source_file = None

The path to the file being uploaded from the Terraform host to vSphere or copied within vSphere. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.Folder(resource_name, opts=None, custom_attributes=None, datacenter_id=None, path=None, tags=None, type=None, __name__=None, __opts__=None)

The vsphere_folder resource can be used to manage vSphere inventory folders. The resource supports creating folders of the 5 major types - datacenter folders, host and cluster folders, virtual machine folders, datastore folders, and network folders.

Paths are always relative to the specific type of folder you are creating. Subfolders are discovered by parsing the relative path specified in path, so foo/bar will create a folder named bar in the parent folder foo, as long as that folder exists.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set for folder. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datacenter_id (pulumi.Input[str]) – The ID of the datacenter the folder will be created in. Required for all folder types except for datacenter folders. Forces a new resource if changed.
  • path (pulumi.Input[str]) – The path of the folder to be created. This is relative to the root of the type of folder you are creating, and the supplied datacenter. For example, given a default datacenter of default-dc, a folder of type vm (denoting a virtual machine folder), and a supplied folder of terraform-test-folder, the resulting path would be /default-dc/vm/terraform-test-folder.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
  • type (pulumi.Input[str]) – The type of folder to create. Allowed options are datacenter for datacenter folders, host for host and cluster folders, vm for virtual machine folders, datastore for datastore folders, and network for network folders. Forces a new resource if changed.
custom_attributes = None

Map of custom attribute ids to attribute value strings to set for folder. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datacenter_id = None

The ID of the datacenter the folder will be created in. Required for all folder types except for datacenter folders. Forces a new resource if changed.

path = None

The path of the folder to be created. This is relative to the root of the type of folder you are creating, and the supplied datacenter. For example, given a default datacenter of default-dc, a folder of type vm (denoting a virtual machine folder), and a supplied folder of terraform-test-folder, the resulting path would be /default-dc/vm/terraform-test-folder.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

type = None

The type of folder to create. Allowed options are datacenter for datacenter folders, host for host and cluster folders, vm for virtual machine folders, datastore for datastore folders, and network for network folders. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.GetComputeClusterResult(resource_pool_id=None, id=None)

A collection of values returned by getComputeCluster.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetCustomAttributeResult(managed_object_type=None, id=None)

A collection of values returned by getCustomAttribute.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetDatacenterResult(id=None)

A collection of values returned by getDatacenter.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetDatastoreClusterResult(id=None)

A collection of values returned by getDatastoreCluster.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetDatastoreResult(id=None)

A collection of values returned by getDatastore.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetDistributedVirtualSwitchResult(uplinks=None, id=None)

A collection of values returned by getDistributedVirtualSwitch.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetHostResult(resource_pool_id=None, id=None)

A collection of values returned by getHost.

resource_pool_id = None

The [managed object ID][docs-about-morefs] of the host’s root resource pool.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetNetworkResult(type=None, id=None)

A collection of values returned by getNetwork.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetResourcePoolResult(id=None)

A collection of values returned by getResourcePool.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetTagCategoryResult(associable_types=None, cardinality=None, description=None, id=None)

A collection of values returned by getTagCategory.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetTagResult(description=None, id=None)

A collection of values returned by getTag.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetVappContainerResult(id=None)

A collection of values returned by getVappContainer.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetVirtualMachineResult(alternate_guest_name=None, disks=None, firmware=None, guest_id=None, network_interface_types=None, scsi_bus_sharing=None, scsi_type=None, id=None)

A collection of values returned by getVirtualMachine.

alternate_guest_name = None

The alternate guest name of the virtual machine when guest_id is a non-specific operating system, like otherGuest.

disks = None

Information about each of the disks on this virtual machine or template. These are sorted by bus and unit number so that they can be applied to a vsphere_virtual_machine resource in the order the resource expects while cloning. This is useful for discovering certain disk settings while performing a linked clone, as all settings that are output by this data source must be the same on the destination virtual machine as the source. Only the first number of controllers defined by scsi_controller_scan_count are scanned for disks. The sub-attributes are:

firmware = None

The firmware type for this virtual machine. Can be bios or efi.

guest_id = None

The guest ID of the virtual machine or template.

network_interface_types = None

The network interface types for each network interface found on the virtual machine, in device bus order. Will be one of e1000, e1000e, pcnet32, sriov, vmxnet2, or vmxnet3.

scsi_bus_sharing = None

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Only the first number of controllers defined by scsi_controller_scan_count are scanned.

scsi_type = None

The common type of all SCSI controllers on this virtual machine. Will be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS), pvscsi (VMware Paravirtual), buslogic (BusLogic), or mixed when there are multiple controller types. Only the first number of controllers defined by scsi_controller_scan_count are scanned.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.GetVmfsDisksResult(disks=None, id=None)

A collection of values returned by getVmfsDisks.

disks = None

A lexicographically sorted list of devices discovered by the operation, matching the supplied filter, if provided.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_vsphere.HaVmOverride(resource_name, opts=None, compute_cluster_id=None, ha_datastore_apd_recovery_action=None, ha_datastore_apd_response=None, ha_datastore_apd_response_delay=None, ha_datastore_pdl_response=None, ha_host_isolation_response=None, ha_vm_failure_interval=None, ha_vm_maximum_failure_window=None, ha_vm_maximum_resets=None, ha_vm_minimum_uptime=None, ha_vm_monitoring=None, ha_vm_monitoring_use_cluster_defaults=None, ha_vm_restart_priority=None, ha_vm_restart_timeout=None, virtual_machine_id=None, __name__=None, __opts__=None)

The vsphere_ha_vm_override resource can be used to add an override for vSphere HA settings on a cluster for a specific virtual machine. With this resource, one can control specific HA settings so that they are different than the cluster default, accommodating the needs of that specific virtual machine, while not affecting the rest of the cluster.

For more information on vSphere HA, see this page.

NOTE: This resource requires vCenter and is not available on direct ESXi connections.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • compute_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.
  • ha_datastore_apd_recovery_action (pulumi.Input[str]) – Controls the action to take on this virtual machine if an APD status on an affected datastore clears in the middle of an APD event. Can be one of useClusterDefault, none or reset. Default: useClusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]
  • ha_datastore_apd_response (pulumi.Input[str]) – Controls the action to take on this virtual machine when the cluster has detected loss to all paths to a relevant datastore. Can be one of clusterDefault, disabled, warning, restartConservative, or restartAggressive. Default: clusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]
  • ha_datastore_apd_response_delay (pulumi.Input[int]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in ha_datastore_apd_response. Use -1 to use the cluster default. Default: -1. [\*][tf-vsphere-cluster-resource-version-restrictions]
  • ha_datastore_pdl_response (pulumi.Input[str]) – Controls the action to take on this virtual machine when the cluster has detected a permanent device loss to a relevant datastore. Can be one of clusterDefault, disabled, warning, or restartAggressive. Default: clusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]
  • ha_host_isolation_response (pulumi.Input[str]) – The action to take on this virtual machine when a host has detected that it has been isolated from the rest of the cluster. Can be one of clusterIsolationResponse, none, powerOff, or shutdown. Default: clusterIsolationResponse.
  • ha_vm_failure_interval (pulumi.Input[int]) – If a heartbeat from this virtual machine is not received within this configured interval, the virtual machine is marked as failed. The value is in seconds. Default: 30.
  • ha_vm_maximum_failure_window (pulumi.Input[int]) – The length of the reset window in which ha_vm_maximum_resets can operate. When this window expires, no more resets are attempted regardless of the setting configured in ha_vm_maximum_resets. -1 means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default: -1 (no window).
  • ha_vm_maximum_resets (pulumi.Input[int]) – The maximum number of resets that HA will perform to this virtual machine when responding to a failure event. Default: 3
  • ha_vm_minimum_uptime (pulumi.Input[int]) – The time, in seconds, that HA waits after powering on this virtual machine before monitoring for heartbeats. Default: 120 (2 minutes).
  • ha_vm_monitoring (pulumi.Input[str]) – The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of vmMonitoringDisabled, vmMonitoringOnly, or vmAndAppMonitoring. Default: vmMonitoringDisabled.
  • ha_vm_monitoring_use_cluster_defaults (pulumi.Input[bool]) – Determines whether or not the cluster’s default settings or the VM override settings specified in this resource are used for virtual machine monitoring. The default is true (use cluster defaults) - set to false to have overrides take effect.
  • ha_vm_restart_priority (pulumi.Input[str]) – The restart priority for the virtual machine when vSphere detects a host failure. Can be one of clusterRestartPriority, lowest, low, medium, high, or highest. Default: clusterRestartPriority.
  • ha_vm_restart_timeout (pulumi.Input[int]) – The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use -1 to specify the cluster default. Default: -1. [\*][tf-vsphere-cluster-resource-version-restrictions]
  • virtual_machine_id (pulumi.Input[str]) – The UUID of the virtual machine to create the override for. Forces a new resource if changed.
compute_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the cluster to put the override in. Forces a new resource if changed.

ha_datastore_apd_recovery_action = None

Controls the action to take on this virtual machine if an APD status on an affected datastore clears in the middle of an APD event. Can be one of useClusterDefault, none or reset. Default: useClusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]

ha_datastore_apd_response = None

Controls the action to take on this virtual machine when the cluster has detected loss to all paths to a relevant datastore. Can be one of clusterDefault, disabled, warning, restartConservative, or restartAggressive. Default: clusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]

ha_datastore_apd_response_delay = None

Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in ha_datastore_apd_response. Use -1 to use the cluster default. Default: -1. [\*][tf-vsphere-cluster-resource-version-restrictions]

ha_datastore_pdl_response = None

Controls the action to take on this virtual machine when the cluster has detected a permanent device loss to a relevant datastore. Can be one of clusterDefault, disabled, warning, or restartAggressive. Default: clusterDefault. [\*][tf-vsphere-cluster-resource-version-restrictions]

ha_host_isolation_response = None

The action to take on this virtual machine when a host has detected that it has been isolated from the rest of the cluster. Can be one of clusterIsolationResponse, none, powerOff, or shutdown. Default: clusterIsolationResponse.

ha_vm_failure_interval = None

If a heartbeat from this virtual machine is not received within this configured interval, the virtual machine is marked as failed. The value is in seconds. Default: 30.

ha_vm_maximum_failure_window = None

The length of the reset window in which ha_vm_maximum_resets can operate. When this window expires, no more resets are attempted regardless of the setting configured in ha_vm_maximum_resets. -1 means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default: -1 (no window).

ha_vm_maximum_resets = None

The maximum number of resets that HA will perform to this virtual machine when responding to a failure event. Default: 3

ha_vm_minimum_uptime = None

The time, in seconds, that HA waits after powering on this virtual machine before monitoring for heartbeats. Default: 120 (2 minutes).

ha_vm_monitoring = None

The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of vmMonitoringDisabled, vmMonitoringOnly, or vmAndAppMonitoring. Default: vmMonitoringDisabled.

ha_vm_monitoring_use_cluster_defaults = None

Determines whether or not the cluster’s default settings or the VM override settings specified in this resource are used for virtual machine monitoring. The default is true (use cluster defaults) - set to false to have overrides take effect.

ha_vm_restart_priority = None

The restart priority for the virtual machine when vSphere detects a host failure. Can be one of clusterRestartPriority, lowest, low, medium, high, or highest. Default: clusterRestartPriority.

ha_vm_restart_timeout = None

The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use -1 to specify the cluster default. Default: -1. [\*][tf-vsphere-cluster-resource-version-restrictions]

virtual_machine_id = None

The UUID of the virtual machine to create the override for. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.HostPortGroup(resource_name, opts=None, active_nics=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, check_beacon=None, failback=None, host_system_id=None, name=None, notify_switches=None, shaping_average_bandwidth=None, shaping_burst_size=None, shaping_enabled=None, shaping_peak_bandwidth=None, standby_nics=None, teaming_policy=None, virtual_switch_name=None, vlan_id=None, __name__=None, __opts__=None)

The vsphere_host_port_group resource can be used to manage vSphere standard port groups on an ESXi host. These port groups are connected to standard virtual switches, which can be managed by the ``vsphere_host_virtual_switch` </docs/providers/vsphere/r/host_virtual_switch.html>`_ resource.

For an overview on vSphere networking concepts, see this page.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.

:param pulumi.Input[list] active_nics :param pulumi.Input[bool] allow_forged_transmits :param pulumi.Input[bool] allow_mac_changes :param pulumi.Input[bool] allow_promiscuous :param pulumi.Input[bool] check_beacon :param pulumi.Input[bool] failback :param pulumi.Input[str] host_system_id: The [managed object ID][docs-about-morefs] of

the host to set the port group up on. Forces a new resource if changed.
Parameters:name (pulumi.Input[str]) – The name of the port group. Forces a new resource if changed.

:param pulumi.Input[bool] notify_switches :param pulumi.Input[int] shaping_average_bandwidth :param pulumi.Input[int] shaping_burst_size :param pulumi.Input[bool] shaping_enabled :param pulumi.Input[int] shaping_peak_bandwidth :param pulumi.Input[list] standby_nics :param pulumi.Input[str] teaming_policy :param pulumi.Input[str] virtual_switch_name: The name of the virtual switch to bind

this port group to. Forces a new resource if changed.
Parameters:vlan_id (pulumi.Input[int]) – The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
computed_policy = None

A map with a full set of the [policy options][host-vswitch-policy-options] computed from defaults and overrides, explaining the effective policy for this port group.

host_system_id = None

The [managed object ID][docs-about-morefs] of the host to set the port group up on. Forces a new resource if changed.

key = None

The key for this port group as returned from the vSphere API.

name = None

The name of the port group. Forces a new resource if changed.

ports = None

A list of ports that currently exist and are used on this port group.

virtual_switch_name = None

The name of the virtual switch to bind this port group to. Forces a new resource if changed.

vlan_id = None

The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.HostVirtualSwitch(resource_name, opts=None, active_nics=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, beacon_interval=None, check_beacon=None, failback=None, host_system_id=None, link_discovery_operation=None, link_discovery_protocol=None, mtu=None, name=None, network_adapters=None, notify_switches=None, number_of_ports=None, shaping_average_bandwidth=None, shaping_burst_size=None, shaping_enabled=None, shaping_peak_bandwidth=None, standby_nics=None, teaming_policy=None, __name__=None, __opts__=None)

The vsphere_host_virtual_switch resource can be used to manage vSphere standard switches on an ESXi host. These switches can be used as a backing for standard port groups, which can be managed by the ``vsphere_host_port_group` </docs/providers/vsphere/r/host_port_group.html>`_ resource.

For an overview on vSphere networking concepts, see this page.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • active_nics (pulumi.Input[list]) – The list of active network adapters used for load balancing.
  • allow_forged_transmits (pulumi.Input[bool]) – Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own. Default: true.
  • allow_mac_changes (pulumi.Input[bool]) – Controls whether or not the Media Access Control (MAC) address can be changed. Default: true.
  • allow_promiscuous (pulumi.Input[bool]) – Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port. Default: false.
  • beacon_interval (pulumi.Input[int]) – The interval, in seconds, that a NIC beacon packet is sent out. This can be used with check_beacon to offer link failure capability beyond link status only. Default: 1.
  • check_beacon (pulumi.Input[bool]) – Enable beacon probing - this requires that the beacon_interval option has been set in the bridge options. If this is set to false, only link status is used to check for failed NICs. Default: false.
  • failback (pulumi.Input[bool]) – If set to true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up. Default: true.
  • host_system_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the host to set the virtual switch up on. Forces a new resource if changed.
  • link_discovery_operation (pulumi.Input[str]) – Whether to advertise or listen for link discovery traffic. Default: listen.
  • link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are cpd and lldp. Default: cdp.
  • mtu (pulumi.Input[int]) – The maximum transmission unit (MTU) for the virtual switch. Default: 1500.
  • name (pulumi.Input[str]) – The name of the virtual switch. Forces a new resource if changed.
  • network_adapters (pulumi.Input[list]) – The network interfaces to bind to the bridge.
  • notify_switches (pulumi.Input[bool]) – If set to true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates. Default: true.
  • number_of_ports (pulumi.Input[int]) – The number of ports to create with this virtual switch. Default: 128.
  • shaping_average_bandwidth (pulumi.Input[int]) – The average bandwidth in bits per second if traffic shaping is enabled. Default: 0
  • shaping_burst_size (pulumi.Input[int]) – The maximum burst size allowed in bytes if shaping is enabled. Default: 0
  • shaping_enabled (pulumi.Input[bool]) – Set to true to enable the traffic shaper for ports managed by this virtual switch. Default: false.
  • shaping_peak_bandwidth (pulumi.Input[int]) – The peak bandwidth during bursts in bits per second if traffic shaping is enabled. Default: 0
  • standby_nics (pulumi.Input[list]) – The list of standby network adapters used for failover.
  • teaming_policy (pulumi.Input[str]) – The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit. Default: loadbalance_srcid.
active_nics = None

The list of active network adapters used for load balancing.

allow_forged_transmits = None

Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own. Default: true.

allow_mac_changes = None

Controls whether or not the Media Access Control (MAC) address can be changed. Default: true.

allow_promiscuous = None

Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port. Default: false.

beacon_interval = None

The interval, in seconds, that a NIC beacon packet is sent out. This can be used with check_beacon to offer link failure capability beyond link status only. Default: 1.

check_beacon = None

Enable beacon probing - this requires that the beacon_interval option has been set in the bridge options. If this is set to false, only link status is used to check for failed NICs. Default: false.

failback = None

If set to true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up. Default: true.

host_system_id = None

The [managed object ID][docs-about-morefs] of the host to set the virtual switch up on. Forces a new resource if changed.

Whether to advertise or listen for link discovery traffic. Default: listen.

The discovery protocol type. Valid types are cpd and lldp. Default: cdp.

mtu = None

The maximum transmission unit (MTU) for the virtual switch. Default: 1500.

name = None

The name of the virtual switch. Forces a new resource if changed.

network_adapters = None

The network interfaces to bind to the bridge.

notify_switches = None

If set to true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates. Default: true.

number_of_ports = None

The number of ports to create with this virtual switch. Default: 128.

shaping_average_bandwidth = None

The average bandwidth in bits per second if traffic shaping is enabled. Default: 0

shaping_burst_size = None

The maximum burst size allowed in bytes if shaping is enabled. Default: 0

shaping_enabled = None

Set to true to enable the traffic shaper for ports managed by this virtual switch. Default: false.

shaping_peak_bandwidth = None

The peak bandwidth during bursts in bits per second if traffic shaping is enabled. Default: 0

standby_nics = None

The list of standby network adapters used for failover.

teaming_policy = None

The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit. Default: loadbalance_srcid.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.License(resource_name, opts=None, labels=None, license_key=None, __name__=None, __opts__=None)

Provides a VMware vSphere license resource. This can be used to add and remove license keys.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • labels (pulumi.Input[dict]) – A map of key/value pairs to be attached as labels (tags) to the license key.
  • license_key (pulumi.Input[str]) – The license key to add.
edition_key = None

The product edition of the license key.

labels = None

A map of key/value pairs to be attached as labels (tags) to the license key.

license_key = None

The license key to add.

name = None

The display name for the license.

total = None

Total number of units (example: CPUs) contained in the license.

used = None

The number of units (example: CPUs) assigned to this license.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.NasDatastore(resource_name, opts=None, access_mode=None, custom_attributes=None, datastore_cluster_id=None, folder=None, host_system_ids=None, name=None, remote_hosts=None, remote_path=None, security_type=None, tags=None, type=None, __name__=None, __opts__=None)

The vsphere_nas_datastore resource can be used to create and manage NAS datastores on an ESXi host or a set of hosts. The resource supports mounting NFS v3 and v4.1 shares to be used as datastores.

NOTE: Unlike ``vsphere_vmfs_datastore` </docs/providers/vsphere/r/vmfs_datastore.html>`_, a NAS datastore is only mounted on the hosts you choose to mount it on. To mount on multiple hosts, you must specify each host that you want to add in the host_system_ids argument.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • access_mode (pulumi.Input[str]) – Access mode for the mount point. Can be one of readOnly or readWrite. Note that readWrite does not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default: readWrite. Forces a new resource if changed.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set on datasource resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datastore_cluster_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of a datastore cluster to put this datastore in. Conflicts with folder.
  • folder (pulumi.Input[str]) – The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore named terraform-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-test. Conflicts with datastore_cluster_id.
  • host_system_ids (pulumi.Input[list]) – The [managed object IDs][docs-about-morefs] of the hosts to mount the datastore on.
  • name (pulumi.Input[str]) – The name of the datastore. Forces a new resource if changed.
  • remote_hosts (pulumi.Input[list]) – The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.
  • remote_path (pulumi.Input[str]) – The remote path of the mount point. Forces a new resource if changed.
  • security_type (pulumi.Input[str]) – The security type to use when using NFS v4.1. Can be one of AUTH_SYS, SEC_KRB5, or SEC_KRB5I. Forces a new resource if changed.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
  • type (pulumi.Input[str]) – The type of NAS volume. Can be one of NFS (to denote v3) or NFS41 (to denote NFS v4.1). Default: NFS. Forces a new resource if changed.
access_mode = None

Access mode for the mount point. Can be one of readOnly or readWrite. Note that readWrite does not necessarily mean that the datastore will be read-write depending on the permissions of the actual share. Default: readWrite. Forces a new resource if changed.

accessible = None

The connectivity status of the datastore. If this is false, some other computed attributes may be out of date.

capacity = None

Maximum capacity of the datastore, in megabytes.

custom_attributes = None

Map of custom attribute ids to attribute value strings to set on datasource resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datastore_cluster_id = None

The [managed object ID][docs-about-morefs] of a datastore cluster to put this datastore in. Conflicts with folder.

folder = None

The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore named terraform-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-test. Conflicts with datastore_cluster_id.

free_space = None

Available space of this datastore, in megabytes.

host_system_ids = None

The [managed object IDs][docs-about-morefs] of the hosts to mount the datastore on.

maintenance_mode = None

The current maintenance mode state of the datastore.

multiple_host_access = None

If true, more than one host in the datacenter has been configured with access to the datastore.

name = None

The name of the datastore. Forces a new resource if changed.

protocol_endpoint = None

Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.

remote_hosts = None

The hostnames or IP addresses of the remote server or servers. Only one element should be present for NFS v3 but multiple can be present for NFS v4.1. Forces a new resource if changed.

remote_path = None

The remote path of the mount point. Forces a new resource if changed.

security_type = None

The security type to use when using NFS v4.1. Can be one of AUTH_SYS, SEC_KRB5, or SEC_KRB5I. Forces a new resource if changed.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

type = None

The type of NAS volume. Can be one of NFS (to denote v3) or NFS41 (to denote NFS v4.1). Default: NFS. Forces a new resource if changed.

uncommitted_space = None

Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.

url = None

The unique locator for the datastore.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.Provider(resource_name, opts=None, allow_unverified_ssl=None, client_debug=None, client_debug_path=None, client_debug_path_run=None, password=None, persist_session=None, rest_session_path=None, user=None, vcenter_server=None, vim_session_path=None, vsphere_server=None, __name__=None, __opts__=None)

The provider type for the vsphere package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.

:param pulumi.Input[bool] allow_unverified_ssl :param pulumi.Input[bool] client_debug :param pulumi.Input[str] client_debug_path :param pulumi.Input[str] client_debug_path_run :param pulumi.Input[str] password :param pulumi.Input[bool] persist_session :param pulumi.Input[str] rest_session_path :param pulumi.Input[str] user :param pulumi.Input[str] vcenter_server :param pulumi.Input[str] vim_session_path :param pulumi.Input[str] vsphere_server

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.ResourcePool(resource_name, opts=None, cpu_expandable=None, cpu_limit=None, cpu_reservation=None, cpu_share_level=None, cpu_shares=None, custom_attributes=None, memory_expandable=None, memory_limit=None, memory_reservation=None, memory_share_level=None, memory_shares=None, name=None, parent_resource_pool_id=None, tags=None, __name__=None, __opts__=None)

The vsphere_resource_pool resource can be used to create and manage resource pools in standalone hosts or on compute clusters.

For more information on vSphere resource pools, see this page.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • cpu_expandable (pulumi.Input[bool]) – Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true
  • cpu_limit (pulumi.Input[int]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1
  • cpu_reservation (pulumi.Input[int]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default: 0
  • cpu_share_level (pulumi.Input[str]) – The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in cpu_shares will be ignored. Default: normal
  • cpu_shares (pulumi.Input[int]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom.

:param pulumi.Input[dict] custom_attributes :param pulumi.Input[bool] memory_expandable: Determines if the reservation on a resource

pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true
Parameters:
  • memory_limit (pulumi.Input[int]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1
  • memory_reservation (pulumi.Input[int]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default: 0
  • memory_share_level (pulumi.Input[str]) – The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in memory_shares will be ignored. Default: normal
  • memory_shares (pulumi.Input[int]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom.
  • name (pulumi.Input[str]) – The name of the resource pool.
  • parent_resource_pool_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the parent resource pool. This can be the root resource pool for a cluster or standalone host, or a resource pool itself. When moving a resource pool from one parent resource pool to another, both must share a common root resource pool or the move will fail.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
cpu_expandable = None

Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

cpu_limit = None

The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

cpu_reservation = None

Amount of CPU (MHz) that is guaranteed available to the resource pool. Default: 0

cpu_share_level = None

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in cpu_shares will be ignored. Default: normal

cpu_shares = None

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom.

memory_expandable = None

Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

memory_limit = None

The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

memory_reservation = None

Amount of CPU (MHz) that is guaranteed available to the resource pool. Default: 0

memory_share_level = None

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in memory_shares will be ignored. Default: normal

memory_shares = None

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom.

name = None

The name of the resource pool.

parent_resource_pool_id = None

The [managed object ID][docs-about-morefs] of the parent resource pool. This can be the root resource pool for a cluster or standalone host, or a resource pool itself. When moving a resource pool from one parent resource pool to another, both must share a common root resource pool or the move will fail.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.StorageDrsVmOverride(resource_name, opts=None, datastore_cluster_id=None, sdrs_automation_level=None, sdrs_enabled=None, sdrs_intra_vm_affinity=None, virtual_machine_id=None, __name__=None, __opts__=None)

The vsphere_storage_drs_vm_override 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.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • datastore_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the datastore cluster to put the override in. Forces a new resource if changed.
  • sdrs_automation_level (pulumi.Input[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][tf-vsphere-datastore-cluster-sdrs-levels].
  • sdrs_enabled (pulumi.Input[str]) – Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
  • sdrs_intra_vm_affinity (pulumi.Input[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 (pulumi.Input[str]) – The UUID of the virtual machine to create the override for. Forces a new resource if changed.
datastore_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the datastore cluster to put the override in. Forces a new resource if changed.

sdrs_automation_level = None

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][tf-vsphere-datastore-cluster-sdrs-levels].

sdrs_enabled = None

Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.

sdrs_intra_vm_affinity = None

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 = None

The UUID of the virtual machine to create the override for. Forces a new resource if changed.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.Tag(resource_name, opts=None, category_id=None, description=None, name=None, __name__=None, __opts__=None)

The vsphere_tag resource can be used to create and manage tags, which allow you to attach metadata to objects in the vSphere inventory to make these objects more sortable and searchable.

For more information about tags, click here.

NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • category_id (pulumi.Input[str]) – The unique identifier of the parent category in which this tag will be created. Forces a new resource if changed.
  • description (pulumi.Input[str]) – A description for the tag.
  • name (pulumi.Input[str]) – The display name of the tag. The name must be unique within its category.
category_id = None

The unique identifier of the parent category in which this tag will be created. Forces a new resource if changed.

description = None

A description for the tag.

name = None

The display name of the tag. The name must be unique within its category.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.TagCategory(resource_name, opts=None, associable_types=None, cardinality=None, description=None, name=None, __name__=None, __opts__=None)

The vsphere_tag_category resource can be used to create and manage tag categories, which determine how tags are grouped together and applied to specific objects.

For more information about tags, click here. For more information about tag categories specifically, click here.

NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • associable_types (pulumi.Input[list]) – A list object types that this category is valid to be assigned to. For a full list, click here.
  • cardinality (pulumi.Input[str]) – The number of tags that can be assigned from this category to a single object at once. Can be one of SINGLE (object can only be assigned one tag in this category), to MULTIPLE (object can be assigned multiple tags in this category). Forces a new resource if changed.
  • description (pulumi.Input[str]) – A description for the category.
  • name (pulumi.Input[str]) – The name of the category.
associable_types = None

A list object types that this category is valid to be assigned to. For a full list, click here.

cardinality = None

The number of tags that can be assigned from this category to a single object at once. Can be one of SINGLE (object can only be assigned one tag in this category), to MULTIPLE (object can be assigned multiple tags in this category). Forces a new resource if changed.

description = None

A description for the category.

name = None

The name of the category.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VappContainer(resource_name, opts=None, cpu_expandable=None, cpu_limit=None, cpu_reservation=None, cpu_share_level=None, cpu_shares=None, custom_attributes=None, memory_expandable=None, memory_limit=None, memory_reservation=None, memory_share_level=None, memory_shares=None, name=None, parent_folder_id=None, parent_resource_pool_id=None, tags=None, __name__=None, __opts__=None)

The vsphere_vapp_container resource can be used to create and manage vApps.

For more information on vSphere vApps, see this page.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • cpu_expandable (pulumi.Input[bool]) – Determines if the reservation on a vApp container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true
  • cpu_limit (pulumi.Input[int]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1
  • cpu_reservation (pulumi.Input[int]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0
  • cpu_share_level (pulumi.Input[str]) – The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in cpu_shares will be ignored. Default: normal
  • cpu_shares (pulumi.Input[int]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom.

:param pulumi.Input[dict] custom_attributes :param pulumi.Input[bool] memory_expandable: Determines if the reservation on a vApp

container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true
Parameters:
  • memory_limit (pulumi.Input[int]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1
  • memory_reservation (pulumi.Input[int]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0
  • memory_share_level (pulumi.Input[str]) – The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in memory_shares will be ignored. Default: normal
  • memory_shares (pulumi.Input[int]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom.
  • name (pulumi.Input[str]) – The name of the vApp container.
  • parent_folder_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the vApp container’s parent folder.
  • parent_resource_pool_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the parent resource pool. This can be the root resource pool for a cluster or standalone host, or a resource pool itself. When moving a vApp container from one parent resource pool to another, both must share a common root resource pool or the move will fail.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
cpu_expandable = None

Determines if the reservation on a vApp container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

cpu_limit = None

The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

cpu_reservation = None

Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0

cpu_share_level = None

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in cpu_shares will be ignored. Default: normal

cpu_shares = None

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom.

memory_expandable = None

Determines if the reservation on a vApp container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

memory_limit = None

The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

memory_reservation = None

Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0

memory_share_level = None

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in memory_shares will be ignored. Default: normal

memory_shares = None

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom.

name = None

The name of the vApp container.

parent_folder_id = None

The [managed object ID][docs-about-morefs] of the vApp container’s parent folder.

parent_resource_pool_id = None

The [managed object ID][docs-about-morefs] of the parent resource pool. This can be the root resource pool for a cluster or standalone host, or a resource pool itself. When moving a vApp container from one parent resource pool to another, both must share a common root resource pool or the move will fail.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VappEntity(resource_name, opts=None, container_id=None, custom_attributes=None, start_action=None, start_delay=None, start_order=None, stop_action=None, stop_delay=None, tags=None, target_id=None, wait_for_guest=None, __name__=None, __opts__=None)

The vsphere_vapp_entity 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.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • container_id (pulumi.Input[str]) – [Managed object ID|docs-about-morefs] of the vApp container the entity is a member of.

:param pulumi.Input[dict] custom_attributes :param pulumi.Input[str] start_action: 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
Parameters:
  • start_delay (pulumi.Input[int]) – Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
  • start_order (pulumi.Input[int]) – Order to start and stop target in vApp. Default: 1
  • stop_action (pulumi.Input[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 (pulumi.Input[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

:param pulumi.Input[list] tags :param pulumi.Input[str] target_id: [Managed object ID|docs-about-morefs] of the entity

to power on or power off. This can be a virtual machine or a vApp.
Parameters:wait_for_guest (pulumi.Input[bool]) – 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 = None

[Managed object ID|docs-about-morefs] of the vApp container the entity is a member of.

start_action = None

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 = None

Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120

start_order = None

Order to start and stop target in vApp. Default: 1

stop_action = None

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 = None

Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120

target_id = None

[Managed object ID|docs-about-morefs] of the entity to power on or power off. This can be a virtual machine or a vApp.

wait_for_guest = None

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

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VirtualDisk(resource_name, opts=None, adapter_type=None, create_directories=None, datacenter=None, datastore=None, size=None, type=None, vmdk_path=None, __name__=None, __opts__=None)

The vsphere_virtual_disk resource can be used to create virtual disks outside of any given ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource. These disks can be attached to a virtual machine by creating a disk block with the ``attach` </docs/providers/vsphere/r/virtual_machine.html#attach>`_ parameter.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • adapter_type (pulumi.Input[str]) – The adapter type for this virtual disk. Can be one of ide, lsiLogic, or busLogic. Default: lsiLogic.
  • create_directories (pulumi.Input[bool]) – Tells the resource to create any directories that are a part of the vmdk_path parameter if they are missing. Default: false.
  • datacenter (pulumi.Input[str]) – The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.
  • datastore (pulumi.Input[str]) – The name of the datastore in which to create the disk.
  • size (pulumi.Input[int]) – Size of the disk (in GB).
  • type (pulumi.Input[str]) – The type of disk to create. Can be one of eagerZeroedThick, lazy, or thin. Default: eagerZeroedThick. For information on what each kind of disk provisioning policy means, click [here][docs-vmware-vm-disk-provisioning].
  • vmdk_path (pulumi.Input[str]) – The path, including filename, of the virtual disk to be created. This needs to end in .vmdk.
adapter_type = None

The adapter type for this virtual disk. Can be one of ide, lsiLogic, or busLogic. Default: lsiLogic.

create_directories = None

Tells the resource to create any directories that are a part of the vmdk_path parameter if they are missing. Default: false.

datacenter = None

The name of the datacenter in which to create the disk. Can be omitted when when ESXi or if there is only one datacenter in your infrastructure.

datastore = None

The name of the datastore in which to create the disk.

size = None

Size of the disk (in GB).

type = None

The type of disk to create. Can be one of eagerZeroedThick, lazy, or thin. Default: eagerZeroedThick. For information on what each kind of disk provisioning policy means, click [here][docs-vmware-vm-disk-provisioning].

vmdk_path = None

The path, including filename, of the virtual disk to be created. This needs to end in .vmdk.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VirtualMachine(resource_name, opts=None, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, cdrom=None, clone=None, cpu_hot_add_enabled=None, cpu_hot_remove_enabled=None, cpu_limit=None, cpu_performance_counters_enabled=None, cpu_reservation=None, cpu_share_count=None, cpu_share_level=None, custom_attributes=None, datastore_cluster_id=None, datastore_id=None, disks=None, efi_secure_boot_enabled=None, enable_disk_uuid=None, enable_logging=None, ept_rvi_mode=None, extra_config=None, firmware=None, folder=None, force_power_off=None, guest_id=None, host_system_id=None, hv_mode=None, latency_sensitivity=None, memory=None, memory_hot_add_enabled=None, memory_limit=None, memory_reservation=None, memory_share_count=None, memory_share_level=None, migrate_wait_timeout=None, name=None, nested_hv_enabled=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, resource_pool_id=None, run_tools_scripts_after_power_on=None, run_tools_scripts_after_resume=None, run_tools_scripts_before_guest_reboot=None, run_tools_scripts_before_guest_shutdown=None, run_tools_scripts_before_guest_standby=None, scsi_bus_sharing=None, scsi_controller_count=None, scsi_type=None, shutdown_wait_timeout=None, swap_placement_policy=None, sync_time_with_host=None, tags=None, vapp=None, wait_for_guest_net_routable=None, wait_for_guest_net_timeout=None, __name__=None, __opts__=None)

The vsphere_virtual_machine resource can be used to manage the complex lifecycle of a virtual machine. It supports management of disk, network interface, and CDROM devices, creation from scratch or cloning from template, and migration through both host and storage vMotion.

For more details on working with virtual machines in vSphere, see this page.

A high degree of control and flexibility is afforded to a vSphere user when it comes to how to configure, deploy, and manage virtual machines - much more control than given in a traditional cloud provider. As such, Terraform has to make some decisions on how to manage the virtual machines it creates and manages. This section documents things you need to know about your virtual machine configuration that you should consider when setting up virtual machines, creating templates to clone from, or migrating from previous versions of this resource.

The vsphere_virtual_machine resource currently only supports standard VMDK-backed virtual disks - it does not support other special kinds of disk devices like RDM disks.

Disks are managed by an arbitrary label supplied to the label attribute of a disk block. This is separate from the automatic naming that vSphere picks for you when creating a virtual machine. Control over a virtual disk’s name is not supported unless you are attaching an external disk with the attach attribute.

Virtual disks can be SCSI disks only. The SCSI controllers managed by Terraform can vary, depending on the value supplied to scsi_controller_count. This also dictates the controllers that are checked when looking for disks during a cloning process. By default, this value is 1, meaning that you can have up to 15 disks configured on a virtual machine. These are all configured with the controller type defined by the scsi_type setting. If you are cloning from a template, devices will be added or re-configured as necessary.

When cloning from a template, you must specify disks of either the same or greater size than the disks in the source template when creating a traditional clone, or exactly the same size when cloning from snapshot (also known as a linked clone). For more details, see the section on creating a virtual machine from a template.

A maximum of 60 virtual disks can be configured when the scsi_controller_count setting is configured to its maximum of 4 controllers. See the disk options section for more details.

Terraform waits during various parts of a virtual machine deployment to ensure that it is in a correct expected state before proceeding. These happen when a VM is created, or also when it’s updated, depending on the waiter.

Two waiters of note are:

  • The customization waiter: This waiter watches events in vSphere to monitor when customization on a virtual machine completes during VM creation. Depending on your vSphere or VM configuration it may be necessary to change the timeout or turn it off. This can be controlled by the timeout setting in the customization settings block.
  • The network waiter: This waiter waits for interfaces to show up on a guest virtual machine close to the end of both VM creation and update. This waiter is necessary to ensure that correct IP information gets reported to the guest virtual machine, mainly to facilitate the availability of a valid, reachable default IP address for any provisioners. The behavior of the waiter can be controlled with the wait_for_guest_net_timeout and wait_for_guest_net_routable settings.
NOTE: This section only applies to versions of this resource available in versions v0.4.2 of this provider or earlier.

The path for migrating to the current version of this resource is very similar to the import path, with the exception that the terraform import command does not need to be run. See that section for details on what is required before you run terraform plan on a state that requires migration.

A successful migration usually only results in a configuration-only diff - that is, Terraform reconciles some configuration settings that cannot be set during the migration process with state. In this event, no reconfiguration operations are sent to the vSphere server during the next terraform apply. See the importing section for more details.

The clone block can be used to create a new virtual machine from an existing virtual machine or template. The resource supports both making a complete copy of a virtual machine, or cloning from a snapshot (otherwise known as a linked clone).

See the cloning and customization example for a usage synopsis.

NOTE: Changing any option in clone after creation forces a new resource.

NOTE: Cloning requires vCenter and is not supported on direct ESXi connections.

The options available in the clone block are:

  • template_uuid - (Required) The UUID of the source virtual machine or template.
  • linked_clone - (Optional) Clone this virtual machine from a snapshot. Templates must have a single snapshot only in order to be eligible. Default: false.
  • timeout - (Optional) The timeout, in minutes, to wait for the virtual machine clone to complete. Default: 30 minutes.
  • customize - (Optional) The customization spec for this clone. This allows the user to configure the virtual machine post-clone. For more details, see virtual machine customization.

Note that when cloning from a template, there are additional requirements in both the resource configuration and source template:

  • The virtual machine must not be powered on at the time of cloning.
  • All disks on the virtual machine must be SCSI disks.
  • You must specify at least the same number of disk devices as there are disks that exist in the template. These devices are ordered and lined up by the unit_number attribute. Additional disks can be added past this.
  • The size of a virtual disk must be at least the same size as its counterpart disk in the template.
  • When using linked_clone, the size, thin_provisioned, and eagerly_scrub settings for each disk must be an exact match to the individual disk’s counterpart in the source template.
  • The scsi_controller_count setting should be configured as necessary to cover all of the disks on the template. For best results, only configure this setting for the amount of controllers you will need to cover your disk quantity and bandwidth needs, and configure your template accordingly. For most workloads, this setting should be kept at its default of 1, and all disks in the template should reside on the single, primary controller.
  • Some operating systems (such as Windows) do not respond well to a change in disk controller type, so when using such OSes, take care to ensure that scsi_type is set to an exact match of the template’s controller set. For maximum compatibility, make sure the SCSI controllers on the source template are all the same type.

To ease the gathering of some of these options, you can use the [vsphere_virtual_machine data source][tf-vsphere-virtual-machine-ds], which will give you disk attributes, network interface types, SCSI bus types, and also the guest ID of the source template. See the cloning and customization example for usage details.

The vsphere_virtual_machine resource supports live migration (otherwise known as vMotion) both on the host and storage level. One can migrate the entire VM to another host, cluster, resource pool, or datastore, and migrate or pin a single disk to a specific datastore.

To migrate the virtual machine to another host or resource pool, change the host_system_id or resource_pool_id to the manged object IDs of the new host or resource pool accordingly. To change the virtual machine’s cluster or standalone host, select a resource pool within the specific target.

The same rules apply for migration as they do for VM creation - any host specified needs to be a part of the resource pool supplied. Also keep in mind the implications of moving the virtual machine to a resource pool in another cluster or standalone host, namely ensuring that all hosts in the cluster (or the single standalone host) have access to the datastore that the virtual machine is in.

Many of the same requirements for cloning apply to importing, although since importing writes directly to state, a lot of these rules cannot be enforced at import time, so every effort should be made to ensure the correctness of the configuration before the import.

In addition to these rules, the following extra rules apply to importing:

  • Disks need to have their label argument assigned in a convention matching diskN, starting with disk number 0, based on each disk’s order on the SCSI bus. As an example, a disk on SCSI controller 0 with a unit number of 0 would be labeled disk0, a disk on the same controller with a unit number of 1 would be disk1, but the next disk, which is on SCSI controller 1 with a unit number of 0, still becomes disk2.
  • Disks always get imported with keep_on_remove enabled until the first terraform apply runs, which will remove the setting for known disks. This is an extra safeguard against naming or accounting mistakes in the disk configuration.
  • The scsi_controller_count for the resource is set to the number of contiguous SCSI controllers found, starting with the SCSI controller at bus number 0. If no SCSI controllers are found, the VM is not eligible for import. To ensure maximum compatibility, make sure your virtual machine has the exact number of SCSI controllers it needs, and set scsi_controller_count accordingly.

After importing, you should run terraform plan. Unless you have changed anything else in configuration that would be causing other attributes to change, the only difference should be configuration-only changes, usually comprising of:

  • The imported flag will transition from true to false.
  • keep_on_remove of known disks will transition from true to false.
  • Configuration supplied in the clone block, if present, will be persisted to state. This initial persistence operation does not perform any cloning or customization actions, nor does it force a new resource. After the first apply operation, further changes to clone will force a new resource as per normal operation.
NOTE: Further to the above, do not make any configuration changes to clone after importing or upgrading from a legacy version of the provider before doing an initial terraform apply as these changes will not correctly force a new resource, and your changes will have persisted to state, preventing further plans from correctly triggering a diff.

These changes only update Terraform state when applied, hence it is safe to run when the virtual machine is running. If more settings are being modified, you may need to plan maintenance accordingly for any necessary re-configuration of the virtual machine.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • alternate_guest_name (pulumi.Input[str]) – The guest name for the operating system when guest_id is other or other-64.
  • annotation (pulumi.Input[str]) – A user-provided description of the virtual machine. The default is no annotation.
  • boot_delay (pulumi.Input[int]) – The number of milliseconds to wait before starting the boot sequence. The default is no delay.
  • boot_retry_delay (pulumi.Input[int]) – The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).
  • boot_retry_enabled (pulumi.Input[bool]) – If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.
  • cdrom (pulumi.Input[dict]) – A specification for a CDROM device on this virtual machine. See CDROM options below.
  • clone (pulumi.Input[dict]) – When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.
  • cpu_hot_add_enabled (pulumi.Input[bool]) – Allow CPUs to be added to this virtual machine while it is running.
  • cpu_hot_remove_enabled (pulumi.Input[bool]) – Allow CPUs to be removed to this virtual machine while it is running.
  • cpu_limit (pulumi.Input[int]) – The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.
  • cpu_performance_counters_enabled (pulumi.Input[bool]) – Enable CPU performance counters on this virtual machine. Default: false.
  • cpu_reservation (pulumi.Input[int]) – The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.
  • cpu_share_count (pulumi.Input[int]) – The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.
  • cpu_share_level (pulumi.Input[str]) – The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set for virtual machine. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datastore_cluster_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.
  • datastore_id (pulumi.Input[str]) – The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.
  • disks (pulumi.Input[list]) – A specification for a virtual disk device on this virtual machine. See disk options below.
  • efi_secure_boot_enabled (pulumi.Input[bool]) – When the firmware type is set to is efi, this enables EFI secure boot. Default: false.
  • enable_disk_uuid (pulumi.Input[bool]) – Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.
  • enable_logging (pulumi.Input[bool]) – Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.
  • ept_rvi_mode (pulumi.Input[str]) – The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.
  • extra_config (pulumi.Input[dict]) – Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as data for cloud-config (under the guestinfo namespace).
  • firmware (pulumi.Input[str]) – The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.
  • folder (pulumi.Input[str]) – The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.
  • force_power_off (pulumi.Input[bool]) – If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.
  • guest_id (pulumi.Input[str]) – The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.
  • host_system_id (pulumi.Input[str]) – An optional [managed object reference ID][docs-about-morefs] of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.
  • hv_mode (pulumi.Input[str]) – The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.
  • latency_sensitivity (pulumi.Input[str]) – Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.
  • memory (pulumi.Input[int]) – The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).
  • memory_hot_add_enabled (pulumi.Input[bool]) – Allow memory to be added to this virtual machine while it is running.
  • memory_limit (pulumi.Input[int]) – The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.
  • memory_reservation (pulumi.Input[int]) – The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.
  • memory_share_count (pulumi.Input[int]) – The number of memory shares allocated to the virtual machine when the memory_share_level is custom.
  • memory_share_level (pulumi.Input[str]) – The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.
  • migrate_wait_timeout (pulumi.Input[int]) – The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.
  • name (pulumi.Input[str]) – An alias for both label and path, the latter when using attach. Required if not using label.
  • nested_hv_enabled (pulumi.Input[bool]) – Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.
  • network_interfaces (pulumi.Input[list]) – A specification for a virtual NIC on this virtual machine. See network interface options below.
  • num_cores_per_socket (pulumi.Input[int]) – The number of cores to distribute among the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.
  • num_cpus (pulumi.Input[int]) – The number of virtual processors to assign to this virtual machine. Default: 1.
  • resource_pool_id (pulumi.Input[str]) – The [managed object reference ID][docs-about-morefs] of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.
  • run_tools_scripts_after_power_on (pulumi.Input[bool]) – Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.
  • run_tools_scripts_after_resume (pulumi.Input[bool]) – Enable the execution of post-resume scripts when VMware tools is installed. Default: true.
  • run_tools_scripts_before_guest_reboot (pulumi.Input[bool]) – Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.
  • run_tools_scripts_before_guest_shutdown (pulumi.Input[bool]) – Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.
  • run_tools_scripts_before_guest_standby (pulumi.Input[bool]) – Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.
  • scsi_bus_sharing (pulumi.Input[str]) – Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.
  • scsi_controller_count (pulumi.Input[int]) – The number of SCSI controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.
  • scsi_type (pulumi.Input[str]) – The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.
  • shutdown_wait_timeout (pulumi.Input[int]) – The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.
  • swap_placement_policy (pulumi.Input[str]) – The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.
  • sync_time_with_host (pulumi.Input[bool]) – Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
  • vapp (pulumi.Input[dict]) – Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.
  • wait_for_guest_net_routable (pulumi.Input[bool]) – Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. Default: true.
  • wait_for_guest_net_timeout (pulumi.Input[int]) – The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter. Default: 5 minutes.
alternate_guest_name = None

The guest name for the operating system when guest_id is other or other-64.

annotation = None

A user-provided description of the virtual machine. The default is no annotation.

boot_delay = None

The number of milliseconds to wait before starting the boot sequence. The default is no delay.

boot_retry_delay = None

The number of milliseconds to wait before retrying the boot sequence. This only valid if boot_retry_enabled is true. Default: 10000 (10 seconds).

boot_retry_enabled = None

If set to true, a virtual machine that fails to boot will try again after the delay defined in boot_retry_delay. Default: false.

cdrom = None

A specification for a CDROM device on this virtual machine. See CDROM options below.

change_version = None

A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.

clone = None

When specified, the VM will be created as a clone of a specified template. Optional customization options can be submitted as well. See creating a virtual machine from a template for more details.

cpu_hot_add_enabled = None

Allow CPUs to be added to this virtual machine while it is running.

cpu_hot_remove_enabled = None

Allow CPUs to be removed to this virtual machine while it is running.

cpu_limit = None

The maximum amount of CPU (in MHz) that this virtual machine can consume, regardless of available resources. The default is no limit.

cpu_performance_counters_enabled = None

Enable CPU performance counters on this virtual machine. Default: false.

cpu_reservation = None

The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.

cpu_share_count = None

The number of CPU shares allocated to the virtual machine when the cpu_share_level is custom.

cpu_share_level = None

The allocation level for CPU resources. Can be one of high, low, normal, or custom. Default: custom.

custom_attributes = None

Map of custom attribute ids to attribute value strings to set for virtual machine. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datastore_cluster_id = None

The [managed object reference ID][docs-about-morefs] of the datastore cluster ID to use. This setting applies to entire virtual machine and implies that you wish to use Storage DRS with this virtual machine. See the section on virtual machine migration for details on changing this value.

datastore_id = None

The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with client_device.

default_ip_address = None

The IP address selected by Terraform to be used with any [provisioners][tf-docs-provisioners] configured on this resource. Whenever possible, this is the first IPv4 address that is reachable through the default gateway configured on the machine, then the first reachable IPv6 address, and then the first general discovered address if neither exist. If VMware tools is not running on the virtual machine, or if the VM is powered off, this value will be blank.

disks = None

A specification for a virtual disk device on this virtual machine. See disk options below.

efi_secure_boot_enabled = None

When the firmware type is set to is efi, this enables EFI secure boot. Default: false.

enable_disk_uuid = None

Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default: false.

enable_logging = None

Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default: false.

ept_rvi_mode = None

The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off. Default: automatic.

extra_config = None

Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as data for cloud-config (under the guestinfo namespace).

firmware = None

The firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios.

folder = None

The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in.

force_power_off = None

If a guest shutdown failed or timed out while updating or destroying (see shutdown_wait_timeout), force the power-off of the virtual machine. Default: true.

guest_id = None

The guest ID for the operating system type. For a full list of possible values, see [here][vmware-docs-guest-ids]. Default: other-64.

guest_ip_addresses = None

The current list of IP addresses on this machine, including the value of default_ip_address. If VMware tools is not running on the virtual machine, or if the VM is powered off, this list will be empty.

  • moid: The [managed object reference ID][docs-about-morefs] of the created virtual machine.
host_system_id = None

An optional [managed object reference ID][docs-about-morefs] of a host to put this virtual machine on. See the section on virtual machine migration for details on changing this value. If a host_system_id is not supplied, vSphere will select a host in the resource pool to place the virtual machine, according to any defaults or DRS policies in place.

hv_mode = None

The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff. Default: hvAuto.

imported = None

This is flagged if the virtual machine has been imported, or the state has been migrated from a previous version of the resource. It influences the behavior of the first post-import apply operation. See the section on importing below.

latency_sensitivity = None

Controls the scheduling delay of the virtual machine. Use a higher sensitivity for applications that require lower latency, such as VOIP, media player applications, or applications that require frequent access to mouse or keyboard devices. Can be one of low, normal, medium, or high.

memory = None

The size of the virtual machine’s memory, in MB. Default: 1024 (1 GB).

memory_hot_add_enabled = None

Allow memory to be added to this virtual machine while it is running.

memory_limit = None

The maximum amount of memory (in MB) that this virtual machine can consume, regardless of available resources. The default is no limit.

memory_reservation = None

The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.

memory_share_count = None

The number of memory shares allocated to the virtual machine when the memory_share_level is custom.

memory_share_level = None

The allocation level for memory resources. Can be one of high, low, normal, or custom. Default: custom.

migrate_wait_timeout = None

The amount of time, in minutes, to wait for a virtual machine migration to complete before failing. Default: 10 minutes. Also see the section on virtual machine migration.

name = None

An alias for both label and path, the latter when using attach. Required if not using label.

nested_hv_enabled = None

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default: false.

network_interfaces = None

A specification for a virtual NIC on this virtual machine. See network interface options below.

num_cores_per_socket = None

The number of cores to distribute among the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value. Default: 1.

num_cpus = None

The number of virtual processors to assign to this virtual machine. Default: 1.

reboot_required = None

Value internal to Terraform used to determine if a configuration set change requires a reboot. This value is only useful during an update process and gets reset on refresh.

resource_pool_id = None

The [managed object reference ID][docs-about-morefs] of the resource pool to put this virtual machine in. See the section on virtual machine migration for details on changing this value.

run_tools_scripts_after_power_on = None

Enable the execution of post-power-on scripts when VMware tools is installed. Default: true.

run_tools_scripts_after_resume = None

Enable the execution of post-resume scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_reboot = None

Enable the execution of pre-reboot scripts when VMware tools is installed. Default: false.

run_tools_scripts_before_guest_shutdown = None

Enable the execution of pre-shutdown scripts when VMware tools is installed. Default: true.

run_tools_scripts_before_guest_standby = None

Enable the execution of pre-standby scripts when VMware tools is installed. Default: true.

scsi_bus_sharing = None

Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default: noSharing.

scsi_controller_count = None

The number of SCSI controllers that Terraform manages on this virtual machine. This directly affects the amount of disks you can add to the virtual machine and the maximum disk unit number. Note that lowering this value does not remove controllers. Default: 1.

scsi_type = None

The type of SCSI bus this virtual machine will have. Can be one of lsilogic (LSI Logic Parallel), lsilogic-sas (LSI Logic SAS) or pvscsi (VMware Paravirtual). Defualt: pvscsi.

shutdown_wait_timeout = None

The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If force_power_off is set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.

swap_placement_policy = None

The swap file placement policy for this virtual machine. Can be one of inherit, hostLocal, or vmDirectory. Default: inherit.

sync_time_with_host = None

Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default: false.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

uuid = None

The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.

vapp = None

Optional vApp configuration. The only sub-key available is properties, which is a key/value map of properties for virtual machines imported from OVF or OVA files. See Using vApp properties to supply OVF/OVA configuration for more details.

vapp_transports = None

Computed value which is only valid for cloned virtual machines. A list of vApp transport methods supported by the source virtual machine or template.

vmware_tools_status = None

The state of VMware tools in the guest. This will determine the proper course of action for some device operations.

vmx_path = None

The path of the virtual machine’s configuration file in the VM’s datastore.

wait_for_guest_net_routable = None

Controls whether or not the guest network waiter waits for a routable address. When false, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. Default: true.

wait_for_guest_net_timeout = None

The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 disables the waiter. Default: 5 minutes.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VirtualMachineSnapshot(resource_name, opts=None, consolidate=None, description=None, memory=None, quiesce=None, remove_children=None, snapshot_name=None, virtual_machine_uuid=None, __name__=None, __opts__=None)

The vsphere_virtual_machine_snapshot resource can be used to manage snapshots for a virtual machine.

For more information on managing snapshots and how they work in VMware, see here.

NOTE: A snapshot in VMware differs from traditional disk snapshots, and can contain the actual running state of the virtual machine, data for all disks that have not been set to be independent from the snapshot (including ones that have been attached via the attach parameter to the vsphere_virtual_machine disk block), and even the configuration of the virtual machine at the time of the snapshot. Virtual machine, disk activity, and configuration changes post-snapshot are not included in the original state. Use this resource with care! Neither VMware nor HashiCorp recommends retaining snapshots for a extended period of time and does NOT recommend using them as as backup feature. For more information on the limitation of virtual machine snapshots, see here.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • consolidate (pulumi.Input[bool]) – If set to true, the delta disks involved in this snapshot will be consolidated into the parent when this resource is destroyed.
  • description (pulumi.Input[str]) – A description for the snapshot.
  • memory (pulumi.Input[bool]) – If set to true, a dump of the internal state of the virtual machine is included in the snapshot.
  • quiesce (pulumi.Input[bool]) – If set to true, and the virtual machine is powered on when the snapshot is taken, VMware Tools is used to quiesce the file system in the virtual machine.
  • remove_children (pulumi.Input[bool]) – If set to true, the entire snapshot subtree is removed when this resource is destroyed.
  • snapshot_name (pulumi.Input[str]) – The name of the snapshot.
  • virtual_machine_uuid (pulumi.Input[str]) – The virtual machine UUID.
consolidate = None

If set to true, the delta disks involved in this snapshot will be consolidated into the parent when this resource is destroyed.

description = None

A description for the snapshot.

memory = None

If set to true, a dump of the internal state of the virtual machine is included in the snapshot.

quiesce = None

If set to true, and the virtual machine is powered on when the snapshot is taken, VMware Tools is used to quiesce the file system in the virtual machine.

remove_children = None

If set to true, the entire snapshot subtree is removed when this resource is destroyed.

snapshot_name = None

The name of the snapshot.

virtual_machine_uuid = None

The virtual machine UUID.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_vsphere.VmfsDatastore(resource_name, opts=None, custom_attributes=None, datastore_cluster_id=None, disks=None, folder=None, host_system_id=None, name=None, tags=None, __name__=None, __opts__=None)

The vsphere_vmfs_datastore resource can be used to create and manage VMFS datastores on an ESXi host or a set of hosts. The resource supports using any SCSI device that can generally be used in a datastore, such as local disks, or disks presented to a host or multiple hosts over Fibre Channel or iSCSI. Devices can be specified manually, or discovered using the ``vsphere_vmfs_disks` </docs/providers/vsphere/d/vmfs_disks.html>`_ data source.

Note that the current behaviour of this resource will auto-mount any created datastores to any other host within vCenter that has access to the same disk.

Example: You want to create a datastore with a iSCSI LUN that is visible on 3 hosts in a single vSphere cluster (esxi1, esxi2 and esxi3). When you create the datastore on esxi1, the datastore will be automatically mounted on esxi2 and esxi3, without the need to configure the resource on either of those two hosts.

Future versions of this resource may allow you to control the hosts that a datastore is mounted to, but currently, this automatic behaviour cannot be changed, so keep this in mind when writing your configurations and deploying your disks.

To increase the size of a datastore, you must add additional disks to the disks attribute. Expanding the size of a datastore by increasing the size of an already provisioned disk is currently not supported (but may be in future versions of this resource).

NOTE: You cannot decrease the size of a datastore. If the resource detects disks removed from the configuration, Terraform will give an error. To reduce the size of the datastore, the resource needs to be re-created - run ``terraform taint` </docs/commands/taint.html>`_ to taint the resource so it can be re-created.
Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value string to set on datastore resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
  • datastore_cluster_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of a datastore cluster to put this datastore in. Conflicts with folder.
  • disks (pulumi.Input[list]) – The disks to use with the datastore.
  • folder (pulumi.Input[str]) – The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore named terraform-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-test. Conflicts with datastore_cluster_id.
  • host_system_id (pulumi.Input[str]) – The [managed object ID][docs-about-morefs] of the host to set the datastore up on. Note that this is not necessarily the only host that the datastore will be set up on - see here for more info. Forces a new resource if changed.
  • name (pulumi.Input[str]) – The name of the datastore. Forces a new resource if changed.
  • tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.
accessible = None

The connectivity status of the datastore. If this is false, some other computed attributes may be out of date.

capacity = None

Maximum capacity of the datastore, in megabytes.

custom_attributes = None

Map of custom attribute ids to attribute value string to set on datastore resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.

datastore_cluster_id = None

The [managed object ID][docs-about-morefs] of a datastore cluster to put this datastore in. Conflicts with folder.

disks = None

The disks to use with the datastore.

folder = None

The relative path to a folder to put this datastore in. This is a path relative to the datacenter you are deploying the datastore to. Example: for the dc1 datacenter, and a provided folder of foo/bar, Terraform will place a datastore named terraform-test in a datastore folder located at /dc1/datastore/foo/bar, with the final inventory path being /dc1/datastore/foo/bar/terraform-test. Conflicts with datastore_cluster_id.

free_space = None

Available space of this datastore, in megabytes.

host_system_id = None

The [managed object ID][docs-about-morefs] of the host to set the datastore up on. Note that this is not necessarily the only host that the datastore will be set up on - see here for more info. Forces a new resource if changed.

maintenance_mode = None

The current maintenance mode state of the datastore.

multiple_host_access = None

If true, more than one host in the datacenter has been configured with access to the datastore.

name = None

The name of the datastore. Forces a new resource if changed.

tags = None

The IDs of any tags to attach to this resource. See [here][docs-applying-tags] for a reference on how to apply tags.

uncommitted_space = None

Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.

url = None

The unique locator for the datastore.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
pulumi_vsphere.get_compute_cluster(datacenter_id=None, name=None)

The vsphere_compute_cluster data source can be used to discover the ID of a cluster in vSphere. This is useful to fetch the ID of a cluster that you want to use for virtual machine placement via the ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource, allowing you to specify the cluster’s root resource pool directly versus using the alias available through the ``vsphere_resource_pool` </docs/providers/vsphere/d/resource_pool.html>`_ data source.

You may also wish to see the ``vsphere_compute_cluster` </docs/providers/vsphere/r/compute_cluster.html>`_ resource for further details about clusters or how to work with them in Terraform.
pulumi_vsphere.get_custom_attribute(name=None)

The vsphere_custom_attribute data source can be used to reference custom attributes that are not managed by Terraform. Its attributes are exactly the same as the ``vsphere_custom_attribute` resource </docs/providers/vsphere/r/custom_attribute.html>`_, and, like importing, the data source takes a name to search on. The id and other attributes are then populated with the data found by the search.

NOTE: Custom attributes are unsupported on direct ESXi connections and require vCenter.
pulumi_vsphere.get_datacenter(name=None)

The vsphere_datacenter data source can be used to discover the ID of a vSphere datacenter. This can then be used with resources or data sources that require a datacenter, such as the ``vsphere_host` </docs/providers/vsphere/d/host.html>`_ data source.

pulumi_vsphere.get_datastore(datacenter_id=None, name=None)

The vsphere_datastore data source can be used to discover the ID of a datastore in vSphere. This is useful to fetch the ID of a datastore that you want to use to create virtual machines in using the ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource.

pulumi_vsphere.get_datastore_cluster(datacenter_id=None, name=None)

The vsphere_datastore_cluster data source can be used to discover the ID of a datastore cluster in vSphere. This is useful to fetch the ID of a datastore cluster that you want to use to assign datastores to using the ``vsphere_nas_datastore` </docs/providers/vsphere/r/nas_datastore.html>`_ or ``vsphere_vmfs_datastore` </docs/providers/vsphere/r/vmfs_datastore.html>`_ resources, or create virtual machines in using the ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource.

pulumi_vsphere.get_distributed_virtual_switch(datacenter_id=None, name=None)

The vsphere_distributed_virtual_switch data source can be used to discover the ID and uplink data of a of a vSphere distributed virtual switch (DVS). This can then be used with resources or data sources that require a DVS, such as the ``vsphere_distributed_port_group` </docs/providers/vsphere/r/distributed_port_group.html>`_ resource, for which an example is shown below.

NOTE: This data source requires vCenter and is not available on direct ESXi connections.
pulumi_vsphere.get_host(datacenter_id=None, name=None)

The vsphere_host data source can be used to discover the ID of a vSphere host. This can then be used with resources or data sources that require a host managed object reference ID.

pulumi_vsphere.get_network(datacenter_id=None, name=None)

The vsphere_network data source can be used to discover the ID of a network in vSphere. This can be any network that can be used as the backing for a network interface for vsphere_virtual_machine or any other vSphere resource that requires a network. This includes standard (host-based) port groups, DVS port groups, or opaque networks such as those managed by NSX.

pulumi_vsphere.get_resource_pool(datacenter_id=None, name=None)

The vsphere_resource_pool data source can be used to discover the ID of a resource pool in vSphere. This is useful to fetch the ID of a resource pool that you want to use to create virtual machines in using the ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource.

pulumi_vsphere.get_tag(category_id=None, name=None)

The vsphere_tag data source can be used to reference tags that are not managed by Terraform. Its attributes are exactly the same as the ``vsphere_tag` resource </docs/providers/vsphere/r/tag.html>`_, and, like importing, the data source takes a name and category to search on. The id and other attributes are then populated with the data found by the search.

NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
pulumi_vsphere.get_tag_category(name=None)

The vsphere_tag_category data source can be used to reference tag categories that are not managed by Terraform. Its attributes are exactly the same as the ``vsphere_tag_category` resource </docs/providers/vsphere/r/tag_category.html>`_, and, like importing, the data source takes a name to search on. The id and other attributes are then populated with the data found by the search.

NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
pulumi_vsphere.get_vapp_container(datacenter_id=None, name=None)

The vsphere_vapp_container data source can be used to discover the ID of a vApp container in vSphere. This is useful to fetch the ID of a vApp container that you want to use to create virtual machines in using the ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource.

pulumi_vsphere.get_virtual_machine(datacenter_id=None, name=None, scsi_controller_scan_count=None)

The vsphere_virtual_machine data source can be used to find the UUID of an existing virtual machine or template. Its most relevant purpose is for finding the UUID of a template to be used as the source for cloning into a new ``vsphere_virtual_machine` </docs/providers/vsphere/r/virtual_machine.html>`_ resource. It also reads the guest ID so that can be supplied as well.

pulumi_vsphere.get_vmfs_disks(filter=None, host_system_id=None, rescan=None)

The vsphere_vmfs_disks data source can be used to discover the storage devices available on an ESXi host. This data source can be combined with the ``vsphere_vmfs_datastore` </docs/providers/vsphere/r/vmfs_datastore.html>`_ resource to create VMFS datastores based off a set of discovered disks.