This page documents the language specification for the vsphere package. If you're looking for help working with the inputs, outputs, or functions of vsphere resources in a Pulumi program, please see the resource documentation for examples and API reference.
Pulumi vSphere¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-vsphere repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-vsphere repo.
- class
pulumi_vsphere.AwaitableGetComputeClusterResult(datacenter_id=None, id=None, name=None, resource_pool_id=None)¶
- class
pulumi_vsphere.AwaitableGetContentLibraryItemResult(id=None, library_id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetContentLibraryResult(id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetCustomAttributeResult(id=None, managed_object_type=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetDatacenterResult(id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetDatastoreClusterResult(datacenter_id=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetDatastoreResult(datacenter_id=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetDistributedVirtualSwitchResult(datacenter_id=None, id=None, name=None, uplinks=None)¶
- class
pulumi_vsphere.AwaitableGetDynamicResult(filters=None, id=None, name_regex=None, type=None)¶
- class
pulumi_vsphere.AwaitableGetFolderResult(id=None, path=None)¶
- class
pulumi_vsphere.AwaitableGetHostPciDeviceResult(class_id=None, host_id=None, id=None, name=None, name_regex=None, vendor_id=None)¶
- class
pulumi_vsphere.AwaitableGetHostResult(datacenter_id=None, id=None, name=None, resource_pool_id=None)¶
- class
pulumi_vsphere.AwaitableGetNetworkResult(datacenter_id=None, distributed_virtual_switch_uuid=None, id=None, name=None, type=None)¶
- class
pulumi_vsphere.AwaitableGetPolicyResult(id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetResourcePoolResult(datacenter_id=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetTagCategoryResult(associable_types=None, cardinality=None, description=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetTagResult(category_id=None, description=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetVappContainerResult(datacenter_id=None, id=None, name=None)¶
- class
pulumi_vsphere.AwaitableGetVirtualMachineResult(alternate_guest_name=None, datacenter_id=None, disks=None, firmware=None, guest_id=None, guest_ip_addresses=None, id=None, ide_controller_scan_count=None, name=None, network_interface_types=None, sata_controller_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=None)¶
- class
pulumi_vsphere.AwaitableGetVmfsDisksResult(disks=None, filter=None, host_system_id=None, id=None, rescan=None)¶
- 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_managed=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, __props__=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). We use
.ComputeClusterto 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 the provider, via the.DatastoreClusterresource.The
.ComputeClusterresource 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
.ComputeClusterresource 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 thetagsparameter, 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_actionha_datastore_apd_responseha_datastore_apd_response_delayha_datastore_pdl_responseha_vm_component_protection
These settings require vSphere 6.5 or higher:
drs_enable_predictive_drsha_admission_control_host_failure_tolerance(Whenha_admission_control_policyis set toresourcePercentageorslotPolicy. Permitted in all versions underfailoverHosts)ha_admission_control_resource_percentage_auto_computeha_vm_restart_timeoutha_vm_dependency_restart_conditionha_vm_restart_additional_delayproactive_ha_automation_levelproactive_ha_enabledproactive_ha_moderate_remediationproactive_ha_provider_idsproactive_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.
datacenter_id (pulumi.Input[str]) – The managed object ID 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
manualorautomated. Default:manual.dpm_enabled (pulumi.Input[bool]) – Enable DPM support for DRS in this cluster. Requires
drs_enabledto betruein order to be effective. Default:false.dpm_threshold (pulumi.Input[float]) – A value between
1and5indicating 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, orfullyAutomated. 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[float]) – A value between
1and5indicating 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a cluster namedcompute-cluster-testin a host folder located at/dc1/host/foo/bar, with the final inventory path being/dc1/host/foo/bar/datastore-cluster-test.force_evacuate_on_destroy (pulumi.Input[bool]) – When destroying the resource, setting this to
truewill auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out ofhost_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 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[float]) – 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[float]) – 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, ordisabled. 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_tolerancesetting 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[float]) – 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[float]) – 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[float]) – Controls the user-defined CPU slot size, in MHz. Default:
32.ha_admission_control_slot_policy_explicit_memory (pulumi.Input[float]) – 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
noneorreset. 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, orrestartAggressive. Default:disabled. \*ha_datastore_apd_response_delay (pulumi.Input[float]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in
ha_datastore_apd_response. Default:3minutes. \*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, orrestartAggressive. 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_policyis set to eitheruserSelectedDsorallFeasibleDsWithUserPreference.ha_heartbeat_datastore_policy (pulumi.Input[str]) – The selection policy for HA heartbeat datastores. Can be one of
allFeasibleDs,userSelectedDs, orallFeasibleDsWithUserPreference. 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, orshutdown. 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
enabledordisabled. Default:enabled.ha_vm_component_protection (pulumi.Input[str]) – Controls vSphere VM component protection for virtual machines in this cluster. Can be one of
enabledordisabled. 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, orappHbStatusGreen. The default isnone, 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[float]) – 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[float]) – The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means 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[float]) – The maximum number of resets that HA will perform to a virtual machine when responding to a failure event. Default:
3ha_vm_minimum_uptime (pulumi.Input[float]) – 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, orvmAndAppMonitoring. Default:vmMonitoringDisabled.ha_vm_restart_additional_delay (pulumi.Input[float]) – 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, orhighest. Default:medium.ha_vm_restart_timeout (pulumi.Input[float]) – 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[float]) – 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_managed (pulumi.Input[bool]) – Can be set to
trueif compute cluster membership will be managed through thehostresource rather than thecompute_clusterresource. Conflicts with:host_system_ids.
>>>>>>> v1.18.3- Parameters
host_system_ids (pulumi.Input[list]) – The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster. Conflicts with:
host_managed.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
AutomatedorManual. 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
MaintenanceModeorQuarantineMode. Note that this cannot be set toMaintenanceModewhenproactive_ha_severe_remediationis set toQuarantineMode. 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
MaintenanceModeorQuarantineMode. Note that this cannot be set toQuarantineModewhenproactive_ha_moderate_remediationis set toMaintenanceMode. Default:QuarantineMode. \*tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
custom_attributes: pulumi.Output[dict] = None¶A map of custom attribute ids to attribute value strings to set for the datastore cluster.
datacenter_id: pulumi.Output[str] = None¶The managed object ID of the datacenter to create the cluster in. Forces a new resource if changed.
dpm_automation_level: pulumi.Output[str] = None¶The automation level for host power operations in this cluster. Can be one of
manualorautomated. Default:manual.
dpm_enabled: pulumi.Output[bool] = None¶Enable DPM support for DRS in this cluster. Requires
drs_enabledto betruein order to be effective. Default:false.
dpm_threshold: pulumi.Output[float] = None¶A value between
1and5indicating 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.Output[dict] = None¶A key/value map that specifies advanced options for DRS and DPM.
drs_automation_level: pulumi.Output[str] = None¶The default automation level for all virtual machines in this cluster. Can be one of
manual,partiallyAutomated, orfullyAutomated. Default:manual.
drs_enable_predictive_drs: pulumi.Output[bool] = None¶When
true, enables DRS to use data from [vRealize Operations Manager][ref-vsphere-vro] to make proactive DRS recommendations. \*
drs_enable_vm_overrides: pulumi.Output[bool] = None¶Allow individual DRS overrides to be set for virtual machines in the cluster. Default:
true.
drs_enabled: pulumi.Output[bool] = None¶Enable DRS for this cluster. Default:
false.
drs_migration_threshold: pulumi.Output[float] = None¶A value between
1and5indicating 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.Output[str] = 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a cluster namedcompute-cluster-testin a host folder located at/dc1/host/foo/bar, with the final inventory path being/dc1/host/foo/bar/datastore-cluster-test.
force_evacuate_on_destroy: pulumi.Output[bool] = None¶When destroying the resource, setting this to
truewill auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out ofhost_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.Output[list] = None¶Defines the managed object IDs 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.Output[float] = 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: pulumi.Output[float] = 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: pulumi.Output[str] = None¶The type of admission control policy to use with vSphere HA. Can be one of
resourcePercentage,slotPolicy,failoverHosts, ordisabled. Default:resourcePercentage.
ha_admission_control_resource_percentage_auto_compute: pulumi.Output[bool] = None¶Automatically determine available resource percentages by subtracting the average number of host resources represented by the
ha_admission_control_host_failure_tolerancesetting from the total amount of resources in the cluster. Disable to supply user-defined values. Default:true. \*
ha_admission_control_resource_percentage_cpu: pulumi.Output[float] = None¶Controls the user-defined percentage of CPU resources in the cluster to reserve for failover. Default:
100.
ha_admission_control_resource_percentage_memory: pulumi.Output[float] = 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: pulumi.Output[float] = None¶Controls the user-defined CPU slot size, in MHz. Default:
32.
ha_admission_control_slot_policy_explicit_memory: pulumi.Output[float] = None¶Controls the user-defined memory slot size, in MB. Default:
100.
ha_admission_control_slot_policy_use_explicit_size: pulumi.Output[bool] = 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: pulumi.Output[dict] = None¶A key/value map that specifies advanced options for vSphere HA.
ha_datastore_apd_recovery_action: pulumi.Output[str] = 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
noneorreset. Default:none. \*
ha_datastore_apd_response: pulumi.Output[str] = 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, orrestartAggressive. Default:disabled. \*
ha_datastore_apd_response_delay: pulumi.Output[float] = 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:3minutes. \*
ha_datastore_pdl_response: pulumi.Output[str] = 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, orrestartAggressive. Default:disabled. \*
ha_enabled: pulumi.Output[bool] = None¶Enable vSphere HA for this cluster. Default:
false.
ha_heartbeat_datastore_ids: pulumi.Output[list] = None¶The list of managed object IDs for preferred datastores to use for HA heartbeating. This setting is only useful when
ha_heartbeat_datastore_policyis set to eitheruserSelectedDsorallFeasibleDsWithUserPreference.
ha_heartbeat_datastore_policy: pulumi.Output[str] = None¶The selection policy for HA heartbeat datastores. Can be one of
allFeasibleDs,userSelectedDs, orallFeasibleDsWithUserPreference. Default:allFeasibleDsWithUserPreference.
ha_host_isolation_response: pulumi.Output[str] = 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, orshutdown. Default:none.
ha_host_monitoring: pulumi.Output[str] = None¶Global setting that controls whether vSphere HA remediates virtual machines on host failure. Can be one of
enabledordisabled. Default:enabled.
ha_vm_component_protection: pulumi.Output[str] = None¶Controls vSphere VM component protection for virtual machines in this cluster. Can be one of
enabledordisabled. Default:enabled. \*
ha_vm_dependency_restart_condition: pulumi.Output[str] = 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, orappHbStatusGreen. The default isnone, which means that a virtual machine is considered ready immediately after a host is found to start it on. \*
ha_vm_failure_interval: pulumi.Output[float] = 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: pulumi.Output[float] = None¶The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default:-1(no window).
ha_vm_maximum_resets: pulumi.Output[float] = 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: pulumi.Output[float] = 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: pulumi.Output[str] = None¶The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of
vmMonitoringDisabled,vmMonitoringOnly, orvmAndAppMonitoring. Default:vmMonitoringDisabled.
ha_vm_restart_additional_delay: pulumi.Output[float] = 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: pulumi.Output[str] = None¶The default restart priority for affected virtual machines when vSphere detects a host failure. Can be one of
lowest,low,medium,high, orhighest. Default:medium.
ha_vm_restart_timeout: pulumi.Output[float] = 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: pulumi.Output[float] = 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_managed: pulumi.Output[bool] = None¶Can be set to
trueif compute cluster membership will be managed through thehostresource rather than thecompute_clusterresource. Conflicts with:host_system_ids.> v1.18.3
host_system_ids: pulumi.Output[list] = None¶The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster. Conflicts with:
host_managed.
name: pulumi.Output[str] = None¶The name of the cluster.
proactive_ha_automation_level: pulumi.Output[str] = 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
AutomatedorManual. Default:Manual. \*
proactive_ha_enabled: pulumi.Output[bool] = None¶Enables Proactive HA. Default:
false. \*
proactive_ha_moderate_remediation: pulumi.Output[str] = None¶The configured remediation for moderately degraded hosts. Can be one of
MaintenanceModeorQuarantineMode. Note that this cannot be set toMaintenanceModewhenproactive_ha_severe_remediationis set toQuarantineMode. Default:QuarantineMode. \*
proactive_ha_provider_ids: pulumi.Output[list] = None¶The list of IDs for health update providers configured for this cluster. \*
proactive_ha_severe_remediation: pulumi.Output[str] = None¶The configured remediation for severely degraded hosts. Can be one of
MaintenanceModeorQuarantineMode. Note that this cannot be set toQuarantineModewhenproactive_ha_moderate_remediationis set toMaintenanceMode. Default:QuarantineMode. \*
resource_pool_id: pulumi.Output[str] = None¶The managed object ID of the cluster’s root resource pool.
The IDs of any tags to attach to this resource.
- static
get(resource_name, id, 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_managed=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, resource_pool_id=None, tags=None)¶ Get an existing ComputeCluster resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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.
datacenter_id (pulumi.Input[str]) – The managed object ID 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
manualorautomated. Default:manual.dpm_enabled (pulumi.Input[bool]) – Enable DPM support for DRS in this cluster. Requires
drs_enabledto betruein order to be effective. Default:false.dpm_threshold (pulumi.Input[float]) – A value between
1and5indicating 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, orfullyAutomated. 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[float]) – A value between
1and5indicating 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a cluster namedcompute-cluster-testin a host folder located at/dc1/host/foo/bar, with the final inventory path being/dc1/host/foo/bar/datastore-cluster-test.force_evacuate_on_destroy (pulumi.Input[bool]) – When destroying the resource, setting this to
truewill auto-remove any hosts that are currently a member of the cluster, as if they were removed by taking their entry out ofhost_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 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[float]) – 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[float]) – 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, ordisabled. 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_tolerancesetting 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[float]) – 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[float]) – 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[float]) – Controls the user-defined CPU slot size, in MHz. Default:
32.ha_admission_control_slot_policy_explicit_memory (pulumi.Input[float]) – 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
noneorreset. 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, orrestartAggressive. Default:disabled. \*ha_datastore_apd_response_delay (pulumi.Input[float]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in
ha_datastore_apd_response. Default:3minutes. \*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, orrestartAggressive. 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_policyis set to eitheruserSelectedDsorallFeasibleDsWithUserPreference.ha_heartbeat_datastore_policy (pulumi.Input[str]) – The selection policy for HA heartbeat datastores. Can be one of
allFeasibleDs,userSelectedDs, orallFeasibleDsWithUserPreference. 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, orshutdown. 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
enabledordisabled. Default:enabled.ha_vm_component_protection (pulumi.Input[str]) – Controls vSphere VM component protection for virtual machines in this cluster. Can be one of
enabledordisabled. 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, orappHbStatusGreen. The default isnone, 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[float]) – 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[float]) – The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means 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[float]) – The maximum number of resets that HA will perform to a virtual machine when responding to a failure event. Default:
3ha_vm_minimum_uptime (pulumi.Input[float]) – 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, orvmAndAppMonitoring. Default:vmMonitoringDisabled.ha_vm_restart_additional_delay (pulumi.Input[float]) – 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, orhighest. Default:medium.ha_vm_restart_timeout (pulumi.Input[float]) – 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[float]) – 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_managed (pulumi.Input[bool]) – Can be set to
trueif compute cluster membership will be managed through thehostresource rather than thecompute_clusterresource. Conflicts with:host_system_ids.
>>>>>>> v1.18.3- Parameters
host_system_ids (pulumi.Input[list]) – The [managed object IDs][docs-about-morefs] of the hosts to put in the cluster. Conflicts with:
host_managed.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
AutomatedorManual. 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
MaintenanceModeorQuarantineMode. Note that this cannot be set toMaintenanceModewhenproactive_ha_severe_remediationis set toQuarantineMode. 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
MaintenanceModeorQuarantineMode. Note that this cannot be set toQuarantineModewhenproactive_ha_moderate_remediationis set toMaintenanceMode. Default:QuarantineMode. \*resource_pool_id (pulumi.Input[str]) – The managed object ID of the cluster’s root resource pool.
tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterHostGroupresource can be used to manage groups of hosts in a cluster, either created by the.ComputeClusterresource or looked up by the.ComputeClusterdata source.This resource mainly serves as an input to the
.ComputeClusterVmHostRuleresource - 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 of the cluster to put the group in. Forces a new resource if changed.
host_system_ids (pulumi.Input[list]) – The managed object IDs 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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
host_system_ids: pulumi.Output[list] = None¶The managed object IDs of the hosts to put in the cluster.
name: pulumi.Output[str] = None¶The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, host_system_ids=None, name=None)¶ Get an existing ComputeClusterHostGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
host_system_ids (pulumi.Input[list]) – The managed object IDs 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterVmAffinityRuleresource can be used to manage VM affinity rules in a cluster, either created by the.ComputeClusterresource or looked up by the.ComputeClusterdata 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
mandatoryflag.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
.ComputeClusterVmHostRuleresource.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
NOTE: vSphere DRS requires a vSphere Enterprise Plus license.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = [] for range in [{"value": i} for i in range(0, 2)]: vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id)) cluster_vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("clusterVmAffinityRule", compute_cluster_id=cluster.id, virtual_machine_ids=[__item.id for __item in vm])
- 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 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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
enabled: pulumi.Output[bool] = None¶Enable this rule in the cluster. Default:
true.
mandatory: pulumi.Output[bool] = None¶When this value is
true, prevents any virtual machine operations that may violate this rule. Default:false.
name: pulumi.Output[str] = None¶The name of the rule. This must be unique in the cluster.
virtual_machine_ids: pulumi.Output[list] = None¶The UUIDs of the virtual machines to run on the same host together.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None)¶ Get an existing ComputeClusterVmAffinityRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterVmAntiAffinityRuleresource can be used to manage VM anti-affinity rules in a cluster, either created by the.ComputeClusterresource or looked up by the.ComputeClusterdata 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
mandatoryflag.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
.ComputeClusterVmHostRuleresource.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
NOTE: vSphere DRS requires a vSphere Enterprise Plus license.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = [] for range in [{"value": i} for i in range(0, 2)]: vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id)) cluster_vm_anti_affinity_rule = vsphere.ComputeClusterVmAntiAffinityRule("clusterVmAntiAffinityRule", compute_cluster_id=cluster.id, virtual_machine_ids=[__item.id for __item in vm])
- 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 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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
enabled: pulumi.Output[bool] = None¶Enable this rule in the cluster. Default:
true.
mandatory: pulumi.Output[bool] = None¶When this value is
true, prevents any virtual machine operations that may violate this rule. Default:false.
name: pulumi.Output[str] = None¶The name of the rule. This must be unique in the cluster.
virtual_machine_ids: pulumi.Output[list] = None¶The UUIDs of the virtual machines to run on hosts different from each other.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None)¶ Get an existing ComputeClusterVmAntiAffinityRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterVmDependencyRuleresource can be used to manage VM dependency rules in a cluster, either created by the.ComputeClusterresource or looked up by the.ComputeClusterdata 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
.ComputeClusterVmGroupresource.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm1 = vsphere.VirtualMachine("vm1", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id) vm2 = vsphere.VirtualMachine("vm2", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id) cluster_vm_group1 = vsphere.ComputeClusterVmGroup("clusterVmGroup1", compute_cluster_id=cluster.id, virtual_machine_ids=[vm1.id]) cluster_vm_group2 = vsphere.ComputeClusterVmGroup("clusterVmGroup2", compute_cluster_id=cluster.id, virtual_machine_ids=[vm2.id]) cluster_vm_dependency_rule = vsphere.ComputeClusterVmDependencyRule("clusterVmDependencyRule", compute_cluster_id=cluster.id, dependency_vm_group_name=cluster_vm_group1.name, vm_group_name=cluster_vm_group2.name)
- 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 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_namewill 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_nameare started.
compute_cluster_id: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
dependency_vm_group_name: pulumi.Output[str] = None¶The name of the VM group that this rule depends on. The VMs defined in the group specified by
vm_group_namewill not be started until the VMs in this group are started.
enabled: pulumi.Output[bool] = None¶Enable this rule in the cluster. Default:
true.
mandatory: pulumi.Output[bool] = None¶When this value is
true, prevents any virtual machine operations that may violate this rule. Default:false.
name: pulumi.Output[str] = None¶The name of the rule. This must be unique in the cluster.
vm_group_name: pulumi.Output[str] = 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_nameare started.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, dependency_vm_group_name=None, enabled=None, mandatory=None, name=None, vm_group_name=None)¶ Get an existing ComputeClusterVmDependencyRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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_namewill 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_nameare 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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterVmGroupresource can be used to manage groups of virtual machines in a cluster, either created by the `.ComputeCluster`` </docs/providers/vsphere/r/compute_cluster.html>`_ resource or looked up by the `.ComputeCluster`` </docs/providers/vsphere/d/compute_cluster.html>`_ data source.This resource mainly serves as an input to the `.ComputeClusterVmDependencyRule`` </docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html>`_ and `.ComputeClusterVmHostRule`` </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.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = [] for range in [{"value": i} for i in range(0, 2)]: vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id)) cluster_vm_group = vsphere.ComputeClusterVmGroup("clusterVmGroup", compute_cluster_id=cluster.id, virtual_machine_ids=[__item.id for __item in vm])
- 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 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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
name: pulumi.Output[str] = None¶The name of the VM group. This must be unique in the cluster. Forces a new resource if changed.
virtual_machine_ids: pulumi.Output[list] = None¶The UUIDs of the virtual machines in this group.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, name=None, virtual_machine_ids=None)¶ Get an existing ComputeClusterVmGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ComputeClusterVmHostRuleresource can be used to manage VM-to-host rules in a cluster, either created by the.ComputeClusterresource or looked up by the.ComputeClusterdata 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
.ComputeClusterVmGroupand.ComputeClusterHostGroupresources.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
NOTE: vSphere DRS requires a vSphere Enterprise Plus license.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") host = vsphere.get_host(datacenter_id=dc.id, name="esxi1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = vsphere.VirtualMachine("vm", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id) cluster_vm_group = vsphere.ComputeClusterVmGroup("clusterVmGroup", compute_cluster_id=cluster.id, virtual_machine_ids=[vm.id]) cluster_host_group = vsphere.ComputeClusterHostGroup("clusterHostGroup", compute_cluster_id=cluster.id, host_system_ids=[host.id]) cluster_vm_host_rule = vsphere.ComputeClusterVmHostRule("clusterVmHostRule", affinity_host_group_name=cluster_host_group.name, compute_cluster_id=cluster.id, vm_group_name=cluster_vm_group.name)
- 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_namewill 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_namewill not be run on the hosts defined in this host group.compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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: pulumi.Output[str] = None¶When this field is used, the virtual machines defined in
vm_group_namewill be run on the hosts defined in this host group.
anti_affinity_host_group_name: pulumi.Output[str] = None¶When this field is used, the virtual machines defined in
vm_group_namewill not be run on the hosts defined in this host group.
compute_cluster_id: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
enabled: pulumi.Output[bool] = None¶Enable this rule in the cluster. Default:
true.
mandatory: pulumi.Output[bool] = None¶When this value is
true, prevents any virtual machine operations that may violate this rule. Default:false.
name: pulumi.Output[str] = None¶The name of the rule. This must be unique in the cluster.
vm_group_name: pulumi.Output[str] = None¶The name of the virtual machine group to use with this rule.
- static
get(resource_name, id, 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)¶ Get an existing ComputeClusterVmHostRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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_namewill 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_namewill not be run on the hosts defined in this host group.compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.
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.ContentLibrary(resource_name, opts=None, description=None, name=None, storage_backings=None, __props__=None, __name__=None, __opts__=None)¶ Create a ContentLibrary resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: A description of the Content Library. :param pulumi.Input[str] name: The name of the Content Library. :param pulumi.Input[list] storage_backings: The managed object reference ID on which to store Content Library
items.
description: pulumi.Output[str] = None¶A description of the Content Library.
name: pulumi.Output[str] = None¶The name of the Content Library.
storage_backings: pulumi.Output[list] = None¶The managed object reference ID on which to store Content Library items.
- static
get(resource_name, id, opts=None, description=None, name=None, storage_backings=None)¶ Get an existing ContentLibrary resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description of the Content Library.
name (pulumi.Input[str]) – The name of the Content Library.
storage_backings (pulumi.Input[list]) – The managed object reference ID on which to store Content Library items.
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.ContentLibraryItem(resource_name, opts=None, description=None, file_urls=None, library_id=None, name=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Create a ContentLibraryItem resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: A description for the item. :param pulumi.Input[list] file_urls: A list of files to download for the Content Library item. :param pulumi.Input[str] library_id: The ID of the Content Library the item should be created in. :param pulumi.Input[str] name: The name of the item to be created in the Content Library. :param pulumi.Input[str] type: Type of content library item.
description: pulumi.Output[str] = None¶A description for the item.
file_urls: pulumi.Output[list] = None¶A list of files to download for the Content Library item.
library_id: pulumi.Output[str] = None¶The ID of the Content Library the item should be created in.
name: pulumi.Output[str] = None¶The name of the item to be created in the Content Library.
type: pulumi.Output[str] = None¶Type of content library item.
- static
get(resource_name, id, opts=None, description=None, file_urls=None, library_id=None, name=None, type=None)¶ Get an existing ContentLibraryItem resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – A description for the item.
file_urls (pulumi.Input[list]) – A list of files to download for the Content Library item.
library_id (pulumi.Input[str]) – The ID of the Content Library the item should be created in.
name (pulumi.Input[str]) – The name of the item to be created in the Content Library.
type (pulumi.Input[str]) – Type of content library item.
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, __props__=None, __name__=None, __opts__=None)¶ Create a CustomAttribute resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] managed_object_type: 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.
- Parameters
name (pulumi.Input[str]) – The name of the custom attribute.
managed_object_type: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the custom attribute.
- static
get(resource_name, id, opts=None, managed_object_type=None, name=None)¶ Get an existing CustomAttribute resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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.
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, __props__=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.
import pulumi import pulumi_vsphere as vsphere prod_datacenter = vsphere.Datacenter("prodDatacenter")
import pulumi import pulumi_vsphere as vsphere research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
- 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.
custom_attributes: pulumi.Output[dict] = 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: pulumi.Output[str] = None¶The folder where the datacenter should be created. Forces a new resource if changed.
moid: pulumi.Output[str] = None¶Managed object ID of this datacenter.
name: pulumi.Output[str] = None¶The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
The IDs of any tags to attach to this resource.
- static
get(resource_name, id, opts=None, custom_attributes=None, folder=None, moid=None, name=None, tags=None)¶ Get an existing Datacenter resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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.
moid (pulumi.Input[str]) – Managed object ID of this datacenter.
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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.DatastoreClusterresource 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 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore cluster nameddatastore-cluster-testin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/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 the provider 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[float]) – The free space threshold to use. When set to
utilization,drs_space_utilization_thresholdis used, and when set tofreeSpace,drs_free_space_thresholdis used. Default:utilization.sdrs_free_space_threshold_mode (pulumi.Input[str]) – 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.
sdrs_free_space_utilization_difference (pulumi.Input[float]) – The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to balance the space. Default:
5percent.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[float]) – The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this datastore. Default:
15seconds.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[float]) – The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. Default:
5percent.sdrs_io_reservable_iops_threshold (pulumi.Input[float]) – 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_thresholdcannot 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[float]) – 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:
60percent.sdrs_io_reservable_threshold_mode (pulumi.Input[str]) – The reservable IOPS threshold setting to use,
sdrs_io_reservable_percent_thresholdin the event ofautomatic, orsdrs_io_reservable_iops_thresholdin the event ofmanual. Default:automatic.sdrs_load_balance_interval (pulumi.Input[float]) – The storage DRS poll interval, in minutes. Default:
480minutes.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.
sdrs_space_utilization_threshold (pulumi.Input[float]) – The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore.
sdrs_vm_evacuation_automation_level (pulumi.Input[str]) – Overrides the default automation settings when generating recommendations for datastore evacuation.
tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
custom_attributes: pulumi.Output[dict] = 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: pulumi.Output[str] = None¶The managed object ID of the datacenter to create the datastore cluster in. Forces a new resource if changed.
folder: pulumi.Output[str] = 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore cluster nameddatastore-cluster-testin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/datastore-cluster-test.
name: pulumi.Output[str] = None¶The name of the datastore cluster.
sdrs_advanced_options: pulumi.Output[dict] = None¶A key/value map of advanced Storage DRS settings that are not exposed via the provider or the vSphere client.
sdrs_automation_level: pulumi.Output[str] = None¶The global automation level for all virtual machines in this datastore cluster. Default:
manual.
sdrs_default_intra_vm_affinity: pulumi.Output[bool] = None¶When
true, all disks in a single virtual machine will be kept on the same datastore. Default:true.
sdrs_enabled: pulumi.Output[bool] = None¶Enable Storage DRS for this datastore cluster. Default:
false.
sdrs_free_space_threshold: pulumi.Output[float] = None¶The free space threshold to use. When set to
utilization,drs_space_utilization_thresholdis used, and when set tofreeSpace,drs_free_space_thresholdis used. Default:utilization.
sdrs_free_space_threshold_mode: pulumi.Output[str] = 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.
sdrs_free_space_utilization_difference: pulumi.Output[float] = None¶The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to balance the space. Default:
5percent.
sdrs_io_balance_automation_level: pulumi.Output[str] = None¶Overrides the default automation settings when correcting I/O load imbalances.
sdrs_io_latency_threshold: pulumi.Output[float] = None¶The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this datastore. Default:
15seconds.
sdrs_io_load_balance_enabled: pulumi.Output[bool] = None¶Enable I/O load balancing for this datastore cluster. Default:
true.
sdrs_io_load_imbalance_threshold: pulumi.Output[float] = None¶The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. Default:
5percent.
sdrs_io_reservable_iops_threshold: pulumi.Output[float] = 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_thresholdcannot 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.Output[float] = 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:
60percent.
sdrs_io_reservable_threshold_mode: pulumi.Output[str] = None¶The reservable IOPS threshold setting to use,
sdrs_io_reservable_percent_thresholdin the event ofautomatic, orsdrs_io_reservable_iops_thresholdin the event ofmanual. Default:automatic.
sdrs_load_balance_interval: pulumi.Output[float] = None¶The storage DRS poll interval, in minutes. Default:
480minutes.
sdrs_policy_enforcement_automation_level: pulumi.Output[str] = None¶Overrides the default automation settings when correcting storage and VM policy violations.
sdrs_rule_enforcement_automation_level: pulumi.Output[str] = None¶Overrides the default automation settings when correcting affinity rule violations.
sdrs_space_balance_automation_level: pulumi.Output[str] = None¶Overrides the default automation settings when correcting disk space imbalances.
sdrs_space_utilization_threshold: pulumi.Output[float] = None¶The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore.
sdrs_vm_evacuation_automation_level: pulumi.Output[str] = None¶Overrides the default automation settings when generating recommendations for datastore evacuation.
The IDs of any tags to attach to this resource.
- static
get(resource_name, id, 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)¶ Get an existing DatastoreCluster resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore cluster nameddatastore-cluster-testin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/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 the provider 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[float]) – The free space threshold to use. When set to
utilization,drs_space_utilization_thresholdis used, and when set tofreeSpace,drs_free_space_thresholdis used. Default:utilization.sdrs_free_space_threshold_mode (pulumi.Input[str]) – 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.
sdrs_free_space_utilization_difference (pulumi.Input[float]) – The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to balance the space. Default:
5percent.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[float]) – The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this datastore. Default:
15seconds.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[float]) – The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. Default:
5percent.sdrs_io_reservable_iops_threshold (pulumi.Input[float]) – 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_thresholdcannot 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[float]) – 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:
60percent.sdrs_io_reservable_threshold_mode (pulumi.Input[str]) – The reservable IOPS threshold setting to use,
sdrs_io_reservable_percent_thresholdin the event ofautomatic, orsdrs_io_reservable_iops_thresholdin the event ofmanual. Default:automatic.sdrs_load_balance_interval (pulumi.Input[float]) – The storage DRS poll interval, in minutes. Default:
480minutes.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.
sdrs_space_utilization_threshold (pulumi.Input[float]) – The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore.
sdrs_vm_evacuation_automation_level (pulumi.Input[str]) – Overrides the default automation settings when generating recommendations for datastore evacuation.
tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
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, __props__=None, __name__=None, __opts__=None)¶ The
.DatastoreClusterVmAntiAffinityRuleresource can be used to manage VM anti-affinity rules in a datastore cluster, either created by the.DatastoreClusterresource or looked up by the.DatastoreClusterdata 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
mandatoryflag.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
NOTE: Storage DRS requires a vSphere Enterprise Plus license.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore_cluster = vsphere.get_datastore_cluster(datacenter_id=dc.id, name="datastore-cluster1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = [] for range in [{"value": i} for i in range(0, 2)]: vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", datastore_cluster_id=datastore_cluster.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id)) cluster_vm_anti_affinity_rule = vsphere.DatastoreClusterVmAntiAffinityRule("clusterVmAntiAffinityRule", datastore_cluster_id=datastore_cluster.id, virtual_machine_ids=[__item.id for __item in vm])
- 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 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: pulumi.Output[str] = None¶The managed object reference ID of the datastore cluster to put the group in. Forces a new resource if changed.
enabled: pulumi.Output[bool] = None¶Enable this rule in the cluster. Default:
true.
mandatory: pulumi.Output[bool] = None¶When this value is
true, prevents any virtual machine operations that may violate this rule. Default:false.
name: pulumi.Output[str] = None¶The name of the rule. This must be unique in the cluster.
virtual_machine_ids: pulumi.Output[list] = None¶The UUIDs of the virtual machines to run on different datastores from each other.
- static
get(resource_name, id, opts=None, datastore_cluster_id=None, enabled=None, mandatory=None, name=None, virtual_machine_ids=None)¶ Get an existing DatastoreClusterVmAntiAffinityRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
datastore_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.DistributedPortGroupresource 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.DistributedVirtualSwitchresource.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.
import pulumi import pulumi_vsphere as vsphere dvs = vsphere.DistributedVirtualSwitch("dvs", active_uplinks=["tfup1"], datacenter_id=data[".Datacenter"]["dc"]["id"], standby_uplinks=["tfup2"], uplinks=[ "tfup1", "tfup2", ]) pg = vsphere.DistributedPortGroup("pg", active_uplinks=[ "tfup1", "tfup2", ], distributed_virtual_switch_uuid=dvs.id, standby_uplinks=[], vlan_id=1000)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
active_uplinks (pulumi.Input[list]) – List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
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.
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.
auto_expand (pulumi.Input[bool]) – Allows the port group to create additional ports past the limit specified in
number_of_portsif necessary. Default:true.block_all_ports (pulumi.Input[bool]) – Indicates whether to block all ports by default.
block_override_allowed (pulumi.Input[bool]) – Allow the port shutdown policy to be overridden on an individual port.
check_beacon (pulumi.Input[bool]) – Enable beacon probing on the ports this policy applies to.
custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value string to set for port group.
description (pulumi.Input[str]) – An optional description for the port group.
directpath_gen2_allowed (pulumi.Input[bool]) – Allow VMDirectPath Gen2 on the ports this policy applies to.
distributed_virtual_switch_uuid (pulumi.Input[str]) – The ID of the DVS to add the port group to. Forces a new resource if changed.
egress_shaping_average_bandwidth (pulumi.Input[float]) – The average egress bandwidth in bits per second if egress shaping is enabled on the port.
egress_shaping_burst_size (pulumi.Input[float]) – The maximum egress burst size allowed in bytes if egress shaping is enabled on the port.
egress_shaping_enabled (pulumi.Input[bool]) – True if the traffic shaper is enabled for egress traffic on the port.
egress_shaping_peak_bandwidth (pulumi.Input[float]) – The peak egress 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 interfaces higher in precedence when they come back up.
ingress_shaping_average_bandwidth (pulumi.Input[float]) – The average ingress bandwidth in bits per second if ingress shaping is enabled on the port.
ingress_shaping_burst_size (pulumi.Input[float]) – The maximum ingress burst size allowed in bytes if ingress shaping is enabled on the port.
ingress_shaping_enabled (pulumi.Input[bool]) – True if the traffic shaper is enabled for ingress traffic on the port.
ingress_shaping_peak_bandwidth (pulumi.Input[float]) – The peak ingress bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.
lacp_enabled (pulumi.Input[bool]) – Whether or not to enable LACP on all uplink ports.
lacp_mode (pulumi.Input[str]) – The uplink LACP mode to use. Can be one of active or passive.
live_port_moving_allowed (pulumi.Input[bool]) – Allow a port in this port group to be moved to another port group while it is connected.
name (pulumi.Input[str]) – The name of the port group.
netflow_enabled (pulumi.Input[bool]) – Indicates whether to enable netflow on all ports.
netflow_override_allowed (pulumi.Input[bool]) – Allow the Netflow policy on this port group to be overridden on an individual port.
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.
notify_switches (pulumi.Input[bool]) – If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
number_of_ports (pulumi.Input[float]) – 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 (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
portNameFormatattribute listed [here][ext-vsphere-portname-format] for details on the format syntax.port_private_secondary_vlan_id (pulumi.Input[float]) – The secondary VLAN ID for this port.
security_policy_override_allowed (pulumi.Input[bool]) – Allow the security policy settings defined in this port group policy to be overridden on an individual port.
shaping_override_allowed (pulumi.Input[bool]) – Allow the traffic shaping options on this port group policy to be overridden on an individual port.
standby_uplinks (pulumi.Input[list]) – List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
tags (pulumi.Input[list]) – A list of tag IDs to apply to this object.
teaming_policy (pulumi.Input[str]) – The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, failover_explicit, or loadbalance_loadbased.
traffic_filter_override_allowed (pulumi.Input[bool]) – Allow any traffic filters on this port group to be overridden on an individual port.
tx_uplink (pulumi.Input[bool]) – If true, a copy of packets sent to the switch will always be forwarded to an uplink in addition to the regular packet forwarded done by the switch.
type (pulumi.Input[str]) – The port group type. Can be one of
earlyBinding(static binding) orephemeral. Default:earlyBinding.uplink_teaming_override_allowed (pulumi.Input[bool]) – Allow the uplink teaming options on this port group to be overridden on an individual port.
vlan_id (pulumi.Input[float]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_override_allowed (pulumi.Input[bool]) – Allow the VLAN settings on this port group to be overridden on an individual port.
vlan_ranges (pulumi.Input[list]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
The vlan_ranges object supports the following:
maxVlan(pulumi.Input[float])minVlan(pulumi.Input[float])
active_uplinks: pulumi.Output[list] = None¶List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
allow_forged_transmits: pulumi.Output[bool] = 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.
allow_mac_changes: pulumi.Output[bool] = None¶Controls whether or not the Media Access Control (MAC) address can be changed.
allow_promiscuous: pulumi.Output[bool] = None¶Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
auto_expand: pulumi.Output[bool] = None¶Allows the port group to create additional ports past the limit specified in
number_of_portsif necessary. Default:true.
block_all_ports: pulumi.Output[bool] = None¶Indicates whether to block all ports by default.
block_override_allowed: pulumi.Output[bool] = None¶Allow the port shutdown policy to be overridden on an individual port.
check_beacon: pulumi.Output[bool] = None¶Enable beacon probing on the ports this policy applies to.
config_version: pulumi.Output[str] = None¶Version string of the configuration that this spec is trying to change.
custom_attributes: pulumi.Output[dict] = None¶Map of custom attribute ids to attribute value string to set for port group.
description: pulumi.Output[str] = None¶An optional description for the port group.
directpath_gen2_allowed: pulumi.Output[bool] = None¶Allow VMDirectPath Gen2 on the ports this policy applies to.
distributed_virtual_switch_uuid: pulumi.Output[str] = None¶The ID of the DVS to add the port group to. Forces a new resource if changed.
egress_shaping_average_bandwidth: pulumi.Output[float] = None¶The average egress bandwidth in bits per second if egress shaping is enabled on the port.
egress_shaping_burst_size: pulumi.Output[float] = None¶The maximum egress burst size allowed in bytes if egress shaping is enabled on the port.
egress_shaping_enabled: pulumi.Output[bool] = None¶True if the traffic shaper is enabled for egress traffic on the port.
egress_shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak egress bandwidth during bursts in bits per second if egress traffic shaping is enabled on the port.
failback: pulumi.Output[bool] = None¶If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
ingress_shaping_average_bandwidth: pulumi.Output[float] = None¶The average ingress bandwidth in bits per second if ingress shaping is enabled on the port.
ingress_shaping_burst_size: pulumi.Output[float] = None¶The maximum ingress burst size allowed in bytes if ingress shaping is enabled on the port.
ingress_shaping_enabled: pulumi.Output[bool] = None¶True if the traffic shaper is enabled for ingress traffic on the port.
ingress_shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak ingress bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.
key: pulumi.Output[str] = None¶The generated UUID of the portgroup.
lacp_enabled: pulumi.Output[bool] = None¶Whether or not to enable LACP on all uplink ports.
lacp_mode: pulumi.Output[str] = None¶The uplink LACP mode to use. Can be one of active or passive.
live_port_moving_allowed: pulumi.Output[bool] = None¶Allow a port in this port group to be moved to another port group while it is connected.
name: pulumi.Output[str] = None¶The name of the port group.
netflow_enabled: pulumi.Output[bool] = None¶Indicates whether to enable netflow on all ports.
netflow_override_allowed: pulumi.Output[bool] = None¶Allow the Netflow policy on this port group to be overridden on an individual port.
network_resource_pool_key: pulumi.Output[str] = 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: pulumi.Output[bool] = None¶Allow the network resource pool set on this port group to be overridden on an individual port.
notify_switches: pulumi.Output[bool] = None¶If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
number_of_ports: pulumi.Output[float] = 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: pulumi.Output[bool] = None¶Reset a port’s settings to the settings defined on this port group policy when the port disconnects.
port_name_format: pulumi.Output[str] = None¶An optional formatting policy for naming of the ports in this port group. See the
portNameFormatattribute listed [here][ext-vsphere-portname-format] for details on the format syntax.
port_private_secondary_vlan_id: pulumi.Output[float] = None¶The secondary VLAN ID for this port.
security_policy_override_allowed: pulumi.Output[bool] = None¶Allow the security policy settings defined in this port group policy to be overridden on an individual port.
shaping_override_allowed: pulumi.Output[bool] = None¶Allow the traffic shaping options on this port group policy to be overridden on an individual port.
standby_uplinks: pulumi.Output[list] = None¶List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
A list of tag IDs to apply to this object.
teaming_policy: pulumi.Output[str] = None¶The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, failover_explicit, or loadbalance_loadbased.
traffic_filter_override_allowed: pulumi.Output[bool] = None¶Allow any traffic filters on this port group to be overridden on an individual port.
tx_uplink: pulumi.Output[bool] = None¶If true, a copy of packets sent to the switch will always be forwarded to an uplink in addition to the regular packet forwarded done by the switch.
type: pulumi.Output[str] = None¶The port group type. Can be one of
earlyBinding(static binding) orephemeral. Default:earlyBinding.
uplink_teaming_override_allowed: pulumi.Output[bool] = None¶Allow the uplink teaming options on this port group to be overridden on an individual port.
vlan_id: pulumi.Output[float] = None¶The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_override_allowed: pulumi.Output[bool] = None¶Allow the VLAN settings on this port group to be overridden on an individual port.
vlan_ranges: pulumi.Output[list] = None¶The VLAN ID for single VLAN mode. 0 denotes no VLAN.
maxVlan(float)minVlan(float)
- static
get(resource_name, id, 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, config_version=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, key=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)¶ Get an existing DistributedPortGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
active_uplinks (pulumi.Input[list]) – List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
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.
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.
auto_expand (pulumi.Input[bool]) – Allows the port group to create additional ports past the limit specified in
number_of_portsif necessary. Default:true.block_all_ports (pulumi.Input[bool]) – Indicates whether to block all ports by default.
block_override_allowed (pulumi.Input[bool]) – Allow the port shutdown policy to be overridden on an individual port.
check_beacon (pulumi.Input[bool]) – Enable beacon probing on the ports this policy applies to.
config_version (pulumi.Input[str]) – Version string of the configuration that this spec is trying to change.
custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value string to set for port group.
description (pulumi.Input[str]) – An optional description for the port group.
directpath_gen2_allowed (pulumi.Input[bool]) – Allow VMDirectPath Gen2 on the ports this policy applies to.
distributed_virtual_switch_uuid (pulumi.Input[str]) – The ID of the DVS to add the port group to. Forces a new resource if changed.
egress_shaping_average_bandwidth (pulumi.Input[float]) – The average egress bandwidth in bits per second if egress shaping is enabled on the port.
egress_shaping_burst_size (pulumi.Input[float]) – The maximum egress burst size allowed in bytes if egress shaping is enabled on the port.
egress_shaping_enabled (pulumi.Input[bool]) – True if the traffic shaper is enabled for egress traffic on the port.
egress_shaping_peak_bandwidth (pulumi.Input[float]) – The peak egress 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 interfaces higher in precedence when they come back up.
ingress_shaping_average_bandwidth (pulumi.Input[float]) – The average ingress bandwidth in bits per second if ingress shaping is enabled on the port.
ingress_shaping_burst_size (pulumi.Input[float]) – The maximum ingress burst size allowed in bytes if ingress shaping is enabled on the port.
ingress_shaping_enabled (pulumi.Input[bool]) – True if the traffic shaper is enabled for ingress traffic on the port.
ingress_shaping_peak_bandwidth (pulumi.Input[float]) – The peak ingress bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.
key (pulumi.Input[str]) – The generated UUID of the portgroup.
lacp_enabled (pulumi.Input[bool]) – Whether or not to enable LACP on all uplink ports.
lacp_mode (pulumi.Input[str]) – The uplink LACP mode to use. Can be one of active or passive.
live_port_moving_allowed (pulumi.Input[bool]) – Allow a port in this port group to be moved to another port group while it is connected.
name (pulumi.Input[str]) – The name of the port group.
netflow_enabled (pulumi.Input[bool]) – Indicates whether to enable netflow on all ports.
netflow_override_allowed (pulumi.Input[bool]) – Allow the Netflow policy on this port group to be overridden on an individual port.
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.
notify_switches (pulumi.Input[bool]) – If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
number_of_ports (pulumi.Input[float]) – 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 (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
portNameFormatattribute listed [here][ext-vsphere-portname-format] for details on the format syntax.port_private_secondary_vlan_id (pulumi.Input[float]) – The secondary VLAN ID for this port.
security_policy_override_allowed (pulumi.Input[bool]) – Allow the security policy settings defined in this port group policy to be overridden on an individual port.
shaping_override_allowed (pulumi.Input[bool]) – Allow the traffic shaping options on this port group policy to be overridden on an individual port.
standby_uplinks (pulumi.Input[list]) – List of active uplinks used for load balancing, matching the names of the uplinks assigned in the DVS.
tags (pulumi.Input[list]) – A list of tag IDs to apply to this object.
teaming_policy (pulumi.Input[str]) – The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, failover_explicit, or loadbalance_loadbased.
traffic_filter_override_allowed (pulumi.Input[bool]) – Allow any traffic filters on this port group to be overridden on an individual port.
tx_uplink (pulumi.Input[bool]) – If true, a copy of packets sent to the switch will always be forwarded to an uplink in addition to the regular packet forwarded done by the switch.
type (pulumi.Input[str]) – The port group type. Can be one of
earlyBinding(static binding) orephemeral. Default:earlyBinding.uplink_teaming_override_allowed (pulumi.Input[bool]) – Allow the uplink teaming options on this port group to be overridden on an individual port.
vlan_id (pulumi.Input[float]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_override_allowed (pulumi.Input[bool]) – Allow the VLAN settings on this port group to be overridden on an individual port.
vlan_ranges (pulumi.Input[list]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
The vlan_ranges object supports the following:
maxVlan(pulumi.Input[float])minVlan(pulumi.Input[float])
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, __props__=None, __name__=None, __opts__=None)¶ The
.DistributedVirtualSwitchresource 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
.DistributedPortGroupresource) 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.
import pulumi import pulumi_vsphere as vsphere dvs = vsphere.DistributedVirtualSwitch("dvs", active_uplinks=["tfup1"], datacenter_id=data[".Datacenter"]["dc"]["id"], standby_uplinks=["tfup2"], uplinks=[ "tfup1", "tfup2", ])
- 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
uplinksDVS 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.
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[float]) – The average bandwidth in bits per second if egress traffic shaping is enabled on the port.
egress_shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if egress traffic shaping is enabled on the port.
egress_shaping_enabled (pulumi.Input[bool]) –
trueif the traffic shaper is enabled on the port for egress traffic.egress_shaping_peak_bandwidth (pulumi.Input[float]) – 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.faulttolerance_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the faultTolerance traffic class, in Mbits/sec.
faulttolerance_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the faultTolerance traffic class, in Mbits/sec.
faulttolerance_share_count (pulumi.Input[float]) – The amount of shares to allocate to the faultTolerance traffic class for a custom share level.
faulttolerance_share_level (pulumi.Input[str]) – The allocation level for the faultTolerance traffic class. Can be one of high, low, normal, or custom.
folder (pulumi.Input[str]) – The folder to create the DVS in. Forces a new resource if changed.
hbr_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the hbr traffic class, in Mbits/sec.
hbr_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the hbr traffic class, in Mbits/sec.
hbr_share_count (pulumi.Input[float]) – The amount of shares to allocate to the hbr traffic class for a custom share level.
hbr_share_level (pulumi.Input[str]) – The allocation level for the hbr traffic class. Can be one of high, low, normal, or custom.
hosts (pulumi.Input[list]) – Use the
hostblock to declare a host specification. The options are:ingress_shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if ingress traffic shaping is enabled on the port.
ingress_shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if ingress traffic shaping is enabled on the port.
ingress_shaping_enabled (pulumi.Input[bool]) –
trueif the traffic shaper is enabled on the port for ingress traffic.ingress_shaping_peak_bandwidth (pulumi.Input[float]) – 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.
iscsi_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the iSCSI traffic class, in Mbits/sec.
iscsi_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the iSCSI traffic class, in Mbits/sec.
iscsi_share_count (pulumi.Input[float]) – The amount of shares to allocate to the iSCSI traffic class for a custom share level.
iscsi_share_level (pulumi.Input[str]) – The allocation level for the iSCSI traffic class. Can be one of high, low, normal, or custom.
lacp_api_version (pulumi.Input[str]) – The Link Aggregation Control Protocol group version to use with the switch. Possible values are
singleLagandmultipleLag.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
activeorpassive.link_discovery_operation (pulumi.Input[str]) – Whether to
advertiseorlistenfor link discovery traffic.link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are
cdpandlldp.management_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the management traffic class, in Mbits/sec.
management_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the management traffic class, in Mbits/sec.
management_share_count (pulumi.Input[float]) – The amount of shares to allocate to the management traffic class for a custom share level.
management_share_level (pulumi.Input[str]) – The allocation level for the management traffic class. Can be one of high, low, normal, or custom.
max_mtu (pulumi.Input[float]) – The maximum transmission unit (MTU) for the virtual switch.
multicast_filtering_mode (pulumi.Input[str]) – The multicast filtering mode to use with the switch. Can be one of
legacyFilteringorsnooping.name (pulumi.Input[str]) – The name of the distributed virtual switch.
netflow_active_flow_timeout (pulumi.Input[float]) – The number of seconds after which active flows are forced to be exported to the collector. Allowed range is
60to3600. 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[float]) – 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[float]) – The number of seconds after which idle flows are forced to be exported to the collector. Allowed range is
10to600. 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[float]) – The observation domain ID for the Netflow collector.
netflow_sampling_rate (pulumi.Input[float]) – 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 is1000, which indicates an analysis rate of 0.001%.network_resource_control_enabled (pulumi.Input[bool]) – Set to
trueto 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
version2orversion3. Default:version2.nfs_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the nfs traffic class, in Mbits/sec.
nfs_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the nfs traffic class, in Mbits/sec.
nfs_share_count (pulumi.Input[float]) – The amount of shares to allocate to the nfs traffic class for a custom share level.
nfs_share_level (pulumi.Input[str]) – The allocation level for the nfs traffic class. Can be one of high, low, normal, or custom.
notify_switches (pulumi.Input[bool]) – If
true, the teaming policy will notify the broadcast network of an uplink failover, triggering cache updates.port_private_secondary_vlan_id (pulumi.Input[float]) – 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
uplinksDVS argument. See here for more details.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
teaming_policy (pulumi.Input[str]) – The uplink teaming policy. Can be one of
loadbalance_ip,loadbalance_srcmac,loadbalance_srcid, orfailover_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.
vdp_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vdp traffic class, in Mbits/sec.
vdp_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vdp traffic class, in Mbits/sec.
vdp_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vdp traffic class for a custom share level.
vdp_share_level (pulumi.Input[str]) – The allocation level for the vdp traffic class. Can be one of high, low, normal, or custom.
version (pulumi.Input[str]) –
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.
virtualmachine_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the virtualMachine traffic class, in Mbits/sec.
virtualmachine_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the virtualMachine traffic class, in Mbits/sec.
virtualmachine_share_count (pulumi.Input[float]) – The amount of shares to allocate to the virtualMachine traffic class for a custom share level.
virtualmachine_share_level (pulumi.Input[str]) – The allocation level for the virtualMachine traffic class. Can be one of high, low, normal, or custom.
vlan_id (pulumi.Input[float]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_ranges (pulumi.Input[list]) – Used to denote VLAN trunking. Use the
min_vlanandmax_vlansub-arguments to define the tagged VLAN range. Multiplevlan_rangedefinitions are allowed, but they must not overlap. Example below:vmotion_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vmotion traffic class, in Mbits/sec.
vmotion_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec.
vmotion_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vmotion traffic class for a custom share level.
vmotion_share_level (pulumi.Input[str]) – The allocation level for the vmotion traffic class. Can be one of high, low, normal, or custom.
vsan_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vsan traffic class, in Mbits/sec.
vsan_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vsan traffic class, in Mbits/sec.
vsan_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vsan traffic class for a custom share level.
vsan_share_level (pulumi.Input[str]) – The allocation level for the vsan traffic class. Can be one of high, low, normal, or custom.
The hosts object supports the following:
devices(pulumi.Input[list]) - The list of NIC devices to map to uplinks on the DVS, added in order they are specified.host_system_id(pulumi.Input[str]) - The host system ID of the host to add to the DVS.
The vlan_ranges object supports the following:
maxVlan(pulumi.Input[float])minVlan(pulumi.Input[float])
active_uplinks: pulumi.Output[list] = None¶A list of active uplinks to be used in load balancing. These uplinks need to match the definitions in the
uplinksDVS argument. See here for more details.
allow_forged_transmits: pulumi.Output[bool] = 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: pulumi.Output[bool] = None¶Controls whether or not the Media Access Control (MAC) address can be changed.
allow_promiscuous: pulumi.Output[bool] = None¶Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
block_all_ports: pulumi.Output[bool] = 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: pulumi.Output[bool] = None¶Enables beacon probing as an additional measure to detect NIC failure.
config_version: pulumi.Output[str] = None¶The version string of the configuration that this spec is trying to change.
contact_detail: pulumi.Output[str] = None¶The detailed contact information for the person who is responsible for the DVS.
contact_name: pulumi.Output[str] = None¶The name of the person who is responsible for the DVS.
custom_attributes: pulumi.Output[dict] = None¶Map of custom attribute ids to attribute value strings to set for virtual switch.
datacenter_id: pulumi.Output[str] = None¶The ID of the datacenter where the distributed virtual switch will be created. Forces a new resource if changed.
description: pulumi.Output[str] = None¶A detailed description for the DVS.
directpath_gen2_allowed: pulumi.Output[bool] = None¶Allow VMDirectPath Gen2 for the ports for which this policy applies to.
egress_shaping_average_bandwidth: pulumi.Output[float] = None¶The average bandwidth in bits per second if egress traffic shaping is enabled on the port.
egress_shaping_burst_size: pulumi.Output[float] = None¶The maximum burst size allowed in bytes if egress traffic shaping is enabled on the port.
egress_shaping_enabled: pulumi.Output[bool] = None¶trueif the traffic shaper is enabled on the port for egress traffic.
egress_shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak bandwidth during bursts in bits per second if egress traffic shaping is enabled on the port.
failback: pulumi.Output[bool] = None¶If
true, the teaming policy will re-activate failed uplinks higher in precedence when they come back up.
faulttolerance_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the faultTolerance traffic class, in Mbits/sec.
faulttolerance_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the faultTolerance traffic class, in Mbits/sec.
The amount of shares to allocate to the faultTolerance traffic class for a custom share level.
The allocation level for the faultTolerance traffic class. Can be one of high, low, normal, or custom.
folder: pulumi.Output[str] = None¶The folder to create the DVS in. Forces a new resource if changed.
hbr_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the hbr traffic class, in Mbits/sec.
hbr_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the hbr traffic class, in Mbits/sec.
The amount of shares to allocate to the hbr traffic class for a custom share level.
The allocation level for the hbr traffic class. Can be one of high, low, normal, or custom.
hosts: pulumi.Output[list] = None¶Use the
hostblock to declare a host specification. The options are:devices(list) - The list of NIC devices to map to uplinks on the DVS, added in order they are specified.host_system_id(str) - The host system ID of the host to add to the DVS.
ingress_shaping_average_bandwidth: pulumi.Output[float] = None¶The average bandwidth in bits per second if ingress traffic shaping is enabled on the port.
ingress_shaping_burst_size: pulumi.Output[float] = None¶The maximum burst size allowed in bytes if ingress traffic shaping is enabled on the port.
ingress_shaping_enabled: pulumi.Output[bool] = None¶trueif the traffic shaper is enabled on the port for ingress traffic.
ingress_shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak bandwidth during bursts in bits per second if ingress traffic shaping is enabled on the port.
ipv4_address: pulumi.Output[str] = None¶An IPv4 address to identify the switch. This is mostly useful when used with the Netflow arguments found below.
iscsi_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the iSCSI traffic class, in Mbits/sec.
iscsi_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the iSCSI traffic class, in Mbits/sec.
The amount of shares to allocate to the iSCSI traffic class for a custom share level.
The allocation level for the iSCSI traffic class. Can be one of high, low, normal, or custom.
lacp_api_version: pulumi.Output[str] = None¶The Link Aggregation Control Protocol group version to use with the switch. Possible values are
singleLagandmultipleLag.
lacp_enabled: pulumi.Output[bool] = None¶Enables LACP for the ports that this policy applies to.
lacp_mode: pulumi.Output[str] = None¶The LACP mode. Can be one of
activeorpassive.
link_discovery_operation: pulumi.Output[str] = None¶Whether to
advertiseorlistenfor link discovery traffic.
link_discovery_protocol: pulumi.Output[str] = None¶The discovery protocol type. Valid types are
cdpandlldp.
management_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the management traffic class, in Mbits/sec.
management_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the management traffic class, in Mbits/sec.
The amount of shares to allocate to the management traffic class for a custom share level.
The allocation level for the management traffic class. Can be one of high, low, normal, or custom.
max_mtu: pulumi.Output[float] = None¶The maximum transmission unit (MTU) for the virtual switch.
multicast_filtering_mode: pulumi.Output[str] = None¶The multicast filtering mode to use with the switch. Can be one of
legacyFilteringorsnooping.
name: pulumi.Output[str] = None¶The name of the distributed virtual switch.
netflow_active_flow_timeout: pulumi.Output[float] = None¶The number of seconds after which active flows are forced to be exported to the collector. Allowed range is
60to3600. Default:60.
netflow_collector_ip_address: pulumi.Output[str] = 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: pulumi.Output[float] = None¶Port for the Netflow collector. This must be set before Netflow can be enabled.
netflow_enabled: pulumi.Output[bool] = None¶Enables Netflow on all ports that this policy applies to.
netflow_idle_flow_timeout: pulumi.Output[float] = None¶The number of seconds after which idle flows are forced to be exported to the collector. Allowed range is
10to600. Default:15.
netflow_internal_flows_only: pulumi.Output[bool] = None¶Whether to limit analysis to traffic that has both source and destination served by the same host. Default:
false.
netflow_observation_domain_id: pulumi.Output[float] = None¶The observation domain ID for the Netflow collector.
netflow_sampling_rate: pulumi.Output[float] = 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 is1000, which indicates an analysis rate of 0.001%.
network_resource_control_enabled: pulumi.Output[bool] = None¶Set to
trueto enable network I/O control. Default:false.
network_resource_control_version: pulumi.Output[str] = None¶The version of network I/O control to use. Can be one of
version2orversion3. Default:version2.
nfs_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the nfs traffic class, in Mbits/sec.
nfs_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the nfs traffic class, in Mbits/sec.
The amount of shares to allocate to the nfs traffic class for a custom share level.
The allocation level for the nfs traffic class. Can be one of high, low, normal, or custom.
notify_switches: pulumi.Output[bool] = None¶If
true, the teaming policy will notify the broadcast network of an uplink failover, triggering cache updates.
port_private_secondary_vlan_id: pulumi.Output[float] = None¶Used to define a secondary VLAN ID when using private VLANs.
standby_uplinks: pulumi.Output[list] = None¶A list of standby uplinks to be used in failover. These uplinks need to match the definitions in the
uplinksDVS argument. See here for more details.
The IDs of any tags to attach to this resource.
teaming_policy: pulumi.Output[str] = None¶The uplink teaming policy. Can be one of
loadbalance_ip,loadbalance_srcmac,loadbalance_srcid, orfailover_explicit.
tx_uplink: pulumi.Output[bool] = None¶Forward all traffic transmitted by ports for which this policy applies to its DVS uplinks.
uplinks: pulumi.Output[list] = None¶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.
vdp_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the vdp traffic class, in Mbits/sec.
vdp_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the vdp traffic class, in Mbits/sec.
The amount of shares to allocate to the vdp traffic class for a custom share level.
The allocation level for the vdp traffic class. Can be one of high, low, normal, or custom.
version: pulumi.Output[str] = 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.
virtualmachine_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the virtualMachine traffic class, in Mbits/sec.
virtualmachine_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the virtualMachine traffic class, in Mbits/sec.
The amount of shares to allocate to the virtualMachine traffic class for a custom share level.
The allocation level for the virtualMachine traffic class. Can be one of high, low, normal, or custom.
vlan_id: pulumi.Output[float] = None¶The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_ranges: pulumi.Output[list] = None¶Used to denote VLAN trunking. Use the
min_vlanandmax_vlansub-arguments to define the tagged VLAN range. Multiplevlan_rangedefinitions are allowed, but they must not overlap. Example below:maxVlan(float)minVlan(float)
vmotion_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the vmotion traffic class, in Mbits/sec.
vmotion_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec.
The amount of shares to allocate to the vmotion traffic class for a custom share level.
The allocation level for the vmotion traffic class. Can be one of high, low, normal, or custom.
vsan_maximum_mbit: pulumi.Output[float] = None¶The maximum allowed usage for the vsan traffic class, in Mbits/sec.
vsan_reservation_mbit: pulumi.Output[float] = None¶The amount of guaranteed bandwidth for the vsan traffic class, in Mbits/sec.
The amount of shares to allocate to the vsan traffic class for a custom share level.
The allocation level for the vsan traffic class. Can be one of high, low, normal, or custom.
- static
get(resource_name, id, opts=None, active_uplinks=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, block_all_ports=None, check_beacon=None, config_version=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)¶ Get an existing DistributedVirtualSwitch resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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
uplinksDVS 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.
config_version (pulumi.Input[str]) – The version string of the configuration that this spec is trying to change.
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.
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[float]) – The average bandwidth in bits per second if egress traffic shaping is enabled on the port.
egress_shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if egress traffic shaping is enabled on the port.
egress_shaping_enabled (pulumi.Input[bool]) –
trueif the traffic shaper is enabled on the port for egress traffic.egress_shaping_peak_bandwidth (pulumi.Input[float]) – 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.faulttolerance_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the faultTolerance traffic class, in Mbits/sec.
faulttolerance_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the faultTolerance traffic class, in Mbits/sec.
faulttolerance_share_count (pulumi.Input[float]) – The amount of shares to allocate to the faultTolerance traffic class for a custom share level.
faulttolerance_share_level (pulumi.Input[str]) – The allocation level for the faultTolerance traffic class. Can be one of high, low, normal, or custom.
folder (pulumi.Input[str]) – The folder to create the DVS in. Forces a new resource if changed.
hbr_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the hbr traffic class, in Mbits/sec.
hbr_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the hbr traffic class, in Mbits/sec.
hbr_share_count (pulumi.Input[float]) – The amount of shares to allocate to the hbr traffic class for a custom share level.
hbr_share_level (pulumi.Input[str]) – The allocation level for the hbr traffic class. Can be one of high, low, normal, or custom.
hosts (pulumi.Input[list]) – Use the
hostblock to declare a host specification. The options are:ingress_shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if ingress traffic shaping is enabled on the port.
ingress_shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if ingress traffic shaping is enabled on the port.
ingress_shaping_enabled (pulumi.Input[bool]) –
trueif the traffic shaper is enabled on the port for ingress traffic.ingress_shaping_peak_bandwidth (pulumi.Input[float]) – 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.
iscsi_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the iSCSI traffic class, in Mbits/sec.
iscsi_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the iSCSI traffic class, in Mbits/sec.
iscsi_share_count (pulumi.Input[float]) – The amount of shares to allocate to the iSCSI traffic class for a custom share level.
iscsi_share_level (pulumi.Input[str]) – The allocation level for the iSCSI traffic class. Can be one of high, low, normal, or custom.
lacp_api_version (pulumi.Input[str]) – The Link Aggregation Control Protocol group version to use with the switch. Possible values are
singleLagandmultipleLag.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
activeorpassive.link_discovery_operation (pulumi.Input[str]) – Whether to
advertiseorlistenfor link discovery traffic.link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are
cdpandlldp.management_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the management traffic class, in Mbits/sec.
management_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the management traffic class, in Mbits/sec.
management_share_count (pulumi.Input[float]) – The amount of shares to allocate to the management traffic class for a custom share level.
management_share_level (pulumi.Input[str]) – The allocation level for the management traffic class. Can be one of high, low, normal, or custom.
max_mtu (pulumi.Input[float]) – The maximum transmission unit (MTU) for the virtual switch.
multicast_filtering_mode (pulumi.Input[str]) – The multicast filtering mode to use with the switch. Can be one of
legacyFilteringorsnooping.name (pulumi.Input[str]) – The name of the distributed virtual switch.
netflow_active_flow_timeout (pulumi.Input[float]) – The number of seconds after which active flows are forced to be exported to the collector. Allowed range is
60to3600. 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[float]) – 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[float]) – The number of seconds after which idle flows are forced to be exported to the collector. Allowed range is
10to600. 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[float]) – The observation domain ID for the Netflow collector.
netflow_sampling_rate (pulumi.Input[float]) – 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 is1000, which indicates an analysis rate of 0.001%.network_resource_control_enabled (pulumi.Input[bool]) – Set to
trueto 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
version2orversion3. Default:version2.nfs_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the nfs traffic class, in Mbits/sec.
nfs_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the nfs traffic class, in Mbits/sec.
nfs_share_count (pulumi.Input[float]) – The amount of shares to allocate to the nfs traffic class for a custom share level.
nfs_share_level (pulumi.Input[str]) – The allocation level for the nfs traffic class. Can be one of high, low, normal, or custom.
notify_switches (pulumi.Input[bool]) – If
true, the teaming policy will notify the broadcast network of an uplink failover, triggering cache updates.port_private_secondary_vlan_id (pulumi.Input[float]) – 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
uplinksDVS argument. See here for more details.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
teaming_policy (pulumi.Input[str]) – The uplink teaming policy. Can be one of
loadbalance_ip,loadbalance_srcmac,loadbalance_srcid, orfailover_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.
vdp_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vdp traffic class, in Mbits/sec.
vdp_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vdp traffic class, in Mbits/sec.
vdp_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vdp traffic class for a custom share level.
vdp_share_level (pulumi.Input[str]) – The allocation level for the vdp traffic class. Can be one of high, low, normal, or custom.
version (pulumi.Input[str]) –
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.
virtualmachine_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the virtualMachine traffic class, in Mbits/sec.
virtualmachine_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the virtualMachine traffic class, in Mbits/sec.
virtualmachine_share_count (pulumi.Input[float]) – The amount of shares to allocate to the virtualMachine traffic class for a custom share level.
virtualmachine_share_level (pulumi.Input[str]) – The allocation level for the virtualMachine traffic class. Can be one of high, low, normal, or custom.
vlan_id (pulumi.Input[float]) – The VLAN ID for single VLAN mode. 0 denotes no VLAN.
vlan_ranges (pulumi.Input[list]) – Used to denote VLAN trunking. Use the
min_vlanandmax_vlansub-arguments to define the tagged VLAN range. Multiplevlan_rangedefinitions are allowed, but they must not overlap. Example below:vmotion_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vmotion traffic class, in Mbits/sec.
vmotion_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec.
vmotion_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vmotion traffic class for a custom share level.
vmotion_share_level (pulumi.Input[str]) – The allocation level for the vmotion traffic class. Can be one of high, low, normal, or custom.
vsan_maximum_mbit (pulumi.Input[float]) – The maximum allowed usage for the vsan traffic class, in Mbits/sec.
vsan_reservation_mbit (pulumi.Input[float]) – The amount of guaranteed bandwidth for the vsan traffic class, in Mbits/sec.
vsan_share_count (pulumi.Input[float]) – The amount of shares to allocate to the vsan traffic class for a custom share level.
vsan_share_level (pulumi.Input[str]) – The allocation level for the vsan traffic class. Can be one of high, low, normal, or custom.
The hosts object supports the following:
devices(pulumi.Input[list]) - The list of NIC devices to map to uplinks on the DVS, added in order they are specified.host_system_id(pulumi.Input[str]) - The host system ID of the host to add to the DVS.
The vlan_ranges object supports the following:
maxVlan(pulumi.Input[float])minVlan(pulumi.Input[float])
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, __props__=None, __name__=None, __opts__=None)¶ The
.DpmHostOverrideresource 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 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
manualorautomated. Default:manual.dpm_enabled (pulumi.Input[bool]) – Enable DPM support for this host. Default:
false.host_system_id (pulumi.Input[str]) – The managed object ID of the host.
compute_cluster_id: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
dpm_automation_level: pulumi.Output[str] = None¶The automation level for host power operations on this host. Can be one of
manualorautomated. Default:manual.
dpm_enabled: pulumi.Output[bool] = None¶Enable DPM support for this host. Default:
false.
host_system_id: pulumi.Output[str] = None¶The managed object ID of the host.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, dpm_automation_level=None, dpm_enabled=None, host_system_id=None)¶ Get an existing DpmHostOverride resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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
manualorautomated. Default:manual.dpm_enabled (pulumi.Input[bool]) – Enable DPM support for this host. Default:
false.host_system_id (pulumi.Input[str]) – The managed object ID of the host.
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, __props__=None, __name__=None, __opts__=None)¶ The
.DrsVmOverrideresource 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.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") host = vsphere.get_host(datacenter_id=dc.id, name="esxi1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = vsphere.VirtualMachine("vm", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", host_system_id=host.id, memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id) drs_vm_override = vsphere.DrsVmOverride("drsVmOverride", compute_cluster_id=cluster.id, drs_enabled=False, virtual_machine_id=vm.id)
- 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 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, orfullyAutomated. Default:manual.drs_enabled (pulumi.Input[bool]) – Overrides the default DRS setting for this virtual machine. Can be either
trueorfalse. 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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
drs_automation_level: pulumi.Output[str] = None¶Overrides the automation level for this virtual machine in the cluster. Can be one of
manual,partiallyAutomated, orfullyAutomated. Default:manual.
drs_enabled: pulumi.Output[bool] = None¶Overrides the default DRS setting for this virtual machine. Can be either
trueorfalse. Default:false.
virtual_machine_id: pulumi.Output[str] = None¶The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- static
get(resource_name, id, opts=None, compute_cluster_id=None, drs_automation_level=None, drs_enabled=None, virtual_machine_id=None)¶ Get an existing DrsVmOverride resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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, orfullyAutomated. Default:manual.drs_enabled (pulumi.Input[bool]) – Overrides the default DRS setting for this virtual machine. Can be either
trueorfalse. 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.Fileresource can be used to upload files (such as virtual disk files) from the host machine that this provider 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, ordestination_filewill move the managed file a new destination based on the values of the new settings. If any source parameter is changed, such assource_datastore,source_datacenterorsource_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.import pulumi import pulumi_vsphere as vsphere ubuntu_disk_upload = vsphere.File("ubuntuDiskUpload", datacenter="my_datacenter", datastore="local", destination_file="/my_path/disks/custom_ubuntu.vmdk", source_file="/home/ubuntu/my_disks/custom_ubuntu.vmdk")
import pulumi import pulumi_vsphere as vsphere ubuntu_disk_copy = vsphere.File("ubuntuDiskCopy", datacenter="my_datacenter", datastore="local", destination_file="/my_path/custom_ubuntu_id.vmdk", source_datacenter="my_datacenter", source_datastore="local", source_file="/my_path/disks/custom_ubuntu.vmdk")
- 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_filepath 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 host to vSphere or copied within vSphere. Forces a new resource if changed.
create_directories: pulumi.Output[bool] = None¶Create directories in
destination_filepath parameter if any missing for copy operation.
datacenter: pulumi.Output[str] = None¶The name of a datacenter in which the file will be uploaded to.
datastore: pulumi.Output[str] = None¶The name of the datastore in which to upload the file to.
destination_file: pulumi.Output[str] = None¶The path to where the file should be uploaded or copied to on vSphere.
source_datacenter: pulumi.Output[str] = None¶The name of a datacenter in which the file will be copied from. Forces a new resource if changed.
source_datastore: pulumi.Output[str] = None¶The name of the datastore in which file will be copied from. Forces a new resource if changed.
source_file: pulumi.Output[str] = None¶The path to the file being uploaded from the host to vSphere or copied within vSphere. Forces a new resource if changed.
- static
get(resource_name, id, opts=None, create_directories=None, datacenter=None, datastore=None, destination_file=None, source_datacenter=None, source_datastore=None, source_file=None)¶ Get an existing File resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
create_directories (pulumi.Input[bool]) – Create directories in
destination_filepath 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 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, __props__=None, __name__=None, __opts__=None)¶ The
.Folderresource 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, sofoo/barwill create a folder namedbarin the parent folderfoo, as long as that folder exists.import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter() folder = vsphere.Folder("folder", datacenter_id=dc.id, path="test-folder", type="vm")
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter() parent = vsphere.Folder("parent", datacenter_id=dc.id, path="test-parent", type="vm") folder = vsphere.Folder("folder", datacenter_id=dc.id, path=parent.path.apply(lambda path: f"{path}/test-folder"), type="vm")
- 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 typevm(denoting a virtual machine folder), and a supplied folder oftest-folder, the resulting path would be/default-dc/vm/test-folder.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
type (pulumi.Input[str]) – The type of folder to create. Allowed options are
datacenterfor datacenter folders,hostfor host and cluster folders,vmfor virtual machine folders,datastorefor datastore folders, andnetworkfor network folders. Forces a new resource if changed.
custom_attributes: pulumi.Output[dict] = 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: pulumi.Output[str] = 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: pulumi.Output[str] = 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 typevm(denoting a virtual machine folder), and a supplied folder oftest-folder, the resulting path would be/default-dc/vm/test-folder.
The IDs of any tags to attach to this resource.
type: pulumi.Output[str] = None¶The type of folder to create. Allowed options are
datacenterfor datacenter folders,hostfor host and cluster folders,vmfor virtual machine folders,datastorefor datastore folders, andnetworkfor network folders. Forces a new resource if changed.
- static
get(resource_name, id, opts=None, custom_attributes=None, datacenter_id=None, path=None, tags=None, type=None)¶ Get an existing Folder resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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 typevm(denoting a virtual machine folder), and a supplied folder oftest-folder, the resulting path would be/default-dc/vm/test-folder.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
type (pulumi.Input[str]) – The type of folder to create. Allowed options are
datacenterfor datacenter folders,hostfor host and cluster folders,vmfor virtual machine folders,datastorefor datastore folders, andnetworkfor 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(datacenter_id=None, id=None, name=None, resource_pool_id=None)¶ A collection of values returned by getComputeCluster.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetContentLibraryItemResult(id=None, library_id=None, name=None)¶ A collection of values returned by getContentLibraryItem.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetContentLibraryResult(id=None, name=None)¶ A collection of values returned by getContentLibrary.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetCustomAttributeResult(id=None, managed_object_type=None, name=None)¶ A collection of values returned by getCustomAttribute.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetDatacenterResult(id=None, name=None)¶ A collection of values returned by getDatacenter.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetDatastoreClusterResult(datacenter_id=None, id=None, name=None)¶ A collection of values returned by getDatastoreCluster.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetDatastoreResult(datacenter_id=None, id=None, name=None)¶ A collection of values returned by getDatastore.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetDistributedVirtualSwitchResult(datacenter_id=None, id=None, name=None, uplinks=None)¶ A collection of values returned by getDistributedVirtualSwitch.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetDynamicResult(filters=None, id=None, name_regex=None, type=None)¶ A collection of values returned by getDynamic.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetFolderResult(id=None, path=None)¶ A collection of values returned by getFolder.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetHostPciDeviceResult(class_id=None, host_id=None, id=None, name=None, name_regex=None, vendor_id=None)¶ A collection of values returned by getHostPciDevice.
id= None¶The provider-assigned unique ID for this managed resource.
name= None¶The name of the PCI device.
- class
pulumi_vsphere.GetHostResult(datacenter_id=None, id=None, name=None, resource_pool_id=None)¶ A collection of values returned by getHost.
id= None¶The provider-assigned unique ID for this managed resource.
resource_pool_id= None¶The managed object ID of the host’s root resource pool.
- class
pulumi_vsphere.GetNetworkResult(datacenter_id=None, distributed_virtual_switch_uuid=None, id=None, name=None, type=None)¶ A collection of values returned by getNetwork.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetPolicyResult(id=None, name=None)¶ A collection of values returned by getPolicy.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetResourcePoolResult(datacenter_id=None, id=None, name=None)¶ A collection of values returned by getResourcePool.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetTagCategoryResult(associable_types=None, cardinality=None, description=None, id=None, name=None)¶ A collection of values returned by getTagCategory.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetTagResult(category_id=None, description=None, id=None, name=None)¶ A collection of values returned by getTag.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetVappContainerResult(datacenter_id=None, id=None, name=None)¶ A collection of values returned by getVappContainer.
id= None¶The provider-assigned unique ID for this managed resource.
- class
pulumi_vsphere.GetVirtualMachineResult(alternate_guest_name=None, datacenter_id=None, disks=None, firmware=None, guest_id=None, guest_ip_addresses=None, id=None, ide_controller_scan_count=None, name=None, network_interface_types=None, sata_controller_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=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
.VirtualMachineresource 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 byscsi_controller_scan_countare scanned for disks. The sub-attributes are:
firmware= None¶The firmware type for this virtual machine. Can be
biosorefi.
guest_id= None¶The guest ID of the virtual machine or template.
guest_ip_addresses= None¶A list of IP addresses as reported by VMWare tools.
id= None¶The provider-assigned unique ID for this managed resource.
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, orvmxnet3.
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_countare 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), ormixedwhen there are multiple controller types. Only the first number of controllers defined byscsi_controller_scan_countare scanned.
- class
pulumi_vsphere.GetVmfsDisksResult(disks=None, filter=None, host_system_id=None, id=None, rescan=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¶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, __props__=None, __name__=None, __opts__=None)¶ The
.HaVmOverrideresource 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.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name="cluster1") network = vsphere.get_network(datacenter_id=dc.id, name="network1") vm = vsphere.VirtualMachine("vm", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=2048, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=cluster.resource_pool_id) ha_vm_override = vsphere.HaVmOverride("haVmOverride", compute_cluster_id=cluster.id, ha_vm_restart_priority="highest", virtual_machine_id=vm.id)
- 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 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,noneorreset. Default:useClusterDefault.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, orrestartAggressive. Default:clusterDefault.ha_datastore_apd_response_delay (pulumi.Input[float]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in
ha_datastore_apd_response. Use-1to use the cluster default. Default:-1.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, orrestartAggressive. Default:clusterDefault.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, orshutdown. Default:clusterIsolationResponse.ha_vm_failure_interval (pulumi.Input[float]) – 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[float]) – The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means 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[float]) – The maximum number of resets that HA will perform to this virtual machine when responding to a failure event. Default:
3ha_vm_minimum_uptime (pulumi.Input[float]) – 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, orvmAndAppMonitoring. 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 tofalseto 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, orhighest. Default:clusterRestartPriority.ha_vm_restart_timeout (pulumi.Input[float]) – The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use
-1to specify the cluster default. Default:-1.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: pulumi.Output[str] = None¶The managed object reference ID of the cluster to put the override in. Forces a new resource if changed.
ha_datastore_apd_recovery_action: pulumi.Output[str] = 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,noneorreset. Default:useClusterDefault.
ha_datastore_apd_response: pulumi.Output[str] = 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, orrestartAggressive. Default:clusterDefault.
ha_datastore_apd_response_delay: pulumi.Output[float] = 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-1to use the cluster default. Default:-1.
ha_datastore_pdl_response: pulumi.Output[str] = 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, orrestartAggressive. Default:clusterDefault.
ha_host_isolation_response: pulumi.Output[str] = 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, orshutdown. Default:clusterIsolationResponse.
ha_vm_failure_interval: pulumi.Output[float] = 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: pulumi.Output[float] = None¶The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means no window, meaning an unlimited reset time is allotted. The value is specified in seconds. Default:-1(no window).
ha_vm_maximum_resets: pulumi.Output[float] = 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: pulumi.Output[float] = 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: pulumi.Output[str] = None¶The type of virtual machine monitoring to use when HA is enabled in the cluster. Can be one of
vmMonitoringDisabled,vmMonitoringOnly, orvmAndAppMonitoring. Default:vmMonitoringDisabled.
ha_vm_monitoring_use_cluster_defaults: pulumi.Output[bool] = 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 tofalseto have overrides take effect.
ha_vm_restart_priority: pulumi.Output[str] = None¶The restart priority for the virtual machine when vSphere detects a host failure. Can be one of
clusterRestartPriority,lowest,low,medium,high, orhighest. Default:clusterRestartPriority.
ha_vm_restart_timeout: pulumi.Output[float] = None¶The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use
-1to specify the cluster default. Default:-1.
virtual_machine_id: pulumi.Output[str] = None¶The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- static
get(resource_name, id, 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)¶ Get an existing HaVmOverride resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
compute_cluster_id (pulumi.Input[str]) – The managed object reference ID 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,noneorreset. Default:useClusterDefault.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, orrestartAggressive. Default:clusterDefault.ha_datastore_apd_response_delay (pulumi.Input[float]) – Controls the delay in minutes to wait after an APD timeout event to execute the response action defined in
ha_datastore_apd_response. Use-1to use the cluster default. Default:-1.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, orrestartAggressive. Default:clusterDefault.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, orshutdown. Default:clusterIsolationResponse.ha_vm_failure_interval (pulumi.Input[float]) – 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[float]) – The length of the reset window in which
ha_vm_maximum_resetscan operate. When this window expires, no more resets are attempted regardless of the setting configured inha_vm_maximum_resets.-1means 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[float]) – The maximum number of resets that HA will perform to this virtual machine when responding to a failure event. Default:
3ha_vm_minimum_uptime (pulumi.Input[float]) – 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, orvmAndAppMonitoring. 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 tofalseto 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, orhighest. Default:clusterRestartPriority.ha_vm_restart_timeout (pulumi.Input[float]) – The maximum time, in seconds, that vSphere HA will wait for this virtual machine to be ready. Use
-1to specify the cluster default. Default:-1.virtual_machine_id (pulumi.Input[str]) – 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.Host(resource_name, opts=None, cluster=None, cluster_managed=None, connected=None, datacenter=None, force=None, hostname=None, license=None, lockdown=None, maintenance=None, password=None, thumbprint=None, username=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VMware vSphere host resource. This represents an ESXi host that can be used either as part of a Compute Cluster or Standalone.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="my-datacenter") h1 = vsphere.Host("h1", hostname="10.10.10.1", username="root", password="password", license="00000-00000-00000-00000i-00000", datacenter=dc.id)
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="TfDatacenter") c1 = vsphere.get_compute_cluster(name="DC0_C0", datacenter_id=dc.id) h1 = vsphere.Host("h1", hostname="10.10.10.1", username="root", password="password", license="00000-00000-00000-00000i-00000", cluster=c1.id)
An existing host can be imported into this resource via supplying the host’s ID. An example is below:
import pulumi
The above would import the host with ID
host-123.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cluster (pulumi.Input[str]) – The ID of the Compute Cluster this host should be added to. This should not be set if
datacenteris set. Conflicts with:cluster.cluster_managed (pulumi.Input[bool]) – Can be set to
trueif compute cluster membership will be managed through thecompute_clusterresource rather than thehostresource. Conflicts with:cluster.connected (pulumi.Input[bool]) – If set to false then the host will be disconected. Default is
false.datacenter (pulumi.Input[str]) – The ID of the datacenter this host should be added to. This should not be set if
clusteris set.force (pulumi.Input[bool]) – If set to true then it will force the host to be added, even if the host is already connected to a different vSphere instance. Default is
falsehostname (pulumi.Input[str]) – FQDN or IP address of the host to be added.
license (pulumi.Input[str]) – The license key that will be applied to the host. The license key is expected to be present in vSphere.
lockdown (pulumi.Input[str]) – Set the lockdown state of the host. Valid options are
disabled,normal, andstrict. Default isdisabled.maintenance (pulumi.Input[bool]) – Set the management state of the host. Default is
false.password (pulumi.Input[str]) – Password that will be used by vSphere to authenticate to the host.
thumbprint (pulumi.Input[str]) – Host’s certificate SHA-1 thumbprint. If not set the the CA that signed the host’s certificate should be trusted. If the CA is not trusted and no thumbprint is set then the operation will fail.
username (pulumi.Input[str]) – Username that will be used by vSphere to authenticate to the host.
cluster: pulumi.Output[str] = None¶The ID of the Compute Cluster this host should be added to. This should not be set if
datacenteris set. Conflicts with:cluster.
cluster_managed: pulumi.Output[bool] = None¶Can be set to
trueif compute cluster membership will be managed through thecompute_clusterresource rather than thehostresource. Conflicts with:cluster.
connected: pulumi.Output[bool] = None¶If set to false then the host will be disconected. Default is
false.
datacenter: pulumi.Output[str] = None¶The ID of the datacenter this host should be added to. This should not be set if
clusteris set.
force: pulumi.Output[bool] = None¶If set to true then it will force the host to be added, even if the host is already connected to a different vSphere instance. Default is
false
hostname: pulumi.Output[str] = None¶FQDN or IP address of the host to be added.
license: pulumi.Output[str] = None¶The license key that will be applied to the host. The license key is expected to be present in vSphere.
lockdown: pulumi.Output[str] = None¶Set the lockdown state of the host. Valid options are
disabled,normal, andstrict. Default isdisabled.
maintenance: pulumi.Output[bool] = None¶Set the management state of the host. Default is
false.
password: pulumi.Output[str] = None¶Password that will be used by vSphere to authenticate to the host.
thumbprint: pulumi.Output[str] = None¶Host’s certificate SHA-1 thumbprint. If not set the the CA that signed the host’s certificate should be trusted. If the CA is not trusted and no thumbprint is set then the operation will fail.
username: pulumi.Output[str] = None¶Username that will be used by vSphere to authenticate to the host.
- static
get(resource_name, id, opts=None, cluster=None, cluster_managed=None, connected=None, datacenter=None, force=None, hostname=None, license=None, lockdown=None, maintenance=None, password=None, thumbprint=None, username=None)¶ Get an existing Host resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cluster (pulumi.Input[str]) – The ID of the Compute Cluster this host should be added to. This should not be set if
datacenteris set. Conflicts with:cluster.cluster_managed (pulumi.Input[bool]) – Can be set to
trueif compute cluster membership will be managed through thecompute_clusterresource rather than thehostresource. Conflicts with:cluster.connected (pulumi.Input[bool]) – If set to false then the host will be disconected. Default is
false.datacenter (pulumi.Input[str]) – The ID of the datacenter this host should be added to. This should not be set if
clusteris set.force (pulumi.Input[bool]) – If set to true then it will force the host to be added, even if the host is already connected to a different vSphere instance. Default is
falsehostname (pulumi.Input[str]) – FQDN or IP address of the host to be added.
license (pulumi.Input[str]) – The license key that will be applied to the host. The license key is expected to be present in vSphere.
lockdown (pulumi.Input[str]) – Set the lockdown state of the host. Valid options are
disabled,normal, andstrict. Default isdisabled.maintenance (pulumi.Input[bool]) – Set the management state of the host. Default is
false.password (pulumi.Input[str]) – Password that will be used by vSphere to authenticate to the host.
thumbprint (pulumi.Input[str]) – Host’s certificate SHA-1 thumbprint. If not set the the CA that signed the host’s certificate should be trusted. If the CA is not trusted and no thumbprint is set then the operation will fail.
username (pulumi.Input[str]) – Username that will be used by vSphere to authenticate to the host.
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, __props__=None, __name__=None, __opts__=None)¶ The
.HostPortGroupresource 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.HostVirtualSwitchresource.For an overview on vSphere networking concepts, see this page.
import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") esxi_host = vsphere.get_host(datacenter_id=datacenter.id, name="esxi1") switch = vsphere.HostVirtualSwitch("switch", active_nics=["vmnic0"], host_system_id=esxi_host.id, network_adapters=[ "vmnic0", "vmnic1", ], standby_nics=["vmnic1"]) pg = vsphere.HostPortGroup("pg", host_system_id=esxi_host.id, virtual_switch_name=switch.name)
import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") esxi_host = vsphere.get_host(datacenter_id=datacenter.id, name="esxi1") switch = vsphere.HostVirtualSwitch("switch", active_nics=["vmnic0"], host_system_id=esxi_host.id, network_adapters=[ "vmnic0", "vmnic1", ], standby_nics=["vmnic1"]) pg = vsphere.HostPortGroup("pg", allow_promiscuous=True, host_system_id=esxi_host.id, virtual_switch_name=switch.name, vlan_id=4095)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
active_nics (pulumi.Input[list]) – 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.
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.
check_beacon (pulumi.Input[bool]) – Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
failback (pulumi.Input[bool]) – If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
host_system_id (pulumi.Input[str]) – The managed object ID of the host to set the port group up on. Forces a new resource if changed.
name (pulumi.Input[str]) – The name of the port group. Forces a new resource if changed.
notify_switches (pulumi.Input[bool]) – If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if traffic shaping is enabled.
shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if traffic shaping is enabled.
shaping_enabled (pulumi.Input[bool]) – Enable traffic shaping on this virtual switch or port group.
shaping_peak_bandwidth (pulumi.Input[float]) – The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standby_nics (pulumi.Input[list]) – 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.
virtual_switch_name (pulumi.Input[str]) – The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlan_id (pulumi.Input[float]) – The VLAN ID/trunk mode for this port group. An ID of
0denotes no tagging, an ID of1-4094tags with the specific ID, and an ID of4095enables trunk mode, allowing the guest to manage its own tagging. Default:0.
active_nics: pulumi.Output[list] = None¶List of active network adapters used for load balancing.
allow_forged_transmits: pulumi.Output[bool] = 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.
allow_mac_changes: pulumi.Output[bool] = None¶Controls whether or not the Media Access Control (MAC) address can be changed.
allow_promiscuous: pulumi.Output[bool] = None¶Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
check_beacon: pulumi.Output[bool] = None¶Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computed_policy: pulumi.Output[dict] = None¶A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback: pulumi.Output[bool] = None¶If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
host_system_id: pulumi.Output[str] = None¶The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key: pulumi.Output[str] = None¶The key for this port group as returned from the vSphere API.
name: pulumi.Output[str] = None¶The name of the port group. Forces a new resource if changed.
notify_switches: pulumi.Output[bool] = None¶If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports: pulumi.Output[dict] = None¶A list of ports that currently exist and are used on this port group.
key(str) - The key for this port group as returned from the vSphere API.macAddresses(list)type(str)
shaping_average_bandwidth: pulumi.Output[float] = None¶The average bandwidth in bits per second if traffic shaping is enabled.
shaping_burst_size: pulumi.Output[float] = None¶The maximum burst size allowed in bytes if traffic shaping is enabled.
shaping_enabled: pulumi.Output[bool] = None¶Enable traffic shaping on this virtual switch or port group.
shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standby_nics: pulumi.Output[list] = None¶List of standby network adapters used for failover.
teaming_policy: pulumi.Output[str] = None¶The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
virtual_switch_name: pulumi.Output[str] = None¶The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlan_id: pulumi.Output[float] = None¶The VLAN ID/trunk mode for this port group. An ID of
0denotes no tagging, an ID of1-4094tags with the specific ID, and an ID of4095enables trunk mode, allowing the guest to manage its own tagging. Default:0.
- static
get(resource_name, id, opts=None, active_nics=None, allow_forged_transmits=None, allow_mac_changes=None, allow_promiscuous=None, check_beacon=None, computed_policy=None, failback=None, host_system_id=None, key=None, name=None, notify_switches=None, ports=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)¶ Get an existing HostPortGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
active_nics (pulumi.Input[list]) – 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.
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.
check_beacon (pulumi.Input[bool]) – Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computed_policy (pulumi.Input[dict]) – A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback (pulumi.Input[bool]) – If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
host_system_id (pulumi.Input[str]) – The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key (pulumi.Input[str]) – The key for this port group as returned from the vSphere API.
name (pulumi.Input[str]) – The name of the port group. Forces a new resource if changed.
notify_switches (pulumi.Input[bool]) – If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports (pulumi.Input[dict]) – A list of ports that currently exist and are used on this port group.
shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if traffic shaping is enabled.
shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if traffic shaping is enabled.
shaping_enabled (pulumi.Input[bool]) – Enable traffic shaping on this virtual switch or port group.
shaping_peak_bandwidth (pulumi.Input[float]) – The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standby_nics (pulumi.Input[list]) – 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.
virtual_switch_name (pulumi.Input[str]) – The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlan_id (pulumi.Input[float]) – The VLAN ID/trunk mode for this port group. An ID of
0denotes no tagging, an ID of1-4094tags with the specific ID, and an ID of4095enables trunk mode, allowing the guest to manage its own tagging. Default:0.
The ports object supports the following:
key(pulumi.Input[str]) - The key for this port group as returned from the vSphere API.macAddresses(pulumi.Input[list])type(pulumi.Input[str])
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, __props__=None, __name__=None, __opts__=None)¶ Create a HostVirtualSwitch resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[list] active_nics: The list of active network adapters used for load
balancing.
- Parameters
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[float]) – The interval, in seconds, that a NIC beacon packet is sent out. This can be used with
check_beaconto offer link failure capability beyond link status only. Default:1.check_beacon (pulumi.Input[bool]) – Enable beacon probing - this requires that the
beacon_intervaloption has been set in the bridge options. If this is set tofalse, 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 of the host to set the virtual switch up on. Forces a new resource if changed.
link_discovery_operation (pulumi.Input[str]) – Whether to
advertiseorlistenfor link discovery traffic. Default:listen.link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are
cpdandlldp. Default:cdp.mtu (pulumi.Input[float]) – 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[float]) – The number of ports to create with this virtual switch. Default:
128.shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if traffic shaping is enabled. Default:
0shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if shaping is enabled. Default:
0shaping_enabled (pulumi.Input[bool]) – Set to
trueto enable the traffic shaper for ports managed by this virtual switch. Default:false.shaping_peak_bandwidth (pulumi.Input[float]) – The peak bandwidth during bursts in bits per second if traffic shaping is enabled. Default:
0standby_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, orfailover_explicit. Default:loadbalance_srcid.
active_nics: pulumi.Output[list] = None¶The list of active network adapters used for load balancing.
allow_forged_transmits: pulumi.Output[bool] = 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: pulumi.Output[bool] = None¶Controls whether or not the Media Access Control (MAC) address can be changed. Default:
true.
allow_promiscuous: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The interval, in seconds, that a NIC beacon packet is sent out. This can be used with
check_beaconto offer link failure capability beyond link status only. Default:1.
check_beacon: pulumi.Output[bool] = None¶Enable beacon probing - this requires that the
beacon_intervaloption has been set in the bridge options. If this is set tofalse, only link status is used to check for failed NICs. Default:false.
failback: pulumi.Output[bool] = 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: pulumi.Output[str] = None¶The managed object ID of the host to set the virtual switch up on. Forces a new resource if changed.
link_discovery_operation: pulumi.Output[str] = None¶Whether to
advertiseorlistenfor link discovery traffic. Default:listen.
link_discovery_protocol: pulumi.Output[str] = None¶The discovery protocol type. Valid types are
cpdandlldp. Default:cdp.
mtu: pulumi.Output[float] = None¶The maximum transmission unit (MTU) for the virtual switch. Default:
1500.
name: pulumi.Output[str] = None¶The name of the virtual switch. Forces a new resource if changed.
network_adapters: pulumi.Output[list] = None¶The network interfaces to bind to the bridge.
notify_switches: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The number of ports to create with this virtual switch. Default:
128.
shaping_average_bandwidth: pulumi.Output[float] = None¶The average bandwidth in bits per second if traffic shaping is enabled. Default:
0
shaping_burst_size: pulumi.Output[float] = None¶The maximum burst size allowed in bytes if shaping is enabled. Default:
0
shaping_enabled: pulumi.Output[bool] = None¶Set to
trueto enable the traffic shaper for ports managed by this virtual switch. Default:false.
shaping_peak_bandwidth: pulumi.Output[float] = None¶The peak bandwidth during bursts in bits per second if traffic shaping is enabled. Default:
0
standby_nics: pulumi.Output[list] = None¶The list of standby network adapters used for failover.
teaming_policy: pulumi.Output[str] = None¶The network adapter teaming policy. Can be one of
loadbalance_ip,loadbalance_srcmac,loadbalance_srcid, orfailover_explicit. Default:loadbalance_srcid.
- static
get(resource_name, id, 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)¶ Get an existing HostVirtualSwitch resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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[float]) – The interval, in seconds, that a NIC beacon packet is sent out. This can be used with
check_beaconto offer link failure capability beyond link status only. Default:1.check_beacon (pulumi.Input[bool]) – Enable beacon probing - this requires that the
beacon_intervaloption has been set in the bridge options. If this is set tofalse, 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 of the host to set the virtual switch up on. Forces a new resource if changed.
link_discovery_operation (pulumi.Input[str]) – Whether to
advertiseorlistenfor link discovery traffic. Default:listen.link_discovery_protocol (pulumi.Input[str]) – The discovery protocol type. Valid types are
cpdandlldp. Default:cdp.mtu (pulumi.Input[float]) – 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[float]) – The number of ports to create with this virtual switch. Default:
128.shaping_average_bandwidth (pulumi.Input[float]) – The average bandwidth in bits per second if traffic shaping is enabled. Default:
0shaping_burst_size (pulumi.Input[float]) – The maximum burst size allowed in bytes if shaping is enabled. Default:
0shaping_enabled (pulumi.Input[bool]) – Set to
trueto enable the traffic shaper for ports managed by this virtual switch. Default:false.shaping_peak_bandwidth (pulumi.Input[float]) – The peak bandwidth during bursts in bits per second if traffic shaping is enabled. Default:
0standby_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, orfailover_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, __props__=None, __name__=None, __opts__=None)¶ Provides a VMware vSphere license resource. This can be used to add and remove license keys.
import pulumi import pulumi_vsphere as vsphere license_key = vsphere.License("licenseKey", labels={ "VpxClientLicenseLabel": "Hello World", "Workflow": "Hello World", }, license_key="452CQ-2EK54-K8742-00000-00000")
- 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: pulumi.Output[str] = None¶The product edition of the license key.
labels: pulumi.Output[dict] = None¶A map of key/value pairs to be attached as labels (tags) to the license key.
license_key: pulumi.Output[str] = None¶The license key to add.
name: pulumi.Output[str] = None¶The display name for the license.
total: pulumi.Output[float] = None¶Total number of units (example: CPUs) contained in the license.
used: pulumi.Output[float] = None¶The number of units (example: CPUs) assigned to this license.
- static
get(resource_name, id, opts=None, edition_key=None, labels=None, license_key=None, name=None, total=None, used=None)¶ Get an existing License resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
edition_key (pulumi.Input[str]) – The product edition of the license key.
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.
name (pulumi.Input[str]) – The display name for the license.
total (pulumi.Input[float]) – Total number of units (example: CPUs) contained in the license.
used (pulumi.Input[float]) – 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, __props__=None, __name__=None, __opts__=None)¶ The
.NasDatastoreresource 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
.VmfsDatastore, 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 thehost_system_idsargument.- 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
readOnlyorreadWrite. Note thatreadWritedoes 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.
datastore_cluster_id (pulumi.Input[str]) – The managed object ID 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.host_system_ids (pulumi.Input[list]) – The managed object IDs 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, orSEC_KRB5I. Forces a new resource if changed.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
type (pulumi.Input[str]) – The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
access_mode: pulumi.Output[str] = None¶Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes 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: pulumi.Output[bool] = None¶The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.
capacity: pulumi.Output[float] = None¶Maximum capacity of the datastore, in megabytes.
custom_attributes: pulumi.Output[dict] = None¶Map of custom attribute ids to attribute value strings to set on datasource resource.
datastore_cluster_id: pulumi.Output[str] = None¶The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.
folder: pulumi.Output[str] = 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.
free_space: pulumi.Output[float] = None¶Available space of this datastore, in megabytes.
host_system_ids: pulumi.Output[list] = None¶The managed object IDs of the hosts to mount the datastore on.
maintenance_mode: pulumi.Output[str] = None¶The current maintenance mode state of the datastore.
multiple_host_access: pulumi.Output[bool] = None¶If
true, more than one host in the datacenter has been configured with access to the datastore.
name: pulumi.Output[str] = None¶The name of the datastore. Forces a new resource if changed.
protocol_endpoint: pulumi.Output[str] = None¶Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
remote_hosts: pulumi.Output[list] = 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: pulumi.Output[str] = None¶The remote path of the mount point. Forces a new resource if changed.
security_type: pulumi.Output[str] = None¶The security type to use when using NFS v4.1. Can be one of
AUTH_SYS,SEC_KRB5, orSEC_KRB5I. Forces a new resource if changed.
The IDs of any tags to attach to this resource.
type: pulumi.Output[str] = None¶The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.
uncommitted_space: pulumi.Output[float] = None¶Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
url: pulumi.Output[str] = None¶The unique locator for the datastore.
- static
get(resource_name, id, opts=None, access_mode=None, accessible=None, capacity=None, custom_attributes=None, datastore_cluster_id=None, folder=None, free_space=None, host_system_ids=None, maintenance_mode=None, multiple_host_access=None, name=None, protocol_endpoint=None, remote_hosts=None, remote_path=None, security_type=None, tags=None, type=None, uncommitted_space=None, url=None)¶ Get an existing NasDatastore resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
access_mode (pulumi.Input[str]) – Access mode for the mount point. Can be one of
readOnlyorreadWrite. Note thatreadWritedoes 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 (pulumi.Input[bool]) – The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.capacity (pulumi.Input[float]) – Maximum capacity of the datastore, in megabytes.
custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set on datasource resource.
datastore_cluster_id (pulumi.Input[str]) – The managed object ID 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.free_space (pulumi.Input[float]) – Available space of this datastore, in megabytes.
host_system_ids (pulumi.Input[list]) – The managed object IDs of the hosts to mount the datastore on.
maintenance_mode (pulumi.Input[str]) – The current maintenance mode state of the datastore.
multiple_host_access (pulumi.Input[bool]) – If
true, more than one host in the datacenter has been configured with access to the datastore.name (pulumi.Input[str]) – The name of the datastore. Forces a new resource if changed.
protocol_endpoint (pulumi.Input[str]) – Indicates that this NAS volume is a protocol endpoint. This field is only populated if the host supports virtual datastores.
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, orSEC_KRB5I. Forces a new resource if changed.tags (pulumi.Input[list]) – The IDs of any tags to attach to this resource.
type (pulumi.Input[str]) – The type of NAS volume. Can be one of
NFS(to denote v3) orNFS41(to denote NFS v4.1). Default:NFS. Forces a new resource if changed.uncommitted_space (pulumi.Input[float]) – Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
url (pulumi.Input[str]) – 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_keep_alive=None, vim_session_path=None, vsphere_server=None, __props__=None, __name__=None, __opts__=None)¶ The provider type for the vsphere package. By default, resources use package-wide configuration settings, however an explicit
Providerinstance 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.
allow_unverified_ssl (pulumi.Input[bool]) – If set, VMware vSphere client will permit unverifiable SSL certificates.
client_debug (pulumi.Input[bool]) – govmomi debug
client_debug_path (pulumi.Input[str]) – govmomi debug path for debug
client_debug_path_run (pulumi.Input[str]) – govmomi debug path for a single run
password (pulumi.Input[str]) – The user password for vSphere API operations.
persist_session (pulumi.Input[bool]) – Persist vSphere client sessions to disk
rest_session_path (pulumi.Input[str]) – The directory to save vSphere REST API sessions to
user (pulumi.Input[str]) – The user name for vSphere API operations.
vim_keep_alive (pulumi.Input[float]) – Keep alive interval for the VIM session in minutes
vim_session_path (pulumi.Input[str]) – The directory to save vSphere SOAP API sessions to
vsphere_server (pulumi.Input[str]) – The vSphere Server name for vSphere API operations.
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, __props__=None, __name__=None, __opts__=None)¶ The
.ResourcePoolresource 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.
import pulumi import pulumi_vsphere as vsphere config = pulumi.Config() datacenter = config.get("datacenter") if datacenter is None: datacenter = "dc1" cluster = config.get("cluster") if cluster is None: cluster = "cluster1" dc = vsphere.get_datacenter(name=datacenter) compute_cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name=cluster) resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id)
- 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:
truecpu_limit (pulumi.Input[float]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1cpu_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0cpu_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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normalcpu_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
memory_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:
truememory_limit (pulumi.Input[float]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1memory_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0memory_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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normalmemory_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.name (pulumi.Input[str]) – The name of the resource pool.
parent_resource_pool_id (pulumi.Input[str]) – The managed object ID 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.
cpu_expandable: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1
cpu_reservation: pulumi.Output[float] = None¶Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normal
The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.
custom_attributes: pulumi.Output[dict] = None¶A list of custom attributes to set on this resource.
memory_expandable: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1
memory_reservation: pulumi.Output[float] = None¶Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normal
The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.
name: pulumi.Output[str] = None¶The name of the resource pool.
parent_resource_pool_id: pulumi.Output[str] = None¶The managed object ID 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.
The IDs of any tags to attach to this resource.
- static
get(resource_name, id, 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)¶ Get an existing ResourcePool resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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:
truecpu_limit (pulumi.Input[float]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1cpu_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0cpu_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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normalcpu_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
memory_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:
truememory_limit (pulumi.Input[float]) – The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1memory_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0memory_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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normalmemory_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.name (pulumi.Input[str]) – The name of the resource pool.
parent_resource_pool_id (pulumi.Input[str]) – The managed object ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.StorageDrsVmOverrideresource 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.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="dc1") datastore_cluster = vsphere.get_datastore_cluster(datacenter_id=dc.id, name="datastore-cluster1") member_datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore-cluster1-member1") pool = vsphere.get_resource_pool(datacenter_id=dc.id, name="cluster1/Resources") network = vsphere.get_network(datacenter_id=dc.id, name="public") vm = vsphere.VirtualMachine("vm", datastore_id=member_datastore.id, disks=[{ "label": "disk0", "size": 20, }], guest_id="other3xLinux64Guest", memory=1024, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=pool.id) drs_vm_override = vsphere.StorageDrsVmOverride("drsVmOverride", datastore_cluster_id=datastore_cluster.id, sdrs_enabled=False, virtual_machine_id=vm.id)
- 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 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
automatedormanual. When not specified, the datastore cluster’s settings are used according to the specific SDRS subsystem.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. Whenfalse, 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: pulumi.Output[str] = None¶The managed object reference ID of the datastore cluster to put the override in. Forces a new resource if changed.
sdrs_automation_level: pulumi.Output[str] = None¶Overrides any Storage DRS automation levels for this virtual machine. Can be one of
automatedormanual. When not specified, the datastore cluster’s settings are used according to the specific SDRS subsystem.
sdrs_enabled: pulumi.Output[str] = None¶Overrides the default Storage DRS setting for this virtual machine. When not specified, the datastore cluster setting is used.
sdrs_intra_vm_affinity: pulumi.Output[str] = 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. Whenfalse, 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.Output[str] = None¶The UUID of the virtual machine to create the override for. Forces a new resource if changed.
- static
get(resource_name, id, opts=None, datastore_cluster_id=None, sdrs_automation_level=None, sdrs_enabled=None, sdrs_intra_vm_affinity=None, virtual_machine_id=None)¶ Get an existing StorageDrsVmOverride resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
datastore_cluster_id (pulumi.Input[str]) – The managed object reference ID 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
automatedormanual. When not specified, the datastore cluster’s settings are used according to the specific SDRS subsystem.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. Whenfalse, 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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.Tagresource 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.
import pulumi import pulumi_vsphere as vsphere category = vsphere.TagCategory("category", associable_types=[ "VirtualMachine", "Datastore", ], cardinality="SINGLE", description="Managed by Pulumi") tag = vsphere.Tag("tag", category_id=category.id, description="Managed by Pulumi")
import pulumi import pulumi_vsphere as vsphere category = vsphere.TagCategory("category", associable_types=[ "VirtualMachine", "Datastore", ], cardinality="SINGLE", description="Managed by Pulumi") tag = vsphere.Tag("tag", category_id=category.id, description="Managed by Pulumi") web = vsphere.VirtualMachine("web", tags=[tag.id])
- 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: pulumi.Output[str] = None¶The unique identifier of the parent category in which this tag will be created. Forces a new resource if changed.
description: pulumi.Output[str] = None¶A description for the tag.
name: pulumi.Output[str] = None¶The display name of the tag. The name must be unique within its category.
- static
get(resource_name, id, opts=None, category_id=None, description=None, name=None)¶ Get an existing Tag resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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.
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, __props__=None, __name__=None, __opts__=None)¶ Create a TagCategory resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[list] associable_types: A list object types that this category is
valid to be assigned to. For a full list, click here.
- Parameters
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), toMULTIPLE(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: pulumi.Output[list] = None¶A list object types that this category is valid to be assigned to. For a full list, click here.
cardinality: pulumi.Output[str] = 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), toMULTIPLE(object can be assigned multiple tags in this category). Forces a new resource if changed.
description: pulumi.Output[str] = None¶A description for the category.
name: pulumi.Output[str] = None¶The name of the category.
- static
get(resource_name, id, opts=None, associable_types=None, cardinality=None, description=None, name=None)¶ Get an existing TagCategory resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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), toMULTIPLE(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.
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, __props__=None, __name__=None, __opts__=None)¶ The
.VappContainerresource can be used to create and manage vApps.For more information on vSphere vApps, see this page.
import pulumi import pulumi_vsphere as vsphere config = pulumi.Config() datacenter = config.get("datacenter") if datacenter is None: datacenter = "dc1" cluster = config.get("cluster") if cluster is None: cluster = "cluster1" dc = vsphere.get_datacenter(name=datacenter) compute_cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name=cluster) vapp_container = vsphere.VappContainer("vappContainer", parent_resource_pool_id=compute_cluster.id)
import pulumi import pulumi_vsphere as vsphere config = pulumi.Config() datacenter = config.get("datacenter") if datacenter is None: datacenter = "dc1" cluster = config.get("cluster") if cluster is None: cluster = "cluster1" dc = vsphere.get_datacenter(name=datacenter) compute_cluster = vsphere.get_compute_cluster(datacenter_id=dc.id, name=cluster) network = vsphere.get_network(datacenter_id=dc.id, name="network1") datastore = vsphere.get_datastore(datacenter_id=dc.id, name="datastore1") vapp_container = vsphere.VappContainer("vappContainer", parent_resource_pool_id=compute_cluster.id) vm = vsphere.VirtualMachine("vm", datastore_id=datastore.id, disks=[{ "label": "disk0", "size": 1, }], guest_id="ubuntu64Guest", memory=1024, network_interfaces=[{ "networkId": network.id, }], num_cpus=2, resource_pool_id=vapp_container.id)
- 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:
truecpu_limit (pulumi.Input[float]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1cpu_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0cpu_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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normalcpu_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
memory_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:
truememory_limit (pulumi.Input[float]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1memory_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0memory_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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normalmemory_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.name (pulumi.Input[str]) – The name of the vApp container.
parent_folder_id (pulumi.Input[str]) – The managed object ID of the vApp container’s parent folder.
parent_resource_pool_id (pulumi.Input[str]) – The managed object ID 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.
cpu_expandable: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1
cpu_reservation: pulumi.Output[float] = None¶Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0
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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normal
The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.
custom_attributes: pulumi.Output[dict] = None¶A list of custom attributes to set on this resource.
memory_expandable: pulumi.Output[bool] = 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: pulumi.Output[float] = None¶The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1
memory_reservation: pulumi.Output[float] = None¶Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0
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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normal
The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.
name: pulumi.Output[str] = None¶The name of the vApp container.
parent_folder_id: pulumi.Output[str] = None¶The managed object ID of the vApp container’s parent folder.
parent_resource_pool_id: pulumi.Output[str] = None¶The managed object ID 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.
The IDs of any tags to attach to this resource.
- static
get(resource_name, id, 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)¶ Get an existing VappContainer resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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:
truecpu_limit (pulumi.Input[float]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1cpu_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0cpu_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, orcustom. Whenlow,normal, orhighare specified values incpu_shareswill be ignored. Default:normalcpu_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
cpu_share_levelmust becustom.custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
memory_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:
truememory_limit (pulumi.Input[float]) – The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to
-1for unlimited. Default:-1memory_reservation (pulumi.Input[float]) – Amount of CPU (MHz) that is guaranteed available to the vApp container. Default:
0memory_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, orcustom. Whenlow,normal, orhighare specified values inmemory_shareswill be ignored. Default:normalmemory_shares (pulumi.Input[float]) – The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set,
memory_share_levelmust becustom.name (pulumi.Input[str]) – The name of the vApp container.
parent_folder_id (pulumi.Input[str]) – The managed object ID of the vApp container’s parent folder.
parent_resource_pool_id (pulumi.Input[str]) – The managed object ID 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.
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, __props__=None, __name__=None, __opts__=None)¶ Create a VappEntity resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] container_id: Managed object ID of the vApp
container the entity is a member of.
- Parameters
custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
start_action (pulumi.Input[str]) – How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
start_delay (pulumi.Input[float]) – Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
start_order (pulumi.Input[float]) – 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[float]) – Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
tags (pulumi.Input[list]) – A list of tag IDs to apply to this object.
target_id (pulumi.Input[str]) – Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
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: pulumi.Output[str] = None¶Managed object ID of the vApp container the entity is a member of.
custom_attributes: pulumi.Output[dict] = None¶A list of custom attributes to set on this resource.
start_action: pulumi.Output[str] = 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: pulumi.Output[float] = None¶Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
start_order: pulumi.Output[float] = None¶Order to start and stop target in vApp. Default: 1
stop_action: pulumi.Output[str] = 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: pulumi.Output[float] = 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
A list of tag IDs to apply to this object.
target_id: pulumi.Output[str] = None¶Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
wait_for_guest: pulumi.Output[bool] = 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
- static
get(resource_name, id, 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)¶ Get an existing VappEntity resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
container_id (pulumi.Input[str]) – Managed object ID of the vApp container the entity is a member of.
custom_attributes (pulumi.Input[dict]) – A list of custom attributes to set on this resource.
start_action (pulumi.Input[str]) – How to start the entity. Valid settings are none or powerOn. If set to none, then the entity does not participate in auto-start. Default: powerOn
start_delay (pulumi.Input[float]) – Delay in seconds before continuing with the next entity in the order of entities to be started. Default: 120
start_order (pulumi.Input[float]) – 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[float]) – Delay in seconds before continuing with the next entity in the order sequence. This is only used if the stopAction is guestShutdown. Default: 120
tags (pulumi.Input[list]) – A list of tag IDs to apply to this object.
target_id (pulumi.Input[str]) – Managed object ID of the entity to power on or power off. This can be a virtual machine or a vApp.
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
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, __props__=None, __name__=None, __opts__=None)¶ The
.VirtualDiskresource can be used to create virtual disks outside of any given.VirtualMachineresource. These disks can be attached to a virtual machine by creating a disk block with theattachparameter.import pulumi import pulumi_vsphere as vsphere my_disk = vsphere.VirtualDisk("myDisk", datacenter="Datacenter", datastore="local", size=2, type="thin", vmdk_path="myDisk.vmdk")
- 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, orbusLogic. Default:lsiLogic.create_directories (pulumi.Input[bool]) – Tells the resource to create any directories that are a part of the
vmdk_pathparameter 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[float]) – Size of the disk (in GB).
type (pulumi.Input[str]) – The type of disk to create. Can be one of
eagerZeroedThick,lazy, orthin. 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: pulumi.Output[str] = None¶The adapter type for this virtual disk. Can be one of
ide,lsiLogic, orbusLogic. Default:lsiLogic.
create_directories: pulumi.Output[bool] = None¶Tells the resource to create any directories that are a part of the
vmdk_pathparameter if they are missing. Default:false.
datacenter: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the datastore in which to create the disk.
size: pulumi.Output[float] = None¶Size of the disk (in GB).
type: pulumi.Output[str] = None¶The type of disk to create. Can be one of
eagerZeroedThick,lazy, orthin. Default:eagerZeroedThick. For information on what each kind of disk provisioning policy means, click [here][docs-vmware-vm-disk-provisioning].
vmdk_path: pulumi.Output[str] = None¶The path, including filename, of the virtual disk to be created. This needs to end in
.vmdk.
- static
get(resource_name, id, opts=None, adapter_type=None, create_directories=None, datacenter=None, datastore=None, size=None, type=None, vmdk_path=None)¶ Get an existing VirtualDisk resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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, orbusLogic. Default:lsiLogic.create_directories (pulumi.Input[bool]) – Tells the resource to create any directories that are a part of the
vmdk_pathparameter 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[float]) – Size of the disk (in GB).
type (pulumi.Input[str]) – The type of disk to create. Can be one of
eagerZeroedThick,lazy, orthin. 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.
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, datacenter_id=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, hardware_version=None, host_system_id=None, hv_mode=None, ide_controller_count=None, ignored_guest_ips=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, ovf_deploy=None, pci_device_ids=None, poweron_timeout=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, sata_controller_count=None, scsi_bus_sharing=None, scsi_controller_count=None, scsi_type=None, shutdown_wait_timeout=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, tags=None, vapp=None, wait_for_guest_ip_timeout=None, wait_for_guest_net_routable=None, wait_for_guest_net_timeout=None, __props__=None, __name__=None, __opts__=None)¶ Create a VirtualMachine resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] alternate_guest_name: The guest name for the operating system
when
guest_idisotherorother-64.- Parameters
annotation (pulumi.Input[str]) – A user-provided description of the virtual machine. The default is no annotation.
boot_delay (pulumi.Input[float]) – The number of milliseconds to wait before starting the boot sequence. The default is no delay.
boot_retry_delay (pulumi.Input[float]) – The number of milliseconds to wait before retrying the boot sequence. This only valid if
boot_retry_enabledis 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[float]) – 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[float]) – The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.
cpu_share_count (pulumi.Input[float]) – The number of CPU shares allocated to the virtual machine when the
cpu_share_leveliscustom.cpu_share_level (pulumi.Input[str]) – The allocation level for CPU resources. Can be one of
high,low,normal, orcustom. Default:custom.custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set for virtual machine.
datacenter_id (pulumi.Input[str]) – The datacenter id. Required only when deploying an ovf template.
datastore_cluster_id (pulumi.Input[str]) – The managed object reference ID 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
firmwaretype is set to isefi, 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, oroff. 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 instance metadata.
firmware (pulumi.Input[str]) – The firmware interface to use on the virtual machine. Can be one of
biosorEFI. 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.hardware_version (pulumi.Input[float]) – The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.
host_system_id (pulumi.Input[str]) – An optional managed object reference ID 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_idis 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, orhvOff. Default:hvAuto.ide_controller_count (pulumi.Input[float]) – The number of IDE 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.
ignored_guest_ips (pulumi.Input[list]) – List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].
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, orhigh.memory (pulumi.Input[float]) – 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[float]) – 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[float]) – The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.
memory_share_count (pulumi.Input[float]) – The number of memory shares allocated to the virtual machine when the
memory_share_leveliscustom.memory_share_level (pulumi.Input[str]) – The allocation level for memory resources. Can be one of
high,low,normal, orcustom. Default:custom.migrate_wait_timeout (pulumi.Input[float]) – 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
labelandpath, the latter when usingattach. Required if not usinglabel.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[float]) – The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be
num_cpusdivided bynum_cores_per_socket. If specified, the value supplied tonum_cpusmust be evenly divisible by this value. Default:1.num_cpus (pulumi.Input[float]) – The total number of virtual processor cores to assign to this virtual machine. Default:
1.ovf_deploy (pulumi.Input[dict]) – When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.
pci_device_ids (pulumi.Input[list]) – List of host PCI device IDs to create PCI passthroughs for.
poweron_timeout (pulumi.Input[float]) – The amount of time, in seconds, that we will be trying to power on a VM
resource_pool_id (pulumi.Input[str]) – The managed object reference ID 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.sata_controller_count (pulumi.Input[float]) – The number of SATA 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.
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[float]) – The number of SCSI controllers that this provider 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[float]) – The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If
force_power_offis set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.storage_policy_id (pulumi.Input[str]) – The UUID of the storage policy to assign to this disk.
swap_placement_policy (pulumi.Input[str]) – The swap file placement policy for this virtual machine. Can be one of
inherit,hostLocal, orvmDirectory. 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.
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_ip_timeout (pulumi.Input[float]) – The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the
wait_for_guest_net_timeoutwaiter to be used. A value less than 1 disables the waiter. Default: 0.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. This property is ignored if thewait_for_guest_ip_timeoutwaiter is used. Default:true.wait_for_guest_net_timeout (pulumi.Input[float]) – The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the
wait_for_guest_ip_timeoutwaiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.
The cdrom object supports the following:
clientDevice(pulumi.Input[bool]) - Indicates whether the device should be backed by remote client device. Conflicts withdatastore_idandpath.datastore_id(pulumi.Input[str]) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(pulumi.Input[float]) - The ID of the device within the virtual machine.path(pulumi.Input[str]) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.
The clone object supports the following:
customize(pulumi.Input[dict])dnsServerLists(pulumi.Input[list])dnsSuffixLists(pulumi.Input[list])ipv4Gateway(pulumi.Input[str])ipv6Gateway(pulumi.Input[str])linuxOptions(pulumi.Input[dict])domain(pulumi.Input[str])hostName(pulumi.Input[str])hwClockUtc(pulumi.Input[bool])timeZone(pulumi.Input[str])
network_interfaces(pulumi.Input[list]) - A specification for a virtual NIC on this virtual machine. See network interface options below.dnsDomain(pulumi.Input[str])dnsServerLists(pulumi.Input[list])ipv4_address(pulumi.Input[str])ipv4Netmask(pulumi.Input[float])ipv6Address(pulumi.Input[str])ipv6Netmask(pulumi.Input[float])
timeout(pulumi.Input[float])windowsOptions(pulumi.Input[dict])adminPassword(pulumi.Input[str])autoLogon(pulumi.Input[bool])autoLogonCount(pulumi.Input[float])computerName(pulumi.Input[str])domainAdminPassword(pulumi.Input[str])domainAdminUser(pulumi.Input[str])fullName(pulumi.Input[str])joinDomain(pulumi.Input[str])organizationName(pulumi.Input[str])productKey(pulumi.Input[str])runOnceCommandLists(pulumi.Input[list])timeZone(pulumi.Input[float])workgroup(pulumi.Input[str])
windowsSysprepText(pulumi.Input[str])
linkedClone(pulumi.Input[bool])ovfNetworkMap(pulumi.Input[dict])ovfStorageMap(pulumi.Input[dict])templateUuid(pulumi.Input[str])timeout(pulumi.Input[float])
The disks object supports the following:
attach(pulumi.Input[bool]) - Attach an external disk instead of creating a new one. Implies and conflicts withkeep_on_remove. If set, you cannot setsize,eagerly_scrub, orthin_provisioned. Must setpathif used.controllerType(pulumi.Input[str]) - The type of storage controller to attach the disk to. Can bescsi,sata, oride. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi.datastore_id(pulumi.Input[str]) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.diskMode(pulumi.Input[str]) - The mode of this this virtual disk for purposes of writes and snapshotting. Can be one ofappend,independent_nonpersistent,independent_persistent,nonpersistent,persistent, orundoable. Default:persistent. For an explanation of options, click [here][vmware-docs-disk-mode].diskSharing(pulumi.Input[str]) - The sharing mode of this virtual disk. Can be one ofsharingMultiWriterorsharingNone. Default:sharingNone.eagerlyScrub(pulumi.Input[bool]) - If set totrue, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set totruewhenthin_provisionedistrue. See the section on picking a disk type. Default:false.ioLimit(pulumi.Input[float]) - The upper limit of IOPS that this disk can use. The default is no limit.ioReservation(pulumi.Input[float]) - The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.ioShareCount(pulumi.Input[float]) - The share count for this disk when the share level iscustom.ioShareLevel(pulumi.Input[str]) - The share allocation level for this disk. Can be one oflow,normal,high, orcustom. Default:normal.keepOnRemove(pulumi.Input[bool]) - Keep this disk when removing the device or destroying the virtual machine. Default:false.key(pulumi.Input[float]) - The ID of the device within the virtual machine.label(pulumi.Input[str]) - A label for the disk. Forces a new disk if changed.name(pulumi.Input[str]) - An alias for bothlabelandpath, the latter when usingattach. Required if not usinglabel.path(pulumi.Input[str]) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.size(pulumi.Input[float]) - The size of the disk, in GB.storage_policy_id(pulumi.Input[str]) - The UUID of the storage policy to assign to this disk.thinProvisioned(pulumi.Input[bool]) - Iftrue, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totruewheneagerly_scrubistrue. See the section on picking a disk type. Default:true.unitNumber(pulumi.Input[float]) - The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is0, for which one disk must be set to. Duplicate unit numbers are not allowed.uuid(pulumi.Input[str]) - The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.writeThrough(pulumi.Input[bool]) - Iftrue, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false.
The network_interfaces object supports the following:
adapter_type(pulumi.Input[str]) - The network interface type. Can be one ofe1000,e1000e, orvmxnet3. Default:vmxnet3.bandwidthLimit(pulumi.Input[float]) - The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.bandwidthReservation(pulumi.Input[float]) - The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.bandwidthShareCount(pulumi.Input[float]) - The share count for this network interface when the share level iscustom.bandwidthShareLevel(pulumi.Input[str]) - The bandwidth share allocation level for this interface. Can be one oflow,normal,high, orcustom. Default:normal.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(pulumi.Input[float]) - The ID of the device within the virtual machine.macAddress(pulumi.Input[str]) - The MAC address of this network interface. Can only be manually set ifuse_static_macis true, otherwise this is a computed value that gives the current MAC address of this interface.networkId(pulumi.Input[str]) - The managed object reference ID of the network to connect this interface to.ovfMapping(pulumi.Input[str]) - Specifies which OVF NIC thenetwork_interfaceshould be associated with. Only applies at creation and only when deploying from an OVF source.useStaticMac(pulumi.Input[bool]) - If true, themac_addressfield is treated as a static MAC address and set accordingly. Setting this totruerequiresmac_addressto be set. Default:false.
The ovf_deploy object supports the following:
allowUnverifiedSslCert(pulumi.Input[bool])diskProvisioning(pulumi.Input[str])ipAllocationPolicy(pulumi.Input[str])ipProtocol(pulumi.Input[str])localOvfPath(pulumi.Input[str])ovfNetworkMap(pulumi.Input[dict])remoteOvfUrl(pulumi.Input[str])
The vapp object supports the following:
properties(pulumi.Input[dict])
alternate_guest_name: pulumi.Output[str] = None¶The guest name for the operating system when
guest_idisotherorother-64.
annotation: pulumi.Output[str] = None¶A user-provided description of the virtual machine. The default is no annotation.
boot_delay: pulumi.Output[float] = None¶The number of milliseconds to wait before starting the boot sequence. The default is no delay.
boot_retry_delay: pulumi.Output[float] = None¶The number of milliseconds to wait before retrying the boot sequence. This only valid if
boot_retry_enabledis true. Default:10000(10 seconds).
boot_retry_enabled: pulumi.Output[bool] = 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: pulumi.Output[dict] = None¶A specification for a CDROM device on this virtual machine. See CDROM options below.
clientDevice(bool) - Indicates whether the device should be backed by remote client device. Conflicts withdatastore_idandpath.datastore_id(str) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(str) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(float) - The ID of the device within the virtual machine.path(str) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.
change_version: pulumi.Output[str] = None¶A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.
clone: pulumi.Output[dict] = 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.
customize(dict)dnsServerLists(list)dnsSuffixLists(list)ipv4Gateway(str)ipv6Gateway(str)linuxOptions(dict)domain(str)hostName(str)hwClockUtc(bool)timeZone(str)
network_interfaces(list) - A specification for a virtual NIC on this virtual machine. See network interface options below.dnsDomain(str)dnsServerLists(list)ipv4_address(str)ipv4Netmask(float)ipv6Address(str)ipv6Netmask(float)
timeout(float)windowsOptions(dict)adminPassword(str)autoLogon(bool)autoLogonCount(float)computerName(str)domainAdminPassword(str)domainAdminUser(str)fullName(str)joinDomain(str)organizationName(str)productKey(str)runOnceCommandLists(list)timeZone(float)workgroup(str)
windowsSysprepText(str)
linkedClone(bool)ovfNetworkMap(dict)ovfStorageMap(dict)templateUuid(str)timeout(float)
cpu_hot_add_enabled: pulumi.Output[bool] = None¶Allow CPUs to be added to this virtual machine while it is running.
cpu_hot_remove_enabled: pulumi.Output[bool] = None¶Allow CPUs to be removed to this virtual machine while it is running.
cpu_limit: pulumi.Output[float] = 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: pulumi.Output[bool] = None¶Enable CPU performance counters on this virtual machine. Default:
false.
cpu_reservation: pulumi.Output[float] = None¶The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.
The number of CPU shares allocated to the virtual machine when the
cpu_share_leveliscustom.
The allocation level for CPU resources. Can be one of
high,low,normal, orcustom. Default:custom.
custom_attributes: pulumi.Output[dict] = None¶Map of custom attribute ids to attribute value strings to set for virtual machine.
datacenter_id: pulumi.Output[str] = None¶The datacenter id. Required only when deploying an ovf template.
datastore_cluster_id: pulumi.Output[str] = None¶The managed object reference ID 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.Output[str] = None¶The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts with
client_device.
default_ip_address: pulumi.Output[str] = None¶The IP address selected by the provider to be used with any 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: pulumi.Output[list] = None¶A specification for a virtual disk device on this virtual machine. See disk options below.
attach(bool) - Attach an external disk instead of creating a new one. Implies and conflicts withkeep_on_remove. If set, you cannot setsize,eagerly_scrub, orthin_provisioned. Must setpathif used.controllerType(str) - The type of storage controller to attach the disk to. Can bescsi,sata, oride. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi.datastore_id(str) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(str) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.diskMode(str) - The mode of this this virtual disk for purposes of writes and snapshotting. Can be one ofappend,independent_nonpersistent,independent_persistent,nonpersistent,persistent, orundoable. Default:persistent. For an explanation of options, click [here][vmware-docs-disk-mode].diskSharing(str) - The sharing mode of this virtual disk. Can be one ofsharingMultiWriterorsharingNone. Default:sharingNone.eagerlyScrub(bool) - If set totrue, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set totruewhenthin_provisionedistrue. See the section on picking a disk type. Default:false.ioLimit(float) - The upper limit of IOPS that this disk can use. The default is no limit.ioReservation(float) - The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.ioShareCount(float) - The share count for this disk when the share level iscustom.ioShareLevel(str) - The share allocation level for this disk. Can be one oflow,normal,high, orcustom. Default:normal.keepOnRemove(bool) - Keep this disk when removing the device or destroying the virtual machine. Default:false.key(float) - The ID of the device within the virtual machine.label(str) - A label for the disk. Forces a new disk if changed.name(str) - An alias for bothlabelandpath, the latter when usingattach. Required if not usinglabel.path(str) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.size(float) - The size of the disk, in GB.storage_policy_id(str) - The UUID of the storage policy to assign to this disk.thinProvisioned(bool) - Iftrue, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totruewheneagerly_scrubistrue. See the section on picking a disk type. Default:true.unitNumber(float) - The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is0, for which one disk must be set to. Duplicate unit numbers are not allowed.uuid(str) - The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.writeThrough(bool) - Iftrue, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false.
efi_secure_boot_enabled: pulumi.Output[bool] = None¶When the
firmwaretype is set to isefi, this enables EFI secure boot. Default:false.
enable_disk_uuid: pulumi.Output[bool] = None¶Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. Default:
false.
enable_logging: pulumi.Output[bool] = None¶Enable logging of virtual machine events to a log file stored in the virtual machine directory. Default:
false.
ept_rvi_mode: pulumi.Output[str] = None¶The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of
automatic,on, oroff. Default:automatic.
extra_config: pulumi.Output[dict] = None¶Extra configuration data for this virtual machine. Can be used to supply advanced parameters not normally in configuration, such as instance metadata.
firmware: pulumi.Output[str] = None¶The firmware interface to use on the virtual machine. Can be one of
biosorEFI. Default:bios.
folder: pulumi.Output[str] = 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: pulumi.Output[bool] = 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: pulumi.Output[str] = 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: pulumi.Output[list] = 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 of the created virtual machine.
hardware_version: pulumi.Output[float] = None¶The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.
host_system_id: pulumi.Output[str] = None¶An optional managed object reference ID 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_idis 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.Output[str] = None¶The (non-nested) hardware virtualization setting for this virtual machine. Can be one of
hvAuto,hvOn, orhvOff. Default:hvAuto.
ide_controller_count: pulumi.Output[float] = None¶The number of IDE 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.
ignored_guest_ips: pulumi.Output[list] = None¶List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].
imported: pulumi.Output[bool] = 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: pulumi.Output[str] = 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, orhigh.
memory: pulumi.Output[float] = None¶The size of the virtual machine’s memory, in MB. Default:
1024(1 GB).
memory_hot_add_enabled: pulumi.Output[bool] = None¶Allow memory to be added to this virtual machine while it is running.
memory_limit: pulumi.Output[float] = 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: pulumi.Output[float] = None¶The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.
The number of memory shares allocated to the virtual machine when the
memory_share_leveliscustom.
The allocation level for memory resources. Can be one of
high,low,normal, orcustom. Default:custom.
migrate_wait_timeout: pulumi.Output[float] = 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.
moid: pulumi.Output[str] = None¶The machine object ID from VMWare
name: pulumi.Output[str] = None¶An alias for both
labelandpath, the latter when usingattach. Required if not usinglabel.
nested_hv_enabled: pulumi.Output[bool] = None¶Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest. Default:
false.
network_interfaces: pulumi.Output[list] = None¶A specification for a virtual NIC on this virtual machine. See network interface options below.
adapter_type(str) - The network interface type. Can be one ofe1000,e1000e, orvmxnet3. Default:vmxnet3.bandwidthLimit(float) - The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.bandwidthReservation(float) - The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.bandwidthShareCount(float) - The share count for this network interface when the share level iscustom.bandwidthShareLevel(str) - The bandwidth share allocation level for this interface. Can be one oflow,normal,high, orcustom. Default:normal.deviceAddress(str) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(float) - The ID of the device within the virtual machine.macAddress(str) - The MAC address of this network interface. Can only be manually set ifuse_static_macis true, otherwise this is a computed value that gives the current MAC address of this interface.networkId(str) - The managed object reference ID of the network to connect this interface to.ovfMapping(str) - Specifies which OVF NIC thenetwork_interfaceshould be associated with. Only applies at creation and only when deploying from an OVF source.useStaticMac(bool) - If true, themac_addressfield is treated as a static MAC address and set accordingly. Setting this totruerequiresmac_addressto be set. Default:false.
num_cores_per_socket: pulumi.Output[float] = None¶The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be
num_cpusdivided bynum_cores_per_socket. If specified, the value supplied tonum_cpusmust be evenly divisible by this value. Default:1.
num_cpus: pulumi.Output[float] = None¶The total number of virtual processor cores to assign to this virtual machine. Default:
1.
ovf_deploy: pulumi.Output[dict] = None¶When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.
allowUnverifiedSslCert(bool)diskProvisioning(str)ipAllocationPolicy(str)ipProtocol(str)localOvfPath(str)ovfNetworkMap(dict)remoteOvfUrl(str)
pci_device_ids: pulumi.Output[list] = None¶List of host PCI device IDs to create PCI passthroughs for.
poweron_timeout: pulumi.Output[float] = None¶The amount of time, in seconds, that we will be trying to power on a VM
reboot_required: pulumi.Output[bool] = None¶Value internal to the provider 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: pulumi.Output[str] = None¶The managed object reference ID 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.Output[bool] = None¶Enable the execution of post-power-on scripts when VMware tools is installed. Default:
true.
run_tools_scripts_after_resume: pulumi.Output[bool] = None¶Enable the execution of post-resume scripts when VMware tools is installed. Default:
true.
run_tools_scripts_before_guest_reboot: pulumi.Output[bool] = None¶Enable the execution of pre-reboot scripts when VMware tools is installed. Default:
false.
run_tools_scripts_before_guest_shutdown: pulumi.Output[bool] = None¶Enable the execution of pre-shutdown scripts when VMware tools is installed. Default:
true.
run_tools_scripts_before_guest_standby: pulumi.Output[bool] = None¶Enable the execution of pre-standby scripts when VMware tools is installed. Default:
true.
sata_controller_count: pulumi.Output[float] = None¶The number of SATA 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.
scsi_bus_sharing: pulumi.Output[str] = None¶Mode for sharing the SCSI bus. The modes are physicalSharing, virtualSharing, and noSharing. Default:
noSharing.
scsi_controller_count: pulumi.Output[float] = None¶The number of SCSI controllers that this provider 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.Output[str] = 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: pulumi.Output[float] = 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_offis set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.
storage_policy_id: pulumi.Output[str] = None¶The UUID of the storage policy to assign to this disk.
swap_placement_policy: pulumi.Output[str] = None¶The swap file placement policy for this virtual machine. Can be one of
inherit,hostLocal, orvmDirectory. Default:inherit.
sync_time_with_host: pulumi.Output[bool] = None¶Enable guest clock synchronization with the host. Requires VMware tools to be installed. Default:
false.
The IDs of any tags to attach to this resource.
uuid: pulumi.Output[str] = None¶The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.
vapp: pulumi.Output[dict] = 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.properties(dict)
vapp_transports: pulumi.Output[list] = 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: pulumi.Output[str] = None¶The state of VMware tools in the guest. This will determine the proper course of action for some device operations.
vmx_path: pulumi.Output[str] = None¶The path of the virtual machine’s configuration file in the VM’s datastore.
wait_for_guest_ip_timeout: pulumi.Output[float] = None¶The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the
wait_for_guest_net_timeoutwaiter to be used. A value less than 1 disables the waiter. Default: 0.
wait_for_guest_net_routable: pulumi.Output[bool] = 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. This property is ignored if thewait_for_guest_ip_timeoutwaiter is used. Default:true.
wait_for_guest_net_timeout: pulumi.Output[float] = None¶The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the
wait_for_guest_ip_timeoutwaiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.
- static
get(resource_name, id, opts=None, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, cdrom=None, change_version=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, datacenter_id=None, datastore_cluster_id=None, datastore_id=None, default_ip_address=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, guest_ip_addresses=None, hardware_version=None, host_system_id=None, hv_mode=None, ide_controller_count=None, ignored_guest_ips=None, imported=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, moid=None, name=None, nested_hv_enabled=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, ovf_deploy=None, pci_device_ids=None, poweron_timeout=None, reboot_required=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, sata_controller_count=None, scsi_bus_sharing=None, scsi_controller_count=None, scsi_type=None, shutdown_wait_timeout=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, tags=None, uuid=None, vapp=None, vapp_transports=None, vmware_tools_status=None, vmx_path=None, wait_for_guest_ip_timeout=None, wait_for_guest_net_routable=None, wait_for_guest_net_timeout=None)¶ Get an existing VirtualMachine resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
alternate_guest_name (pulumi.Input[str]) – The guest name for the operating system when
guest_idisotherorother-64.annotation (pulumi.Input[str]) – A user-provided description of the virtual machine. The default is no annotation.
boot_delay (pulumi.Input[float]) – The number of milliseconds to wait before starting the boot sequence. The default is no delay.
boot_retry_delay (pulumi.Input[float]) – The number of milliseconds to wait before retrying the boot sequence. This only valid if
boot_retry_enabledis 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.
change_version (pulumi.Input[str]) – A unique identifier for a given version of the last configuration applied, such the timestamp of the last update to the configuration.
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[float]) – 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[float]) – The amount of CPU (in MHz) that this virtual machine is guaranteed. The default is no reservation.
cpu_share_count (pulumi.Input[float]) – The number of CPU shares allocated to the virtual machine when the
cpu_share_leveliscustom.cpu_share_level (pulumi.Input[str]) – The allocation level for CPU resources. Can be one of
high,low,normal, orcustom. Default:custom.custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value strings to set for virtual machine.
datacenter_id (pulumi.Input[str]) – The datacenter id. Required only when deploying an ovf template.
datastore_cluster_id (pulumi.Input[str]) – The managed object reference ID 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.default_ip_address (pulumi.Input[str]) – The IP address selected by the provider to be used with any 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 (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
firmwaretype is set to isefi, 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, oroff. 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 instance metadata.
firmware (pulumi.Input[str]) – The firmware interface to use on the virtual machine. Can be one of
biosorEFI. 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.guest_ip_addresses (pulumi.Input[list]) – 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 of the created virtual machine.
- Parameters
hardware_version (pulumi.Input[float]) – The hardware version number. Valid range is from 4 to 15. The hardware version cannot be downgraded. See [virtual machine hardware compatibility][virtual-machine-hardware-compatibility] for more details.
host_system_id (pulumi.Input[str]) – An optional managed object reference ID 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_idis 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, orhvOff. Default:hvAuto.ide_controller_count (pulumi.Input[float]) – The number of IDE 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.
ignored_guest_ips (pulumi.Input[list]) – List of IP addresses and CIDR networks to ignore while waiting for an available IP address using either of the waiters. Any IP addresses in this list will be ignored if they show up so that the waiter will continue to wait for a real IP address. Default: [].
imported (pulumi.Input[bool]) – 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 (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, orhigh.memory (pulumi.Input[float]) – 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[float]) – 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[float]) – The amount of memory (in MB) that this virtual machine is guaranteed. The default is no reservation.
memory_share_count (pulumi.Input[float]) – The number of memory shares allocated to the virtual machine when the
memory_share_leveliscustom.memory_share_level (pulumi.Input[str]) – The allocation level for memory resources. Can be one of
high,low,normal, orcustom. Default:custom.migrate_wait_timeout (pulumi.Input[float]) – 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.
moid (pulumi.Input[str]) – The machine object ID from VMWare
name (pulumi.Input[str]) – An alias for both
labelandpath, the latter when usingattach. Required if not usinglabel.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[float]) – The number of cores per socket in this virtual machine. The number of vCPUs on the virtual machine will be
num_cpusdivided bynum_cores_per_socket. If specified, the value supplied tonum_cpusmust be evenly divisible by this value. Default:1.num_cpus (pulumi.Input[float]) – The total number of virtual processor cores to assign to this virtual machine. Default:
1.ovf_deploy (pulumi.Input[dict]) – When specified, the VM will be deployed from the provided ovf/ova template. See creating a virtual machine from a ovf/ova template for more details.
pci_device_ids (pulumi.Input[list]) – List of host PCI device IDs to create PCI passthroughs for.
poweron_timeout (pulumi.Input[float]) – The amount of time, in seconds, that we will be trying to power on a VM
reboot_required (pulumi.Input[bool]) – Value internal to the provider 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 (pulumi.Input[str]) – The managed object reference ID 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.sata_controller_count (pulumi.Input[float]) – The number of SATA 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.
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[float]) – The number of SCSI controllers that this provider 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[float]) – The amount of time, in minutes, to wait for a graceful guest shutdown when making necessary updates to the virtual machine. If
force_power_offis set to true, the VM will be force powered-off after this timeout, otherwise an error is returned. Default: 3 minutes.storage_policy_id (pulumi.Input[str]) – The UUID of the storage policy to assign to this disk.
swap_placement_policy (pulumi.Input[str]) – The swap file placement policy for this virtual machine. Can be one of
inherit,hostLocal, orvmDirectory. 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.
uuid (pulumi.Input[str]) – The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.
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.vapp_transports (pulumi.Input[list]) – 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 (pulumi.Input[str]) – The state of VMware tools in the guest. This will determine the proper course of action for some device operations.
vmx_path (pulumi.Input[str]) – The path of the virtual machine’s configuration file in the VM’s datastore.
wait_for_guest_ip_timeout (pulumi.Input[float]) – The amount of time, in minutes, to wait for an available guest IP address on this virtual machine. This should only be used if your version of VMware Tools does not allow the
wait_for_guest_net_timeoutwaiter to be used. A value less than 1 disables the waiter. Default: 0.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. This property is ignored if thewait_for_guest_ip_timeoutwaiter is used. Default:true.wait_for_guest_net_timeout (pulumi.Input[float]) – The amount of time, in minutes, to wait for an available IP address on this virtual machine’s NICs. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the
wait_for_guest_ip_timeoutwaiter can be used instead. A value less than 1 disables the waiter. Default: 5 minutes.
The cdrom object supports the following:
clientDevice(pulumi.Input[bool]) - Indicates whether the device should be backed by remote client device. Conflicts withdatastore_idandpath.datastore_id(pulumi.Input[str]) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(pulumi.Input[float]) - The ID of the device within the virtual machine.path(pulumi.Input[str]) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.
The clone object supports the following:
customize(pulumi.Input[dict])dnsServerLists(pulumi.Input[list])dnsSuffixLists(pulumi.Input[list])ipv4Gateway(pulumi.Input[str])ipv6Gateway(pulumi.Input[str])linuxOptions(pulumi.Input[dict])domain(pulumi.Input[str])hostName(pulumi.Input[str])hwClockUtc(pulumi.Input[bool])timeZone(pulumi.Input[str])
network_interfaces(pulumi.Input[list]) - A specification for a virtual NIC on this virtual machine. See network interface options below.dnsDomain(pulumi.Input[str])dnsServerLists(pulumi.Input[list])ipv4_address(pulumi.Input[str])ipv4Netmask(pulumi.Input[float])ipv6Address(pulumi.Input[str])ipv6Netmask(pulumi.Input[float])
timeout(pulumi.Input[float])windowsOptions(pulumi.Input[dict])adminPassword(pulumi.Input[str])autoLogon(pulumi.Input[bool])autoLogonCount(pulumi.Input[float])computerName(pulumi.Input[str])domainAdminPassword(pulumi.Input[str])domainAdminUser(pulumi.Input[str])fullName(pulumi.Input[str])joinDomain(pulumi.Input[str])organizationName(pulumi.Input[str])productKey(pulumi.Input[str])runOnceCommandLists(pulumi.Input[list])timeZone(pulumi.Input[float])workgroup(pulumi.Input[str])
windowsSysprepText(pulumi.Input[str])
linkedClone(pulumi.Input[bool])ovfNetworkMap(pulumi.Input[dict])ovfStorageMap(pulumi.Input[dict])templateUuid(pulumi.Input[str])timeout(pulumi.Input[float])
The disks object supports the following:
attach(pulumi.Input[bool]) - Attach an external disk instead of creating a new one. Implies and conflicts withkeep_on_remove. If set, you cannot setsize,eagerly_scrub, orthin_provisioned. Must setpathif used.controllerType(pulumi.Input[str]) - The type of storage controller to attach the disk to. Can bescsi,sata, oride. You must have the appropriate number of controllers enabled for the selected type. Defaultscsi.datastore_id(pulumi.Input[str]) - The datastore ID that the ISO is located in. Requried for using a datastore ISO. Conflicts withclient_device.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.diskMode(pulumi.Input[str]) - The mode of this this virtual disk for purposes of writes and snapshotting. Can be one ofappend,independent_nonpersistent,independent_persistent,nonpersistent,persistent, orundoable. Default:persistent. For an explanation of options, click [here][vmware-docs-disk-mode].diskSharing(pulumi.Input[str]) - The sharing mode of this virtual disk. Can be one ofsharingMultiWriterorsharingNone. Default:sharingNone.eagerlyScrub(pulumi.Input[bool]) - If set totrue, the disk space is zeroed out on VM creation. This will delay the creation of the disk or virtual machine. Cannot be set totruewhenthin_provisionedistrue. See the section on picking a disk type. Default:false.ioLimit(pulumi.Input[float]) - The upper limit of IOPS that this disk can use. The default is no limit.ioReservation(pulumi.Input[float]) - The I/O reservation (guarantee) that this disk has, in IOPS. The default is no reservation.ioShareCount(pulumi.Input[float]) - The share count for this disk when the share level iscustom.ioShareLevel(pulumi.Input[str]) - The share allocation level for this disk. Can be one oflow,normal,high, orcustom. Default:normal.keepOnRemove(pulumi.Input[bool]) - Keep this disk when removing the device or destroying the virtual machine. Default:false.key(pulumi.Input[float]) - The ID of the device within the virtual machine.label(pulumi.Input[str]) - A label for the disk. Forces a new disk if changed.name(pulumi.Input[str]) - An alias for bothlabelandpath, the latter when usingattach. Required if not usinglabel.path(pulumi.Input[str]) - The path to the ISO file. Required for using a datastore ISO. Conflicts withclient_device.size(pulumi.Input[float]) - The size of the disk, in GB.storage_policy_id(pulumi.Input[str]) - The UUID of the storage policy to assign to this disk.thinProvisioned(pulumi.Input[bool]) - Iftrue, this disk is thin provisioned, with space for the file being allocated on an as-needed basis. Cannot be set totruewheneagerly_scrubistrue. See the section on picking a disk type. Default:true.unitNumber(pulumi.Input[float]) - The disk number on the storage bus. The maximum value for this setting is the value of the controller count times the controller capacity (15 for SCSI, 30 for SATA, and 2 for IDE). The default is0, for which one disk must be set to. Duplicate unit numbers are not allowed.uuid(pulumi.Input[str]) - The UUID of the virtual disk’s VMDK file. This is used to track the virtual disk on the virtual machine.writeThrough(pulumi.Input[bool]) - Iftrue, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default:false.
The network_interfaces object supports the following:
adapter_type(pulumi.Input[str]) - The network interface type. Can be one ofe1000,e1000e, orvmxnet3. Default:vmxnet3.bandwidthLimit(pulumi.Input[float]) - The upper bandwidth limit of this network interface, in Mbits/sec. The default is no limit.bandwidthReservation(pulumi.Input[float]) - The bandwidth reservation of this network interface, in Mbits/sec. The default is no reservation.bandwidthShareCount(pulumi.Input[float]) - The share count for this network interface when the share level iscustom.bandwidthShareLevel(pulumi.Input[str]) - The bandwidth share allocation level for this interface. Can be one oflow,normal,high, orcustom. Default:normal.deviceAddress(pulumi.Input[str]) - An address internal to this provider that helps locate the device whenkeyis unavailable. This follows a convention ofCONTROLLER_TYPE:BUS_NUMBER:UNIT_NUMBER. Example:scsi:0:1means device unit 1 on SCSI bus 0.key(pulumi.Input[float]) - The ID of the device within the virtual machine.macAddress(pulumi.Input[str]) - The MAC address of this network interface. Can only be manually set ifuse_static_macis true, otherwise this is a computed value that gives the current MAC address of this interface.networkId(pulumi.Input[str]) - The managed object reference ID of the network to connect this interface to.ovfMapping(pulumi.Input[str]) - Specifies which OVF NIC thenetwork_interfaceshould be associated with. Only applies at creation and only when deploying from an OVF source.useStaticMac(pulumi.Input[bool]) - If true, themac_addressfield is treated as a static MAC address and set accordingly. Setting this totruerequiresmac_addressto be set. Default:false.
The ovf_deploy object supports the following:
allowUnverifiedSslCert(pulumi.Input[bool])diskProvisioning(pulumi.Input[str])ipAllocationPolicy(pulumi.Input[str])ipProtocol(pulumi.Input[str])localOvfPath(pulumi.Input[str])ovfNetworkMap(pulumi.Input[dict])remoteOvfUrl(pulumi.Input[str])
The vapp object supports the following:
properties(pulumi.Input[dict])
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, __props__=None, __name__=None, __opts__=None)¶ The
.VirtualMachineSnapshotresource 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
attachparameter to the.VirtualMachinediskblock), 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.import pulumi import pulumi_vsphere as vsphere demo1 = vsphere.VirtualMachineSnapshot("demo1", consolidate="true", description="This is Demo Snapshot", memory="true", quiesce="true", remove_children="false", snapshot_name="Snapshot Name", virtual_machine_uuid="9aac5551-a351-4158-8c5c-15a71e8ec5c9")
- 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: pulumi.Output[bool] = None¶If set to
true, the delta disks involved in this snapshot will be consolidated into the parent when this resource is destroyed.
description: pulumi.Output[str] = None¶A description for the snapshot.
memory: pulumi.Output[bool] = None¶If set to
true, a dump of the internal state of the virtual machine is included in the snapshot.
quiesce: pulumi.Output[bool] = 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: pulumi.Output[bool] = None¶If set to
true, the entire snapshot subtree is removed when this resource is destroyed.
snapshot_name: pulumi.Output[str] = None¶The name of the snapshot.
virtual_machine_uuid: pulumi.Output[str] = None¶The virtual machine UUID.
- static
get(resource_name, id, opts=None, consolidate=None, description=None, memory=None, quiesce=None, remove_children=None, snapshot_name=None, virtual_machine_uuid=None)¶ Get an existing VirtualMachineSnapshot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
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.
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.VmStoragePolicy(resource_name, opts=None, description=None, name=None, tag_rules=None, __props__=None, __name__=None, __opts__=None)¶ The
.VmStoragePolicyresource can be used to create and manage storage policies. Using this storage policy, tag based placement rules can be created to place a VM on a particular tagged datastore.import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="DC") tag_category = vsphere.get_tag_category(name="cat1") tag1 = vsphere.get_tag(name="tag1", category_id=tag_category.id) tag2 = vsphere.get_tag(name="tag2", category_id=tag_category.id) policy_tag_based_placement = vsphere.VmStoragePolicy("policyTagBasedPlacement", description="description", tag_rules=[{ "tagCategory": tag_category.name, "tags": [ tag1.name, tag2.name, ], "includeDatastoresWithTags": True, }])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the storage policy.
name (pulumi.Input[str]) – The name of the storage policy.
tag_rules (pulumi.Input[list]) – List of tag rules. The tag category and tags to be associated to this storage policy.
The tag_rules object supports the following:
includeDatastoresWithTags(pulumi.Input[bool]) - Whether to include datastores with the given tags or exclude. Default value is true i.e. include datastores with the given tags.tagCategory(pulumi.Input[str]) - Name of the tag category.tags(pulumi.Input[list]) - List of Name of tags to select from the given category.
description: pulumi.Output[str] = None¶Description of the storage policy.
name: pulumi.Output[str] = None¶The name of the storage policy.
tag_rules: pulumi.Output[list] = None¶List of tag rules. The tag category and tags to be associated to this storage policy.
includeDatastoresWithTags(bool) - Whether to include datastores with the given tags or exclude. Default value is true i.e. include datastores with the given tags.tagCategory(str) - Name of the tag category.tags(list) - List of Name of tags to select from the given category.
- static
get(resource_name, id, opts=None, description=None, name=None, tag_rules=None)¶ Get an existing VmStoragePolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the storage policy.
name (pulumi.Input[str]) – The name of the storage policy.
tag_rules (pulumi.Input[list]) – List of tag rules. The tag category and tags to be associated to this storage policy.
The tag_rules object supports the following:
includeDatastoresWithTags(pulumi.Input[bool]) - Whether to include datastores with the given tags or exclude. Default value is true i.e. include datastores with the given tags.tagCategory(pulumi.Input[str]) - Name of the tag category.tags(pulumi.Input[list]) - List of Name of tags to select from the given 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.VmfsDatastore(resource_name, opts=None, custom_attributes=None, datastore_cluster_id=None, disks=None, folder=None, host_system_id=None, name=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ The
.VmfsDatastoreresource 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 `.getVmfsDisks`` </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,esxi2andesxi3). When you create the datastore onesxi1, the datastore will be automatically mounted onesxi2andesxi3, 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
disksattribute. 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, the provider will give an error.
import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter() esxi_host = vsphere.get_host(datacenter_id=datacenter.id) datastore = vsphere.VmfsDatastore("datastore", disks=[ "mpx.vmhba1:C0:T1:L0", "mpx.vmhba1:C0:T2:L0", "mpx.vmhba1:C0:T2:L0", ], host_system_id=esxi_host.id)
import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") esxi_host = vsphere.get_host(datacenter_id=datacenter.id, name="esxi1") available = vsphere.get_vmfs_disks(filter="naa.60a98000", host_system_id=esxi_host.id, rescan=True) datastore = vsphere.VmfsDatastore("datastore", disks=available.disks, folder="datastore-folder", host_system_id=esxi_host.id)
- 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.
datastore_cluster_id (pulumi.Input[str]) – The managed object ID 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.host_system_id (pulumi.Input[str]) – The managed object ID 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.
accessible: pulumi.Output[bool] = None¶The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.
capacity: pulumi.Output[float] = None¶Maximum capacity of the datastore, in megabytes.
custom_attributes: pulumi.Output[dict] = None¶Map of custom attribute ids to attribute value string to set on datastore resource.
datastore_cluster_id: pulumi.Output[str] = None¶The managed object ID of a datastore cluster to put this datastore in. Conflicts with
folder.
disks: pulumi.Output[list] = None¶The disks to use with the datastore.
folder: pulumi.Output[str] = 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.
free_space: pulumi.Output[float] = None¶Available space of this datastore, in megabytes.
host_system_id: pulumi.Output[str] = None¶The managed object ID 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: pulumi.Output[str] = None¶The current maintenance mode state of the datastore.
multiple_host_access: pulumi.Output[bool] = None¶If
true, more than one host in the datacenter has been configured with access to the datastore.
name: pulumi.Output[str] = None¶The name of the datastore. Forces a new resource if changed.
The IDs of any tags to attach to this resource.
uncommitted_space: pulumi.Output[float] = None¶Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
url: pulumi.Output[str] = None¶The unique locator for the datastore.
- static
get(resource_name, id, opts=None, accessible=None, capacity=None, custom_attributes=None, datastore_cluster_id=None, disks=None, folder=None, free_space=None, host_system_id=None, maintenance_mode=None, multiple_host_access=None, name=None, tags=None, uncommitted_space=None, url=None)¶ Get an existing VmfsDatastore resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
accessible (pulumi.Input[bool]) – The connectivity status of the datastore. If this is
false, some other computed attributes may be out of date.capacity (pulumi.Input[float]) – Maximum capacity of the datastore, in megabytes.
custom_attributes (pulumi.Input[dict]) – Map of custom attribute ids to attribute value string to set on datastore resource.
datastore_cluster_id (pulumi.Input[str]) – The managed object ID 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
dc1datacenter, and a providedfolderoffoo/bar, The provider will place a datastore namedtestin a datastore folder located at/dc1/datastore/foo/bar, with the final inventory path being/dc1/datastore/foo/bar/test. Conflicts withdatastore_cluster_id.free_space (pulumi.Input[float]) – Available space of this datastore, in megabytes.
host_system_id (pulumi.Input[str]) – The managed object ID 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 (pulumi.Input[str]) – The current maintenance mode state of the datastore.
multiple_host_access (pulumi.Input[bool]) – If
true, more than one host in the datacenter has been configured with access to the datastore.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.
uncommitted_space (pulumi.Input[float]) – Total additional storage space, in megabytes, potentially used by all virtual machines on this datastore.
url (pulumi.Input[str]) – 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.Vnic(resource_name, opts=None, distributed_port_group=None, distributed_switch_port=None, host=None, ipv4=None, ipv6=None, mac=None, mtu=None, netstack=None, portgroup=None, __props__=None, __name__=None, __opts__=None)¶ Provides a VMware vSphere vnic resource.
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="mydc") h1 = vsphere.get_host(name="esxi1.host.test", datacenter_id=dc.id) d1 = vsphere.DistributedVirtualSwitch("d1", datacenter_id=dc.id, host=[{ "host_system_id": h1.id, "devices": ["vnic3"], }]) p1 = vsphere.DistributedPortGroup("p1", vlan_id=1234, distributed_virtual_switch_uuid=d1.id) v1 = vsphere.Vnic("v1", host=h1.id, distributed_switch_port=d1.id, distributed_port_group=p1.id, ipv4={ "dhcp": True, }, netstack="vmotion")
import pulumi import pulumi_vsphere as vsphere dc = vsphere.get_datacenter(name="mydc") h1 = vsphere.get_host(name="esxi1.host.test", datacenter_id=dc.id) hvs1 = vsphere.HostVirtualSwitch("hvs1", host_system_id=h1.id, network_adapters=[ "vmnic3", "vmnic4", ], active_nics=["vmnic3"], standby_nics=["vmnic4"]) p1 = vsphere.HostPortGroup("p1", virtual_switch_name=hvs1.name, host_system_id=h1.id) v1 = vsphere.Vnic("v1", host=h1.id, portgroup=p1.name, ipv4={ "dhcp": True, })
An existing vNic can be imported into this resource via supplying the vNic’s ID. An example is below:
import pulumi
The above would import the the vnic
vmk2from host with IDhost-123.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
distributed_port_group (pulumi.Input[str]) – Key of the distributed portgroup the nic will connect to.
distributed_switch_port (pulumi.Input[str]) – UUID of the DVSwitch the nic will be attached to. Do not set if you set portgroup.
host (pulumi.Input[str]) – ESX host the interface belongs to
ipv4 (pulumi.Input[dict]) – IPv4 settings. Either this or
ipv6needs to be set. See ipv4 options below.ipv6 (pulumi.Input[dict]) – IPv6 settings. Either this or
ipv6needs to be set. See ipv6 options below.mac (pulumi.Input[str]) – MAC address of the interface.
mtu (pulumi.Input[float]) – MTU of the interface.
netstack (pulumi.Input[str]) – TCP/IP stack setting for this interface. Possible values are ‘defaultTcpipStack’, ‘vmotion’, ‘vSphereProvisioning’. Changing this will force the creation of a new interface since it’s not possible to change the stack once it gets created. (Default:
defaultTcpipStack)portgroup (pulumi.Input[str]) – Portgroup to attach the nic to. Do not set if you set distributed_switch_port.
The ipv4 object supports the following:
dhcp(pulumi.Input[bool]) - Use DHCP to configure the interface’s IPv4 stack.gw(pulumi.Input[str]) - IP address of the default gateway, if DHCP or autoconfig is not set.ip(pulumi.Input[str]) - Address of the interface, if DHCP is not set.netmask(pulumi.Input[str]) - Netmask of the interface, if DHCP is not set.
The ipv6 object supports the following:
addresses(pulumi.Input[list]) - List of IPv6 addressesautoconfig(pulumi.Input[bool]) - Use IPv6 Autoconfiguration (RFC2462).dhcp(pulumi.Input[bool]) - Use DHCP to configure the interface’s IPv4 stack.gw(pulumi.Input[str]) - IP address of the default gateway, if DHCP or autoconfig is not set.
distributed_port_group: pulumi.Output[str] = None¶Key of the distributed portgroup the nic will connect to.
distributed_switch_port: pulumi.Output[str] = None¶UUID of the DVSwitch the nic will be attached to. Do not set if you set portgroup.
host: pulumi.Output[str] = None¶ESX host the interface belongs to
ipv4: pulumi.Output[dict] = None¶IPv4 settings. Either this or
ipv6needs to be set. See ipv4 options below.dhcp(bool) - Use DHCP to configure the interface’s IPv4 stack.gw(str) - IP address of the default gateway, if DHCP or autoconfig is not set.ip(str) - Address of the interface, if DHCP is not set.netmask(str) - Netmask of the interface, if DHCP is not set.
ipv6: pulumi.Output[dict] = None¶IPv6 settings. Either this or
ipv6needs to be set. See ipv6 options below.addresses(list) - List of IPv6 addressesautoconfig(bool) - Use IPv6 Autoconfiguration (RFC2462).dhcp(bool) - Use DHCP to configure the interface’s IPv4 stack.gw(str) - IP address of the default gateway, if DHCP or autoconfig is not set.
mac: pulumi.Output[str] = None¶MAC address of the interface.
mtu: pulumi.Output[float] = None¶MTU of the interface.
netstack: pulumi.Output[str] = None¶TCP/IP stack setting for this interface. Possible values are ‘defaultTcpipStack’, ‘vmotion’, ‘vSphereProvisioning’. Changing this will force the creation of a new interface since it’s not possible to change the stack once it gets created. (Default:
defaultTcpipStack)
portgroup: pulumi.Output[str] = None¶Portgroup to attach the nic to. Do not set if you set distributed_switch_port.
- static
get(resource_name, id, opts=None, distributed_port_group=None, distributed_switch_port=None, host=None, ipv4=None, ipv6=None, mac=None, mtu=None, netstack=None, portgroup=None)¶ Get an existing Vnic resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
distributed_port_group (pulumi.Input[str]) – Key of the distributed portgroup the nic will connect to.
distributed_switch_port (pulumi.Input[str]) – UUID of the DVSwitch the nic will be attached to. Do not set if you set portgroup.
host (pulumi.Input[str]) – ESX host the interface belongs to
ipv4 (pulumi.Input[dict]) – IPv4 settings. Either this or
ipv6needs to be set. See ipv4 options below.ipv6 (pulumi.Input[dict]) – IPv6 settings. Either this or
ipv6needs to be set. See ipv6 options below.mac (pulumi.Input[str]) – MAC address of the interface.
mtu (pulumi.Input[float]) – MTU of the interface.
netstack (pulumi.Input[str]) – TCP/IP stack setting for this interface. Possible values are ‘defaultTcpipStack’, ‘vmotion’, ‘vSphereProvisioning’. Changing this will force the creation of a new interface since it’s not possible to change the stack once it gets created. (Default:
defaultTcpipStack)portgroup (pulumi.Input[str]) – Portgroup to attach the nic to. Do not set if you set distributed_switch_port.
The ipv4 object supports the following:
dhcp(pulumi.Input[bool]) - Use DHCP to configure the interface’s IPv4 stack.gw(pulumi.Input[str]) - IP address of the default gateway, if DHCP or autoconfig is not set.ip(pulumi.Input[str]) - Address of the interface, if DHCP is not set.netmask(pulumi.Input[str]) - Netmask of the interface, if DHCP is not set.
The ipv6 object supports the following:
addresses(pulumi.Input[list]) - List of IPv6 addressesautoconfig(pulumi.Input[bool]) - Use IPv6 Autoconfiguration (RFC2462).dhcp(pulumi.Input[bool]) - Use DHCP to configure the interface’s IPv4 stack.gw(pulumi.Input[str]) - IP address of the default gateway, if DHCP or autoconfig is not set.
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, opts=None)¶The
.ComputeClusterdata 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.VirtualMachineresource, allowing you to specify the cluster’s root resource pool directly versus using the alias available through the.ResourcePooldata source.You may also wish to see the
.ComputeClusterresource for further details about clusters or how to work with them.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") compute_cluster = vsphere.get_compute_cluster(datacenter_id=data[".Datacenter"]["dc"]["id"], name="compute-cluster1")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the cluster is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.name (str) – The name or absolute path to the cluster.
pulumi_vsphere.get_content_library(name=None, opts=None)¶The
.ContentLibrarydata source can be used to discover the ID of a Content Library.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
import pulumi import pulumi_vsphere as vsphere library = vsphere.get_content_library(name="Content Library Test")
- Parameters
name (str) – The name of the Content Library.
pulumi_vsphere.get_content_library_item(library_id=None, name=None, opts=None)¶The
.ContentLibraryItemdata source can be used to discover the ID of a Content Library item.NOTE: This resource requires vCenter and is not available on direct ESXi connections.
import pulumi import pulumi_vsphere as vsphere library = vsphere.get_content_library(name="Content Library Test") item = vsphere.get_content_library_item(name="Ubuntu Bionic 18.04", library_id=library.id)
- Parameters
library_id (str) – The ID of the Content Library the item exists in.
name (str) – The name of the Content Library.
pulumi_vsphere.get_custom_attribute(name=None, opts=None)¶The
.CustomAttributedata source can be used to reference custom attributes that are not managed by this provider. Its attributes are exactly the same as the.CustomAttributeresource, and, like importing, the data source takes a name to search on. Theidand other attributes are then populated with the data found by the search.NOTE: Custom attributes are unsupported on direct ESXi connections and require vCenter.
import pulumi import pulumi_vsphere as vsphere attribute = vsphere.get_custom_attribute(name="test-attribute")
- Parameters
name (str) – The name of the custom attribute.
pulumi_vsphere.get_datacenter(name=None, opts=None)¶The
.Datacenterdata 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.Hostdata source.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1")
- Parameters
name (str) – The name of the datacenter. This can be a name or path. Can be omitted if there is only one datacenter in your inventory.
pulumi_vsphere.get_datastore(datacenter_id=None, name=None, opts=None)¶The
.getDatastoredata 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.VirtualMachineresource.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") datastore = vsphere.get_datastore(datacenter_id=datacenter.id, name="datastore1")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the datastore is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.name (str) – The name of the datastore. This can be a name or path.
pulumi_vsphere.get_datastore_cluster(datacenter_id=None, name=None, opts=None)¶The
.DatastoreClusterdata 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.NasDatastoreor.VmfsDatastoreresources, or create virtual machines in using the.VirtualMachineresource.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") datastore_cluster = vsphere.get_datastore_cluster(datacenter_id=data[".Datacenter"]["dc"]["id"], name="datastore-cluster1")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the datastore cluster is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.name (str) – The name or absolute path to the datastore cluster.
pulumi_vsphere.get_distributed_virtual_switch(datacenter_id=None, name=None, opts=None)¶The
.DistributedVirtualSwitchdata 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.DistributedPortGroupresource, for which an example is shown below.NOTE: This data source requires vCenter and is not available on direct ESXi connections.
import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") dvs = vsphere.get_distributed_virtual_switch(datacenter_id=datacenter.id, name="test-dvs") pg = vsphere.DistributedPortGroup("pg", active_uplinks=[dvs.uplinks[0]], distributed_virtual_switch_uuid=dvs.id, standby_uplinks=[dvs.uplinks[1]])
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the DVS is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.name (str) – The name of the distributed virtual switch. This can be a name or path.
pulumi_vsphere.get_dynamic(filters=None, name_regex=None, type=None, opts=None)¶- The
.getDynamicdata source can be used to get the `managed object reference ID </docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider>`_ of any tagged managed object in vCenter by providing a list of tag IDs and an optional regular expression to filter objects by name.
- Parameters
filters (list) – A list of tag IDs that must be present on an object to be a match.
name_regex (str) – A regular expression that will be used to match the object’s name.
type (str) –
The managed object type the returned object must match. For a full list, click here.
- The
pulumi_vsphere.get_folder(path=None, opts=None)¶The
.Folderdata source can be used to get the general attributes of a vSphere inventory folder. Paths are absolute and include must include the datacenter.import pulumi import pulumi_vsphere as vsphere folder = vsphere.get_folder(path="/dc1/datastore/folder1")
- Parameters
path (str) – The absolute path of the folder. For example, given a default datacenter of
default-dc, a folder of typevm, and a folder name oftest-folder, the resulting path would be/default-dc/vm/test-folder. The valid folder types to be used in the path are:vm,host,datacenter,datastore, ornetwork.
pulumi_vsphere.get_host(datacenter_id=None, name=None, opts=None)¶The
.Hostdata 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.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") host = vsphere.get_host(datacenter_id=datacenter.id, name="esxi1")
- Parameters
datacenter_id (str) – The managed object reference ID of a datacenter.
name (str) – The name of the host. This can be a name or path. Can be omitted if there is only one host in your inventory.
pulumi_vsphere.get_host_pci_device(class_id=None, host_id=None, name_regex=None, vendor_id=None, opts=None)¶The
.getHostPciDevicedata source can be used to discover the DeviceID of a vSphere host’s PCI device. This can then be used with.VirtualMachine’spci_device_id.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") host = vsphere.get_host(name="esxi1", datacenter_id=datacenter.id) dev = vsphere.get_host_pci_device(host_id=host.id, class_id=123, vendor_id=456)
data ".Datacenter" "datacenter" { name = "dc1" } data ".Host" "host" { name = "esxi1" datacenter_id = data.vsphere_datacenter.datacenter.id } data ".getHostPciDevice" "dev" { host_id = data.vsphere_host.host.id name_regex = "MMC" }- Parameters
class_id (str) – The hexadecimal PCI device class ID
host_id (str) – The [managed object reference ID][docs-about-morefs] of a host.
name_regex (str) – A regular expression that will be used to match the host PCI device name.
vendor_id (str) – The hexadecimal PCI device vendor ID.
pulumi_vsphere.get_network(datacenter_id=None, distributed_virtual_switch_uuid=None, name=None, opts=None)¶The
.getNetworkdata 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.VirtualMachineor 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.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") net = vsphere.get_network(datacenter_id=datacenter.id, name="test-net")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the network is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.distributed_virtual_switch_uuid (str) – For distributed port group type network objects, the ID of the distributed virtual switch the given port group belongs to. It is useful to differentiate port groups with same name using the Distributed virtual switch ID.
name (str) – The name of the network. This can be a name or path.
pulumi_vsphere.get_policy(name=None, opts=None)¶The
.getPolicydata source can be used to discover the UUID of a vSphere storage policy. This can then be used with resources or data sources that require a storage policy.NOTE: Storage policy support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
import pulumi import pulumi_vsphere as vsphere policy = vsphere.get_policy(name="policy1")
- Parameters
name (str) – The name of the storage policy.
pulumi_vsphere.get_resource_pool(datacenter_id=None, name=None, opts=None)¶The
.ResourcePooldata 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.VirtualMachineresource.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") pool = vsphere.get_resource_pool(datacenter_id=datacenter.id, name="resource-pool-1")
import pulumi import pulumi_vsphere as vsphere pool = vsphere.get_resource_pool(datacenter_id=data[".Datacenter"]["dc"]["id"], name="esxi1/Resources")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the resource pool is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use the id attribute from an empty.Datacenterdata source.name (str) – The name of the resource pool. This can be a name or path. This is required when using vCenter.
pulumi_vsphere.get_tag(category_id=None, name=None, opts=None)¶The
.Tagdata source can be used to reference tags that are not managed by this provider. Its attributes are exactly the same as the.Tagresource, and, like importing, the data source takes a name and category to search on. Theidand 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.
import pulumi import pulumi_vsphere as vsphere category = vsphere.get_tag_category(name="test-category") tag = vsphere.get_tag(category_id=category.id, name="test-tag")
- Parameters
category_id (str) – The ID of the tag category the tag is located in.
name (str) – The name of the tag.
pulumi_vsphere.get_tag_category(name=None, opts=None)¶The
.TagCategorydata source can be used to reference tag categories that are not managed by this provider. Its attributes are exactly the same as the.TagCategoryresource, and, like importing, the data source takes a name to search on. Theidand 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.
import pulumi import pulumi_vsphere as vsphere category = vsphere.get_tag_category(name="test-category")
- Parameters
name (str) – The name of the tag category.
pulumi_vsphere.get_vapp_container(datacenter_id=None, name=None, opts=None)¶The
.VappContainerdata 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.VirtualMachineresource.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") pool = vsphere.get_vapp_container(datacenter_id=datacenter.id, name="vapp-container-1")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the vApp container is located in.
name (str) – The name of the vApp container. This can be a name or path.
pulumi_vsphere.get_virtual_machine(datacenter_id=None, ide_controller_scan_count=None, name=None, sata_controller_scan_count=None, scsi_controller_scan_count=None, opts=None)¶The
.VirtualMachinedata 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.VirtualMachineresource. It also reads the guest ID so that can be supplied as well.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") template = vsphere.get_virtual_machine(datacenter_id=datacenter.id, name="test-vm-template")
- Parameters
datacenter_id (str) – The managed object reference ID of the datacenter the virtual machine is located in. This can be omitted if the search path used in
nameis an absolute path. For default datacenters, use theidattribute from an empty.Datacenterdata source.name (str) – The name of the virtual machine. This can be a name or path.
scsi_controller_scan_count (float) – The number of SCSI controllers to scan for disk attributes and controller types on. Default:
1.
pulumi_vsphere.get_vmfs_disks(filter=None, host_system_id=None, rescan=None, opts=None)¶The
.getVmfsDisksdata source can be used to discover the storage devices available on an ESXi host. This data source can be combined with the.VmfsDatastoreresource to create VMFS datastores based off a set of discovered disks.import pulumi import pulumi_vsphere as vsphere datacenter = vsphere.get_datacenter(name="dc1") host = vsphere.get_host(datacenter_id=datacenter.id, name="esxi1") available = vsphere.get_vmfs_disks(filter="mpx.vmhba1:C0:T[12]:L0", host_system_id=host.id, rescan=True)
- Parameters
filter (str) – A regular expression to filter the disks against. Only disks with canonical names that match will be included.
host_system_id (str) – The managed object ID of the host to look for disks on.
rescan (bool) – Whether or not to rescan storage adapters before searching for disks. This may lengthen the time it takes to perform the search. Default:
false.