pulumi-vsphere 4.14.0a1739946909__py3-none-any.whl → 4.17.0a1763710194__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/__init__.py +12 -1
- pulumi_vsphere/_inputs.py +1172 -1172
- pulumi_vsphere/_utilities.py +1 -1
- pulumi_vsphere/compute_cluster.py +1226 -1484
- pulumi_vsphere/compute_cluster_host_group.py +124 -53
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +88 -87
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +92 -87
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +109 -104
- pulumi_vsphere/compute_cluster_vm_group.py +58 -53
- pulumi_vsphere/compute_cluster_vm_host_rule.py +126 -121
- pulumi_vsphere/config/__init__.py +2 -1
- pulumi_vsphere/config/__init__.pyi +2 -2
- pulumi_vsphere/config/vars.py +15 -15
- pulumi_vsphere/configuration_profile.py +286 -0
- pulumi_vsphere/content_library.py +64 -59
- pulumi_vsphere/content_library_item.py +109 -104
- pulumi_vsphere/custom_attribute.py +41 -36
- pulumi_vsphere/datacenter.py +80 -79
- pulumi_vsphere/datastore_cluster.py +531 -477
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +92 -87
- pulumi_vsphere/distributed_port_group.py +802 -818
- pulumi_vsphere/distributed_virtual_switch.py +1590 -1620
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +71 -70
- pulumi_vsphere/dpm_host_override.py +159 -70
- pulumi_vsphere/drs_vm_override.py +75 -70
- pulumi_vsphere/entity_permissions.py +40 -39
- pulumi_vsphere/file.py +148 -162
- pulumi_vsphere/folder.py +104 -99
- pulumi_vsphere/get_compute_cluster.py +18 -18
- pulumi_vsphere/get_compute_cluster_host_group.py +18 -22
- pulumi_vsphere/get_configuration_profile.py +145 -0
- pulumi_vsphere/get_content_library.py +10 -10
- pulumi_vsphere/get_content_library_item.py +22 -22
- pulumi_vsphere/get_custom_attribute.py +12 -12
- pulumi_vsphere/get_datacenter.py +12 -12
- pulumi_vsphere/get_datastore.py +22 -22
- pulumi_vsphere/get_datastore_cluster.py +19 -19
- pulumi_vsphere/get_datastore_stats.py +22 -26
- pulumi_vsphere/get_distributed_virtual_switch.py +18 -18
- pulumi_vsphere/get_dynamic.py +22 -26
- pulumi_vsphere/get_folder.py +140 -18
- pulumi_vsphere/get_guest_os_customization.py +74 -21
- pulumi_vsphere/get_host.py +18 -18
- pulumi_vsphere/get_host_base_images.py +6 -6
- pulumi_vsphere/get_host_pci_device.py +30 -30
- pulumi_vsphere/get_host_thumbprint.py +22 -22
- pulumi_vsphere/get_host_vgpu_profile.py +17 -17
- pulumi_vsphere/get_license.py +26 -24
- pulumi_vsphere/get_network.py +80 -29
- pulumi_vsphere/get_ovf_vm_template.py +126 -126
- pulumi_vsphere/get_policy.py +10 -10
- pulumi_vsphere/get_resource_pool.py +77 -26
- pulumi_vsphere/get_role.py +26 -26
- pulumi_vsphere/get_tag.py +18 -18
- pulumi_vsphere/get_tag_category.py +16 -16
- pulumi_vsphere/get_vapp_container.py +16 -16
- pulumi_vsphere/get_virtual_machine.py +273 -273
- pulumi_vsphere/get_vmfs_disks.py +24 -24
- pulumi_vsphere/guest_os_customization.py +75 -74
- pulumi_vsphere/ha_vm_override.py +295 -374
- pulumi_vsphere/host.py +304 -249
- pulumi_vsphere/host_port_group.py +321 -341
- pulumi_vsphere/host_virtual_switch.py +373 -389
- pulumi_vsphere/license.py +125 -84
- pulumi_vsphere/nas_datastore.py +324 -261
- pulumi_vsphere/offline_software_depot.py +26 -21
- pulumi_vsphere/outputs.py +1003 -970
- pulumi_vsphere/provider.py +165 -146
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +691 -364
- pulumi_vsphere/role.py +46 -45
- pulumi_vsphere/storage_drs_vm_override.py +92 -87
- pulumi_vsphere/supervisor.py +210 -209
- pulumi_vsphere/tag.py +58 -53
- pulumi_vsphere/tag_category.py +75 -70
- pulumi_vsphere/vapp_container.py +262 -257
- pulumi_vsphere/vapp_entity.py +177 -172
- pulumi_vsphere/virtual_disk.py +130 -125
- pulumi_vsphere/virtual_machine.py +1339 -1443
- pulumi_vsphere/virtual_machine_class.py +109 -108
- pulumi_vsphere/virtual_machine_snapshot.py +122 -121
- pulumi_vsphere/vm_storage_policy.py +40 -39
- pulumi_vsphere/vmfs_datastore.py +189 -184
- pulumi_vsphere/vnic.py +145 -144
- {pulumi_vsphere-4.14.0a1739946909.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/METADATA +4 -4
- pulumi_vsphere-4.17.0a1763710194.dist-info/RECORD +89 -0
- {pulumi_vsphere-4.14.0a1739946909.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.14.0a1739946909.dist-info/RECORD +0 -87
- {pulumi_vsphere-4.14.0a1739946909.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
7
|
import sys
|
|
8
8
|
import pulumi
|
|
@@ -19,24 +19,24 @@ __all__ = ['DpmHostOverrideArgs', 'DpmHostOverride']
|
|
|
19
19
|
@pulumi.input_type
|
|
20
20
|
class DpmHostOverrideArgs:
|
|
21
21
|
def __init__(__self__, *,
|
|
22
|
-
compute_cluster_id: pulumi.Input[str],
|
|
23
|
-
host_system_id: pulumi.Input[str],
|
|
24
|
-
dpm_automation_level: Optional[pulumi.Input[str]] = None,
|
|
25
|
-
dpm_enabled: Optional[pulumi.Input[bool]] = None):
|
|
22
|
+
compute_cluster_id: pulumi.Input[_builtins.str],
|
|
23
|
+
host_system_id: pulumi.Input[_builtins.str],
|
|
24
|
+
dpm_automation_level: Optional[pulumi.Input[_builtins.str]] = None,
|
|
25
|
+
dpm_enabled: Optional[pulumi.Input[_builtins.bool]] = None):
|
|
26
26
|
"""
|
|
27
27
|
The set of arguments for constructing a DpmHostOverride resource.
|
|
28
|
-
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
28
|
+
:param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
|
|
29
29
|
ID of the cluster to put the override in. Forces a new
|
|
30
30
|
resource if changed.
|
|
31
|
-
:param pulumi.Input[str] host_system_id: The managed object ID of the host.
|
|
32
|
-
:param pulumi.Input[str] dpm_automation_level: The automation level for host power
|
|
31
|
+
:param pulumi.Input[_builtins.str] host_system_id: The managed object ID of the host.
|
|
32
|
+
:param pulumi.Input[_builtins.str] dpm_automation_level: The automation level for host power
|
|
33
33
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
34
34
|
`manual`.
|
|
35
35
|
|
|
36
36
|
> **NOTE:** Using this resource _always_ implies an override, even if one of
|
|
37
37
|
`dpm_enabled` or `dpm_automation_level` is omitted. Take note of the defaults
|
|
38
38
|
for both options.
|
|
39
|
-
:param pulumi.Input[bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
39
|
+
:param pulumi.Input[_builtins.bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
40
40
|
`false`.
|
|
41
41
|
"""
|
|
42
42
|
pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
|
|
@@ -46,9 +46,9 @@ class DpmHostOverrideArgs:
|
|
|
46
46
|
if dpm_enabled is not None:
|
|
47
47
|
pulumi.set(__self__, "dpm_enabled", dpm_enabled)
|
|
48
48
|
|
|
49
|
-
@property
|
|
49
|
+
@_builtins.property
|
|
50
50
|
@pulumi.getter(name="computeClusterId")
|
|
51
|
-
def compute_cluster_id(self) -> pulumi.Input[str]:
|
|
51
|
+
def compute_cluster_id(self) -> pulumi.Input[_builtins.str]:
|
|
52
52
|
"""
|
|
53
53
|
The managed object reference
|
|
54
54
|
ID of the cluster to put the override in. Forces a new
|
|
@@ -57,24 +57,24 @@ class DpmHostOverrideArgs:
|
|
|
57
57
|
return pulumi.get(self, "compute_cluster_id")
|
|
58
58
|
|
|
59
59
|
@compute_cluster_id.setter
|
|
60
|
-
def compute_cluster_id(self, value: pulumi.Input[str]):
|
|
60
|
+
def compute_cluster_id(self, value: pulumi.Input[_builtins.str]):
|
|
61
61
|
pulumi.set(self, "compute_cluster_id", value)
|
|
62
62
|
|
|
63
|
-
@property
|
|
63
|
+
@_builtins.property
|
|
64
64
|
@pulumi.getter(name="hostSystemId")
|
|
65
|
-
def host_system_id(self) -> pulumi.Input[str]:
|
|
65
|
+
def host_system_id(self) -> pulumi.Input[_builtins.str]:
|
|
66
66
|
"""
|
|
67
67
|
The managed object ID of the host.
|
|
68
68
|
"""
|
|
69
69
|
return pulumi.get(self, "host_system_id")
|
|
70
70
|
|
|
71
71
|
@host_system_id.setter
|
|
72
|
-
def host_system_id(self, value: pulumi.Input[str]):
|
|
72
|
+
def host_system_id(self, value: pulumi.Input[_builtins.str]):
|
|
73
73
|
pulumi.set(self, "host_system_id", value)
|
|
74
74
|
|
|
75
|
-
@property
|
|
75
|
+
@_builtins.property
|
|
76
76
|
@pulumi.getter(name="dpmAutomationLevel")
|
|
77
|
-
def dpm_automation_level(self) -> Optional[pulumi.Input[str]]:
|
|
77
|
+
def dpm_automation_level(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
78
78
|
"""
|
|
79
79
|
The automation level for host power
|
|
80
80
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
@@ -87,12 +87,12 @@ class DpmHostOverrideArgs:
|
|
|
87
87
|
return pulumi.get(self, "dpm_automation_level")
|
|
88
88
|
|
|
89
89
|
@dpm_automation_level.setter
|
|
90
|
-
def dpm_automation_level(self, value: Optional[pulumi.Input[str]]):
|
|
90
|
+
def dpm_automation_level(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
91
91
|
pulumi.set(self, "dpm_automation_level", value)
|
|
92
92
|
|
|
93
|
-
@property
|
|
93
|
+
@_builtins.property
|
|
94
94
|
@pulumi.getter(name="dpmEnabled")
|
|
95
|
-
def dpm_enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
95
|
+
def dpm_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
96
96
|
"""
|
|
97
97
|
Enable DPM support for this host. Default:
|
|
98
98
|
`false`.
|
|
@@ -100,32 +100,32 @@ class DpmHostOverrideArgs:
|
|
|
100
100
|
return pulumi.get(self, "dpm_enabled")
|
|
101
101
|
|
|
102
102
|
@dpm_enabled.setter
|
|
103
|
-
def dpm_enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
103
|
+
def dpm_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
104
104
|
pulumi.set(self, "dpm_enabled", value)
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
@pulumi.input_type
|
|
108
108
|
class _DpmHostOverrideState:
|
|
109
109
|
def __init__(__self__, *,
|
|
110
|
-
compute_cluster_id: Optional[pulumi.Input[str]] = None,
|
|
111
|
-
dpm_automation_level: Optional[pulumi.Input[str]] = None,
|
|
112
|
-
dpm_enabled: Optional[pulumi.Input[bool]] = None,
|
|
113
|
-
host_system_id: Optional[pulumi.Input[str]] = None):
|
|
110
|
+
compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
111
|
+
dpm_automation_level: Optional[pulumi.Input[_builtins.str]] = None,
|
|
112
|
+
dpm_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
113
|
+
host_system_id: Optional[pulumi.Input[_builtins.str]] = None):
|
|
114
114
|
"""
|
|
115
115
|
Input properties used for looking up and filtering DpmHostOverride resources.
|
|
116
|
-
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
116
|
+
:param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
|
|
117
117
|
ID of the cluster to put the override in. Forces a new
|
|
118
118
|
resource if changed.
|
|
119
|
-
:param pulumi.Input[str] dpm_automation_level: The automation level for host power
|
|
119
|
+
:param pulumi.Input[_builtins.str] dpm_automation_level: The automation level for host power
|
|
120
120
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
121
121
|
`manual`.
|
|
122
122
|
|
|
123
123
|
> **NOTE:** Using this resource _always_ implies an override, even if one of
|
|
124
124
|
`dpm_enabled` or `dpm_automation_level` is omitted. Take note of the defaults
|
|
125
125
|
for both options.
|
|
126
|
-
:param pulumi.Input[bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
126
|
+
:param pulumi.Input[_builtins.bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
127
127
|
`false`.
|
|
128
|
-
:param pulumi.Input[str] host_system_id: The managed object ID of the host.
|
|
128
|
+
:param pulumi.Input[_builtins.str] host_system_id: The managed object ID of the host.
|
|
129
129
|
"""
|
|
130
130
|
if compute_cluster_id is not None:
|
|
131
131
|
pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
|
|
@@ -136,9 +136,9 @@ class _DpmHostOverrideState:
|
|
|
136
136
|
if host_system_id is not None:
|
|
137
137
|
pulumi.set(__self__, "host_system_id", host_system_id)
|
|
138
138
|
|
|
139
|
-
@property
|
|
139
|
+
@_builtins.property
|
|
140
140
|
@pulumi.getter(name="computeClusterId")
|
|
141
|
-
def compute_cluster_id(self) -> Optional[pulumi.Input[str]]:
|
|
141
|
+
def compute_cluster_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
142
142
|
"""
|
|
143
143
|
The managed object reference
|
|
144
144
|
ID of the cluster to put the override in. Forces a new
|
|
@@ -147,12 +147,12 @@ class _DpmHostOverrideState:
|
|
|
147
147
|
return pulumi.get(self, "compute_cluster_id")
|
|
148
148
|
|
|
149
149
|
@compute_cluster_id.setter
|
|
150
|
-
def compute_cluster_id(self, value: Optional[pulumi.Input[str]]):
|
|
150
|
+
def compute_cluster_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
151
151
|
pulumi.set(self, "compute_cluster_id", value)
|
|
152
152
|
|
|
153
|
-
@property
|
|
153
|
+
@_builtins.property
|
|
154
154
|
@pulumi.getter(name="dpmAutomationLevel")
|
|
155
|
-
def dpm_automation_level(self) -> Optional[pulumi.Input[str]]:
|
|
155
|
+
def dpm_automation_level(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
156
156
|
"""
|
|
157
157
|
The automation level for host power
|
|
158
158
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
@@ -165,12 +165,12 @@ class _DpmHostOverrideState:
|
|
|
165
165
|
return pulumi.get(self, "dpm_automation_level")
|
|
166
166
|
|
|
167
167
|
@dpm_automation_level.setter
|
|
168
|
-
def dpm_automation_level(self, value: Optional[pulumi.Input[str]]):
|
|
168
|
+
def dpm_automation_level(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
169
169
|
pulumi.set(self, "dpm_automation_level", value)
|
|
170
170
|
|
|
171
|
-
@property
|
|
171
|
+
@_builtins.property
|
|
172
172
|
@pulumi.getter(name="dpmEnabled")
|
|
173
|
-
def dpm_enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
173
|
+
def dpm_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
174
174
|
"""
|
|
175
175
|
Enable DPM support for this host. Default:
|
|
176
176
|
`false`.
|
|
@@ -178,31 +178,32 @@ class _DpmHostOverrideState:
|
|
|
178
178
|
return pulumi.get(self, "dpm_enabled")
|
|
179
179
|
|
|
180
180
|
@dpm_enabled.setter
|
|
181
|
-
def dpm_enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
181
|
+
def dpm_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
182
182
|
pulumi.set(self, "dpm_enabled", value)
|
|
183
183
|
|
|
184
|
-
@property
|
|
184
|
+
@_builtins.property
|
|
185
185
|
@pulumi.getter(name="hostSystemId")
|
|
186
|
-
def host_system_id(self) -> Optional[pulumi.Input[str]]:
|
|
186
|
+
def host_system_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
187
187
|
"""
|
|
188
188
|
The managed object ID of the host.
|
|
189
189
|
"""
|
|
190
190
|
return pulumi.get(self, "host_system_id")
|
|
191
191
|
|
|
192
192
|
@host_system_id.setter
|
|
193
|
-
def host_system_id(self, value: Optional[pulumi.Input[str]]):
|
|
193
|
+
def host_system_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
194
194
|
pulumi.set(self, "host_system_id", value)
|
|
195
195
|
|
|
196
196
|
|
|
197
|
+
@pulumi.type_token("vsphere:index/dpmHostOverride:DpmHostOverride")
|
|
197
198
|
class DpmHostOverride(pulumi.CustomResource):
|
|
198
199
|
@overload
|
|
199
200
|
def __init__(__self__,
|
|
200
201
|
resource_name: str,
|
|
201
202
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
202
|
-
compute_cluster_id: Optional[pulumi.Input[str]] = None,
|
|
203
|
-
dpm_automation_level: Optional[pulumi.Input[str]] = None,
|
|
204
|
-
dpm_enabled: Optional[pulumi.Input[bool]] = None,
|
|
205
|
-
host_system_id: Optional[pulumi.Input[str]] = None,
|
|
203
|
+
compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
204
|
+
dpm_automation_level: Optional[pulumi.Input[_builtins.str]] = None,
|
|
205
|
+
dpm_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
206
|
+
host_system_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
206
207
|
__props__=None):
|
|
207
208
|
"""
|
|
208
209
|
The `DpmHostOverride` resource can be used to add a DPM override to a
|
|
@@ -218,6 +219,48 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
218
219
|
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
219
220
|
connections.
|
|
220
221
|
|
|
222
|
+
## Example Usage
|
|
223
|
+
|
|
224
|
+
The following example creates a compute cluster comprised of three hosts,
|
|
225
|
+
making use of the
|
|
226
|
+
`ComputeCluster` resource. DPM
|
|
227
|
+
will be disabled in the cluster as it is the default setting, but we override
|
|
228
|
+
the setting of the first host referenced by the
|
|
229
|
+
`Host` data source (`esxi1`) by using
|
|
230
|
+
the `DpmHostOverride` resource so it will be powered off when the
|
|
231
|
+
cluster does not need it to service virtual machines.
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
import pulumi
|
|
235
|
+
import pulumi_vsphere as vsphere
|
|
236
|
+
|
|
237
|
+
config = pulumi.Config()
|
|
238
|
+
datacenter = config.get("datacenter")
|
|
239
|
+
if datacenter is None:
|
|
240
|
+
datacenter = "dc-01"
|
|
241
|
+
hosts = config.get_object("hosts")
|
|
242
|
+
if hosts is None:
|
|
243
|
+
hosts = [
|
|
244
|
+
"esxi-01.example.com",
|
|
245
|
+
"esxi-02.example.com",
|
|
246
|
+
"esxi-03.example.com",
|
|
247
|
+
]
|
|
248
|
+
datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
|
|
249
|
+
hosts_get_host = [vsphere.get_host(name=hosts[__index],
|
|
250
|
+
datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
|
|
251
|
+
compute_cluster = vsphere.ComputeCluster("compute_cluster",
|
|
252
|
+
name="compute-cluster-test",
|
|
253
|
+
datacenter_id=dc["id"],
|
|
254
|
+
host_system_ids=[[__item.id for __item in hosts_get_host]],
|
|
255
|
+
drs_enabled=True,
|
|
256
|
+
drs_automation_level="fullyAutomated")
|
|
257
|
+
dpm_host_override = vsphere.DpmHostOverride("dpm_host_override",
|
|
258
|
+
compute_cluster_id=compute_cluster.id,
|
|
259
|
+
host_system_id=hosts_get_host[0].id,
|
|
260
|
+
dpm_enabled=True,
|
|
261
|
+
dpm_automation_level="automated")
|
|
262
|
+
```
|
|
263
|
+
|
|
221
264
|
## Import
|
|
222
265
|
|
|
223
266
|
An existing override can be imported into this resource by
|
|
@@ -226,6 +269,8 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
226
269
|
|
|
227
270
|
import`. If no override exists, an error will be given. An example is below:
|
|
228
271
|
|
|
272
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
273
|
+
|
|
229
274
|
```sh
|
|
230
275
|
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
231
276
|
```
|
|
@@ -236,19 +281,19 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
236
281
|
|
|
237
282
|
:param str resource_name: The name of the resource.
|
|
238
283
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
239
|
-
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
284
|
+
:param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
|
|
240
285
|
ID of the cluster to put the override in. Forces a new
|
|
241
286
|
resource if changed.
|
|
242
|
-
:param pulumi.Input[str] dpm_automation_level: The automation level for host power
|
|
287
|
+
:param pulumi.Input[_builtins.str] dpm_automation_level: The automation level for host power
|
|
243
288
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
244
289
|
`manual`.
|
|
245
290
|
|
|
246
291
|
> **NOTE:** Using this resource _always_ implies an override, even if one of
|
|
247
292
|
`dpm_enabled` or `dpm_automation_level` is omitted. Take note of the defaults
|
|
248
293
|
for both options.
|
|
249
|
-
:param pulumi.Input[bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
294
|
+
:param pulumi.Input[_builtins.bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
250
295
|
`false`.
|
|
251
|
-
:param pulumi.Input[str] host_system_id: The managed object ID of the host.
|
|
296
|
+
:param pulumi.Input[_builtins.str] host_system_id: The managed object ID of the host.
|
|
252
297
|
"""
|
|
253
298
|
...
|
|
254
299
|
@overload
|
|
@@ -270,6 +315,48 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
270
315
|
> **NOTE:** This resource requires vCenter and is not available on direct ESXi
|
|
271
316
|
connections.
|
|
272
317
|
|
|
318
|
+
## Example Usage
|
|
319
|
+
|
|
320
|
+
The following example creates a compute cluster comprised of three hosts,
|
|
321
|
+
making use of the
|
|
322
|
+
`ComputeCluster` resource. DPM
|
|
323
|
+
will be disabled in the cluster as it is the default setting, but we override
|
|
324
|
+
the setting of the first host referenced by the
|
|
325
|
+
`Host` data source (`esxi1`) by using
|
|
326
|
+
the `DpmHostOverride` resource so it will be powered off when the
|
|
327
|
+
cluster does not need it to service virtual machines.
|
|
328
|
+
|
|
329
|
+
```python
|
|
330
|
+
import pulumi
|
|
331
|
+
import pulumi_vsphere as vsphere
|
|
332
|
+
|
|
333
|
+
config = pulumi.Config()
|
|
334
|
+
datacenter = config.get("datacenter")
|
|
335
|
+
if datacenter is None:
|
|
336
|
+
datacenter = "dc-01"
|
|
337
|
+
hosts = config.get_object("hosts")
|
|
338
|
+
if hosts is None:
|
|
339
|
+
hosts = [
|
|
340
|
+
"esxi-01.example.com",
|
|
341
|
+
"esxi-02.example.com",
|
|
342
|
+
"esxi-03.example.com",
|
|
343
|
+
]
|
|
344
|
+
datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
|
|
345
|
+
hosts_get_host = [vsphere.get_host(name=hosts[__index],
|
|
346
|
+
datacenter_id=datacenter_get_datacenter.id) for __index in range(len(hosts))]
|
|
347
|
+
compute_cluster = vsphere.ComputeCluster("compute_cluster",
|
|
348
|
+
name="compute-cluster-test",
|
|
349
|
+
datacenter_id=dc["id"],
|
|
350
|
+
host_system_ids=[[__item.id for __item in hosts_get_host]],
|
|
351
|
+
drs_enabled=True,
|
|
352
|
+
drs_automation_level="fullyAutomated")
|
|
353
|
+
dpm_host_override = vsphere.DpmHostOverride("dpm_host_override",
|
|
354
|
+
compute_cluster_id=compute_cluster.id,
|
|
355
|
+
host_system_id=hosts_get_host[0].id,
|
|
356
|
+
dpm_enabled=True,
|
|
357
|
+
dpm_automation_level="automated")
|
|
358
|
+
```
|
|
359
|
+
|
|
273
360
|
## Import
|
|
274
361
|
|
|
275
362
|
An existing override can be imported into this resource by
|
|
@@ -278,6 +365,8 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
278
365
|
|
|
279
366
|
import`. If no override exists, an error will be given. An example is below:
|
|
280
367
|
|
|
368
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
369
|
+
|
|
281
370
|
```sh
|
|
282
371
|
$ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \\
|
|
283
372
|
```
|
|
@@ -301,10 +390,10 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
301
390
|
def _internal_init(__self__,
|
|
302
391
|
resource_name: str,
|
|
303
392
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
304
|
-
compute_cluster_id: Optional[pulumi.Input[str]] = None,
|
|
305
|
-
dpm_automation_level: Optional[pulumi.Input[str]] = None,
|
|
306
|
-
dpm_enabled: Optional[pulumi.Input[bool]] = None,
|
|
307
|
-
host_system_id: Optional[pulumi.Input[str]] = None,
|
|
393
|
+
compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
394
|
+
dpm_automation_level: Optional[pulumi.Input[_builtins.str]] = None,
|
|
395
|
+
dpm_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
396
|
+
host_system_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
308
397
|
__props__=None):
|
|
309
398
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
310
399
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -332,10 +421,10 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
332
421
|
def get(resource_name: str,
|
|
333
422
|
id: pulumi.Input[str],
|
|
334
423
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
335
|
-
compute_cluster_id: Optional[pulumi.Input[str]] = None,
|
|
336
|
-
dpm_automation_level: Optional[pulumi.Input[str]] = None,
|
|
337
|
-
dpm_enabled: Optional[pulumi.Input[bool]] = None,
|
|
338
|
-
host_system_id: Optional[pulumi.Input[str]] = None) -> 'DpmHostOverride':
|
|
424
|
+
compute_cluster_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
425
|
+
dpm_automation_level: Optional[pulumi.Input[_builtins.str]] = None,
|
|
426
|
+
dpm_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
427
|
+
host_system_id: Optional[pulumi.Input[_builtins.str]] = None) -> 'DpmHostOverride':
|
|
339
428
|
"""
|
|
340
429
|
Get an existing DpmHostOverride resource's state with the given name, id, and optional extra
|
|
341
430
|
properties used to qualify the lookup.
|
|
@@ -343,19 +432,19 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
343
432
|
:param str resource_name: The unique name of the resulting resource.
|
|
344
433
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
345
434
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
346
|
-
:param pulumi.Input[str] compute_cluster_id: The managed object reference
|
|
435
|
+
:param pulumi.Input[_builtins.str] compute_cluster_id: The managed object reference
|
|
347
436
|
ID of the cluster to put the override in. Forces a new
|
|
348
437
|
resource if changed.
|
|
349
|
-
:param pulumi.Input[str] dpm_automation_level: The automation level for host power
|
|
438
|
+
:param pulumi.Input[_builtins.str] dpm_automation_level: The automation level for host power
|
|
350
439
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
351
440
|
`manual`.
|
|
352
441
|
|
|
353
442
|
> **NOTE:** Using this resource _always_ implies an override, even if one of
|
|
354
443
|
`dpm_enabled` or `dpm_automation_level` is omitted. Take note of the defaults
|
|
355
444
|
for both options.
|
|
356
|
-
:param pulumi.Input[bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
445
|
+
:param pulumi.Input[_builtins.bool] dpm_enabled: Enable DPM support for this host. Default:
|
|
357
446
|
`false`.
|
|
358
|
-
:param pulumi.Input[str] host_system_id: The managed object ID of the host.
|
|
447
|
+
:param pulumi.Input[_builtins.str] host_system_id: The managed object ID of the host.
|
|
359
448
|
"""
|
|
360
449
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
361
450
|
|
|
@@ -367,9 +456,9 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
367
456
|
__props__.__dict__["host_system_id"] = host_system_id
|
|
368
457
|
return DpmHostOverride(resource_name, opts=opts, __props__=__props__)
|
|
369
458
|
|
|
370
|
-
@property
|
|
459
|
+
@_builtins.property
|
|
371
460
|
@pulumi.getter(name="computeClusterId")
|
|
372
|
-
def compute_cluster_id(self) -> pulumi.Output[str]:
|
|
461
|
+
def compute_cluster_id(self) -> pulumi.Output[_builtins.str]:
|
|
373
462
|
"""
|
|
374
463
|
The managed object reference
|
|
375
464
|
ID of the cluster to put the override in. Forces a new
|
|
@@ -377,9 +466,9 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
377
466
|
"""
|
|
378
467
|
return pulumi.get(self, "compute_cluster_id")
|
|
379
468
|
|
|
380
|
-
@property
|
|
469
|
+
@_builtins.property
|
|
381
470
|
@pulumi.getter(name="dpmAutomationLevel")
|
|
382
|
-
def dpm_automation_level(self) -> pulumi.Output[Optional[str]]:
|
|
471
|
+
def dpm_automation_level(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
383
472
|
"""
|
|
384
473
|
The automation level for host power
|
|
385
474
|
operations on this host. Can be one of `manual` or `automated`. Default:
|
|
@@ -391,18 +480,18 @@ class DpmHostOverride(pulumi.CustomResource):
|
|
|
391
480
|
"""
|
|
392
481
|
return pulumi.get(self, "dpm_automation_level")
|
|
393
482
|
|
|
394
|
-
@property
|
|
483
|
+
@_builtins.property
|
|
395
484
|
@pulumi.getter(name="dpmEnabled")
|
|
396
|
-
def dpm_enabled(self) -> pulumi.Output[Optional[bool]]:
|
|
485
|
+
def dpm_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
397
486
|
"""
|
|
398
487
|
Enable DPM support for this host. Default:
|
|
399
488
|
`false`.
|
|
400
489
|
"""
|
|
401
490
|
return pulumi.get(self, "dpm_enabled")
|
|
402
491
|
|
|
403
|
-
@property
|
|
492
|
+
@_builtins.property
|
|
404
493
|
@pulumi.getter(name="hostSystemId")
|
|
405
|
-
def host_system_id(self) -> pulumi.Output[str]:
|
|
494
|
+
def host_system_id(self) -> pulumi.Output[_builtins.str]:
|
|
406
495
|
"""
|
|
407
496
|
The managed object ID of the host.
|
|
408
497
|
"""
|