generated from pulumi/pulumi-tf-provider-boilerplate
/
virtualMachine.go
958 lines (864 loc) · 53.5 KB
/
virtualMachine.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nutanix
import (
"context"
"reflect"
"errors"
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Nutanix Virtual Machine resource to Create a virtual machine.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// clusters, err := nutanix.GetClusters(ctx, nil, nil)
// if err != nil {
// return err
// }
// _, err = nutanix.NewVirtualMachine(ctx, "vm1", &nutanix.VirtualMachineArgs{
// ClusterUuid: *pulumi.String(clusters.Entities[0].Metadata.Uuid),
// Categories: nutanix.VirtualMachineCategoryArray{
// &nutanix.VirtualMachineCategoryArgs{
// Name: pulumi.String("Environment"),
// Value: pulumi.String("Staging"),
// },
// },
// NumVcpusPerSocket: pulumi.Int(1),
// NumSockets: pulumi.Int(1),
// MemorySizeMib: pulumi.Int(2048),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// ### With Storage Config
// ```go
// package main
//
// import (
//
// "github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// clusters, err := nutanix.GetClusters(ctx, nil, nil)
// if err != nil {
// return err
// }
// _, err = nutanix.NewVirtualMachine(ctx, "vm", &nutanix.VirtualMachineArgs{
// ClusterUuid: *pulumi.String(clusters.Entities[0].Metadata.Uuid),
// NumVcpusPerSocket: pulumi.Int(1),
// NumSockets: pulumi.Int(1),
// MemorySizeMib: pulumi.Int(186),
// DiskLists: nutanix.VirtualMachineDiskListArray{
// &nutanix.VirtualMachineDiskListArgs{
// DiskSizeBytes: pulumi.Int(68157440),
// DiskSizeMib: pulumi.Int(65),
// StorageConfig: &nutanix.VirtualMachineDiskListStorageConfigArgs{
// StorageContainerReferences: nutanix.VirtualMachineDiskListStorageConfigStorageContainerReferenceArray{
// &nutanix.VirtualMachineDiskListStorageConfigStorageContainerReferenceArgs{
// Kind: pulumi.String("storage_container"),
// Uuid: pulumi.String("2bbe67bc-fd14-4637-8de1-6379257f4219"),
// },
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
type VirtualMachine struct {
pulumi.CustomResourceState
// The version of the API.
ApiVersion pulumi.StringOutput `pulumi:"apiVersion"`
// - (Optional) The reference to a availability_zone.
AvailabilityZoneReference pulumi.StringMapOutput `pulumi:"availabilityZoneReference"`
// - (Optional) Address of disk to boot from.
BootDeviceDiskAddress pulumi.StringMapOutput `pulumi:"bootDeviceDiskAddress"`
// - (Optional) MAC address of nic to boot from.
BootDeviceMacAddress pulumi.StringOutput `pulumi:"bootDeviceMacAddress"`
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
BootDeviceOrderLists pulumi.StringArrayOutput `pulumi:"bootDeviceOrderLists"`
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
BootType pulumi.StringOutput `pulumi:"bootType"`
// - (Optional) Categories for the vm.
Categories VirtualMachineCategoryArrayOutput `pulumi:"categories"`
CloudInitCdromUuid pulumi.StringOutput `pulumi:"cloudInitCdromUuid"`
// - The name of the cluster.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// - (Required) The UUID of the cluster.
ClusterUuid pulumi.StringOutput `pulumi:"clusterUuid"`
// - (Optional) A description for vm.
Description pulumi.StringOutput `pulumi:"description"`
// Disks attached to the VM.
DiskLists VirtualMachineDiskListArrayOutput `pulumi:"diskLists"`
// - (Optional) Add true to enable CPU passthrough.
EnableCpuPassthrough pulumi.BoolPtrOutput `pulumi:"enableCpuPassthrough"`
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec pulumi.BoolOutput `pulumi:"enableScriptExec"`
// - (Optional) GPUs attached to the VM.
GpuLists VirtualMachineGpuListArrayOutput `pulumi:"gpuLists"`
// - (Optional) Generic key value pair used for custom attributes in cloud init.
GuestCustomizationCloudInitCustomKeyValues pulumi.StringMapOutput `pulumi:"guestCustomizationCloudInitCustomKeyValues"`
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
GuestCustomizationCloudInitMetaData pulumi.StringOutput `pulumi:"guestCustomizationCloudInitMetaData"`
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
GuestCustomizationCloudInitUserData pulumi.StringOutput `pulumi:"guestCustomizationCloudInitUserData"`
// - (Optional) Flag to allow override of customization by deployer.
GuestCustomizationIsOverridable pulumi.BoolOutput `pulumi:"guestCustomizationIsOverridable"`
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
GuestCustomizationSysprep pulumi.StringMapOutput `pulumi:"guestCustomizationSysprep"`
GuestCustomizationSysprepCustomKeyValues pulumi.MapOutput `pulumi:"guestCustomizationSysprepCustomKeyValues"`
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
GuestOsId pulumi.StringOutput `pulumi:"guestOsId"`
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone pulumi.StringOutput `pulumi:"hardwareClockTimezone"`
// - Reference to a host.
HostReference pulumi.StringMapOutput `pulumi:"hostReference"`
// - The hypervisor type for the hypervisor the VM is hosted on.
HypervisorType pulumi.StringOutput `pulumi:"hypervisorType"`
// - (Optional) Add true to enable CPU pinning.
IsVcpuHardPinned pulumi.BoolPtrOutput `pulumi:"isVcpuHardPinned"`
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
MachineType pulumi.StringOutput `pulumi:"machineType"`
// - (Optional) Memory size in MiB.
MemorySizeMib pulumi.IntOutput `pulumi:"memorySizeMib"`
// - The vm kind metadata.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// - (Required) The name for the vm.
Name pulumi.StringOutput `pulumi:"name"`
// - (Ooptional) Credentials to login server.
NgtCredentials pulumi.MapOutput `pulumi:"ngtCredentials"`
// Application names that are enabled.
NgtEnabledCapabilityLists pulumi.StringArrayOutput `pulumi:"ngtEnabledCapabilityLists"`
// - Status NICs attached to the VM.
NicListStatuses VirtualMachineNicListStatusArrayOutput `pulumi:"nicListStatuses"`
// - (Optional) Spec NICs attached to the VM.
NicLists VirtualMachineNicListArrayOutput `pulumi:"nicLists"`
// - (Optional) Number of vCPU sockets.
NumSockets pulumi.IntOutput `pulumi:"numSockets"`
// - (Optional) Number of vCPUs per socket.
NumVcpusPerSocket pulumi.IntOutput `pulumi:"numVcpusPerSocket"`
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes pulumi.IntOutput `pulumi:"numVnumaNodes"`
// - (Optional) Information regarding Nutanix Guest Tools.
NutanixGuestTools pulumi.StringMapOutput `pulumi:"nutanixGuestTools"`
// - (Optional) The reference to a user.
OwnerReference pulumi.StringMapOutput `pulumi:"ownerReference"`
ParentReference pulumi.StringMapOutput `pulumi:"parentReference"`
// - (Optional) The current or desired power state of the VM. (Options : ON , OFF)
PowerState pulumi.StringOutput `pulumi:"powerState"`
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
PowerStateMechanism pulumi.StringOutput `pulumi:"powerStateMechanism"`
// - (Optional) The reference to a project.
ProjectReference pulumi.StringMapOutput `pulumi:"projectReference"`
// - (Optional) Serial Ports configured on the VM.
SerialPortLists VirtualMachineSerialPortListArrayOutput `pulumi:"serialPortLists"`
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure pulumi.BoolOutput `pulumi:"shouldFailOnScriptFailure"`
// - (Optional) Nutanix Guest Tools is enabled or not.
State pulumi.StringOutput `pulumi:"state"`
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
UseHotAdd pulumi.BoolPtrOutput `pulumi:"useHotAdd"`
// - (Optional) Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled pulumi.BoolOutput `pulumi:"vgaConsoleEnabled"`
}
// NewVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewVirtualMachine(ctx *pulumi.Context,
name string, args *VirtualMachineArgs, opts ...pulumi.ResourceOption) (*VirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterUuid == nil {
return nil, errors.New("invalid value for required argument 'ClusterUuid'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualMachine
err := ctx.RegisterResource("nutanix:index/virtualMachine:VirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualMachine gets an existing VirtualMachine resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualMachineState, opts ...pulumi.ResourceOption) (*VirtualMachine, error) {
var resource VirtualMachine
err := ctx.ReadResource("nutanix:index/virtualMachine:VirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualMachine resources.
type virtualMachineState struct {
// The version of the API.
ApiVersion *string `pulumi:"apiVersion"`
// - (Optional) The reference to a availability_zone.
AvailabilityZoneReference map[string]string `pulumi:"availabilityZoneReference"`
// - (Optional) Address of disk to boot from.
BootDeviceDiskAddress map[string]string `pulumi:"bootDeviceDiskAddress"`
// - (Optional) MAC address of nic to boot from.
BootDeviceMacAddress *string `pulumi:"bootDeviceMacAddress"`
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
BootDeviceOrderLists []string `pulumi:"bootDeviceOrderLists"`
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
BootType *string `pulumi:"bootType"`
// - (Optional) Categories for the vm.
Categories []VirtualMachineCategory `pulumi:"categories"`
CloudInitCdromUuid *string `pulumi:"cloudInitCdromUuid"`
// - The name of the cluster.
ClusterName *string `pulumi:"clusterName"`
// - (Required) The UUID of the cluster.
ClusterUuid *string `pulumi:"clusterUuid"`
// - (Optional) A description for vm.
Description *string `pulumi:"description"`
// Disks attached to the VM.
DiskLists []VirtualMachineDiskList `pulumi:"diskLists"`
// - (Optional) Add true to enable CPU passthrough.
EnableCpuPassthrough *bool `pulumi:"enableCpuPassthrough"`
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec *bool `pulumi:"enableScriptExec"`
// - (Optional) GPUs attached to the VM.
GpuLists []VirtualMachineGpuList `pulumi:"gpuLists"`
// - (Optional) Generic key value pair used for custom attributes in cloud init.
GuestCustomizationCloudInitCustomKeyValues map[string]string `pulumi:"guestCustomizationCloudInitCustomKeyValues"`
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
GuestCustomizationCloudInitMetaData *string `pulumi:"guestCustomizationCloudInitMetaData"`
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
GuestCustomizationCloudInitUserData *string `pulumi:"guestCustomizationCloudInitUserData"`
// - (Optional) Flag to allow override of customization by deployer.
GuestCustomizationIsOverridable *bool `pulumi:"guestCustomizationIsOverridable"`
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
GuestCustomizationSysprep map[string]string `pulumi:"guestCustomizationSysprep"`
GuestCustomizationSysprepCustomKeyValues map[string]interface{} `pulumi:"guestCustomizationSysprepCustomKeyValues"`
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
GuestOsId *string `pulumi:"guestOsId"`
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone *string `pulumi:"hardwareClockTimezone"`
// - Reference to a host.
HostReference map[string]string `pulumi:"hostReference"`
// - The hypervisor type for the hypervisor the VM is hosted on.
HypervisorType *string `pulumi:"hypervisorType"`
// - (Optional) Add true to enable CPU pinning.
IsVcpuHardPinned *bool `pulumi:"isVcpuHardPinned"`
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
MachineType *string `pulumi:"machineType"`
// - (Optional) Memory size in MiB.
MemorySizeMib *int `pulumi:"memorySizeMib"`
// - The vm kind metadata.
Metadata map[string]string `pulumi:"metadata"`
// - (Required) The name for the vm.
Name *string `pulumi:"name"`
// - (Ooptional) Credentials to login server.
NgtCredentials map[string]interface{} `pulumi:"ngtCredentials"`
// Application names that are enabled.
NgtEnabledCapabilityLists []string `pulumi:"ngtEnabledCapabilityLists"`
// - Status NICs attached to the VM.
NicListStatuses []VirtualMachineNicListStatus `pulumi:"nicListStatuses"`
// - (Optional) Spec NICs attached to the VM.
NicLists []VirtualMachineNicList `pulumi:"nicLists"`
// - (Optional) Number of vCPU sockets.
NumSockets *int `pulumi:"numSockets"`
// - (Optional) Number of vCPUs per socket.
NumVcpusPerSocket *int `pulumi:"numVcpusPerSocket"`
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes *int `pulumi:"numVnumaNodes"`
// - (Optional) Information regarding Nutanix Guest Tools.
NutanixGuestTools map[string]string `pulumi:"nutanixGuestTools"`
// - (Optional) The reference to a user.
OwnerReference map[string]string `pulumi:"ownerReference"`
ParentReference map[string]string `pulumi:"parentReference"`
// - (Optional) The current or desired power state of the VM. (Options : ON , OFF)
PowerState *string `pulumi:"powerState"`
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
PowerStateMechanism *string `pulumi:"powerStateMechanism"`
// - (Optional) The reference to a project.
ProjectReference map[string]string `pulumi:"projectReference"`
// - (Optional) Serial Ports configured on the VM.
SerialPortLists []VirtualMachineSerialPortList `pulumi:"serialPortLists"`
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure *bool `pulumi:"shouldFailOnScriptFailure"`
// - (Optional) Nutanix Guest Tools is enabled or not.
State *string `pulumi:"state"`
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
UseHotAdd *bool `pulumi:"useHotAdd"`
// - (Optional) Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled *bool `pulumi:"vgaConsoleEnabled"`
}
type VirtualMachineState struct {
// The version of the API.
ApiVersion pulumi.StringPtrInput
// - (Optional) The reference to a availability_zone.
AvailabilityZoneReference pulumi.StringMapInput
// - (Optional) Address of disk to boot from.
BootDeviceDiskAddress pulumi.StringMapInput
// - (Optional) MAC address of nic to boot from.
BootDeviceMacAddress pulumi.StringPtrInput
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
BootDeviceOrderLists pulumi.StringArrayInput
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
BootType pulumi.StringPtrInput
// - (Optional) Categories for the vm.
Categories VirtualMachineCategoryArrayInput
CloudInitCdromUuid pulumi.StringPtrInput
// - The name of the cluster.
ClusterName pulumi.StringPtrInput
// - (Required) The UUID of the cluster.
ClusterUuid pulumi.StringPtrInput
// - (Optional) A description for vm.
Description pulumi.StringPtrInput
// Disks attached to the VM.
DiskLists VirtualMachineDiskListArrayInput
// - (Optional) Add true to enable CPU passthrough.
EnableCpuPassthrough pulumi.BoolPtrInput
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec pulumi.BoolPtrInput
// - (Optional) GPUs attached to the VM.
GpuLists VirtualMachineGpuListArrayInput
// - (Optional) Generic key value pair used for custom attributes in cloud init.
GuestCustomizationCloudInitCustomKeyValues pulumi.StringMapInput
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
GuestCustomizationCloudInitMetaData pulumi.StringPtrInput
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
GuestCustomizationCloudInitUserData pulumi.StringPtrInput
// - (Optional) Flag to allow override of customization by deployer.
GuestCustomizationIsOverridable pulumi.BoolPtrInput
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
GuestCustomizationSysprep pulumi.StringMapInput
GuestCustomizationSysprepCustomKeyValues pulumi.MapInput
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
GuestOsId pulumi.StringPtrInput
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone pulumi.StringPtrInput
// - Reference to a host.
HostReference pulumi.StringMapInput
// - The hypervisor type for the hypervisor the VM is hosted on.
HypervisorType pulumi.StringPtrInput
// - (Optional) Add true to enable CPU pinning.
IsVcpuHardPinned pulumi.BoolPtrInput
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
MachineType pulumi.StringPtrInput
// - (Optional) Memory size in MiB.
MemorySizeMib pulumi.IntPtrInput
// - The vm kind metadata.
Metadata pulumi.StringMapInput
// - (Required) The name for the vm.
Name pulumi.StringPtrInput
// - (Ooptional) Credentials to login server.
NgtCredentials pulumi.MapInput
// Application names that are enabled.
NgtEnabledCapabilityLists pulumi.StringArrayInput
// - Status NICs attached to the VM.
NicListStatuses VirtualMachineNicListStatusArrayInput
// - (Optional) Spec NICs attached to the VM.
NicLists VirtualMachineNicListArrayInput
// - (Optional) Number of vCPU sockets.
NumSockets pulumi.IntPtrInput
// - (Optional) Number of vCPUs per socket.
NumVcpusPerSocket pulumi.IntPtrInput
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes pulumi.IntPtrInput
// - (Optional) Information regarding Nutanix Guest Tools.
NutanixGuestTools pulumi.StringMapInput
// - (Optional) The reference to a user.
OwnerReference pulumi.StringMapInput
ParentReference pulumi.StringMapInput
// - (Optional) The current or desired power state of the VM. (Options : ON , OFF)
PowerState pulumi.StringPtrInput
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
PowerStateMechanism pulumi.StringPtrInput
// - (Optional) The reference to a project.
ProjectReference pulumi.StringMapInput
// - (Optional) Serial Ports configured on the VM.
SerialPortLists VirtualMachineSerialPortListArrayInput
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure pulumi.BoolPtrInput
// - (Optional) Nutanix Guest Tools is enabled or not.
State pulumi.StringPtrInput
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
UseHotAdd pulumi.BoolPtrInput
// - (Optional) Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled pulumi.BoolPtrInput
}
func (VirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineState)(nil)).Elem()
}
type virtualMachineArgs struct {
// - (Optional) The reference to a availability_zone.
AvailabilityZoneReference map[string]string `pulumi:"availabilityZoneReference"`
// - (Optional) Address of disk to boot from.
BootDeviceDiskAddress map[string]string `pulumi:"bootDeviceDiskAddress"`
// - (Optional) MAC address of nic to boot from.
BootDeviceMacAddress *string `pulumi:"bootDeviceMacAddress"`
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
BootDeviceOrderLists []string `pulumi:"bootDeviceOrderLists"`
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
BootType *string `pulumi:"bootType"`
// - (Optional) Categories for the vm.
Categories []VirtualMachineCategory `pulumi:"categories"`
CloudInitCdromUuid *string `pulumi:"cloudInitCdromUuid"`
// - (Required) The UUID of the cluster.
ClusterUuid string `pulumi:"clusterUuid"`
// - (Optional) A description for vm.
Description *string `pulumi:"description"`
// Disks attached to the VM.
DiskLists []VirtualMachineDiskList `pulumi:"diskLists"`
// - (Optional) Add true to enable CPU passthrough.
EnableCpuPassthrough *bool `pulumi:"enableCpuPassthrough"`
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec *bool `pulumi:"enableScriptExec"`
// - (Optional) GPUs attached to the VM.
GpuLists []VirtualMachineGpuList `pulumi:"gpuLists"`
// - (Optional) Generic key value pair used for custom attributes in cloud init.
GuestCustomizationCloudInitCustomKeyValues map[string]string `pulumi:"guestCustomizationCloudInitCustomKeyValues"`
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
GuestCustomizationCloudInitMetaData *string `pulumi:"guestCustomizationCloudInitMetaData"`
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
GuestCustomizationCloudInitUserData *string `pulumi:"guestCustomizationCloudInitUserData"`
// - (Optional) Flag to allow override of customization by deployer.
GuestCustomizationIsOverridable *bool `pulumi:"guestCustomizationIsOverridable"`
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
GuestCustomizationSysprep map[string]string `pulumi:"guestCustomizationSysprep"`
GuestCustomizationSysprepCustomKeyValues map[string]interface{} `pulumi:"guestCustomizationSysprepCustomKeyValues"`
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
GuestOsId *string `pulumi:"guestOsId"`
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone *string `pulumi:"hardwareClockTimezone"`
// - (Optional) Add true to enable CPU pinning.
IsVcpuHardPinned *bool `pulumi:"isVcpuHardPinned"`
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
MachineType *string `pulumi:"machineType"`
// - (Optional) Memory size in MiB.
MemorySizeMib *int `pulumi:"memorySizeMib"`
// - (Required) The name for the vm.
Name *string `pulumi:"name"`
// - (Ooptional) Credentials to login server.
NgtCredentials map[string]interface{} `pulumi:"ngtCredentials"`
// Application names that are enabled.
NgtEnabledCapabilityLists []string `pulumi:"ngtEnabledCapabilityLists"`
// - (Optional) Spec NICs attached to the VM.
NicLists []VirtualMachineNicList `pulumi:"nicLists"`
// - (Optional) Number of vCPU sockets.
NumSockets *int `pulumi:"numSockets"`
// - (Optional) Number of vCPUs per socket.
NumVcpusPerSocket *int `pulumi:"numVcpusPerSocket"`
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes *int `pulumi:"numVnumaNodes"`
// - (Optional) Information regarding Nutanix Guest Tools.
NutanixGuestTools map[string]string `pulumi:"nutanixGuestTools"`
// - (Optional) The reference to a user.
OwnerReference map[string]string `pulumi:"ownerReference"`
ParentReference map[string]string `pulumi:"parentReference"`
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
PowerStateMechanism *string `pulumi:"powerStateMechanism"`
// - (Optional) The reference to a project.
ProjectReference map[string]string `pulumi:"projectReference"`
// - (Optional) Serial Ports configured on the VM.
SerialPortLists []VirtualMachineSerialPortList `pulumi:"serialPortLists"`
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure *bool `pulumi:"shouldFailOnScriptFailure"`
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
UseHotAdd *bool `pulumi:"useHotAdd"`
// - (Optional) Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled *bool `pulumi:"vgaConsoleEnabled"`
}
// The set of arguments for constructing a VirtualMachine resource.
type VirtualMachineArgs struct {
// - (Optional) The reference to a availability_zone.
AvailabilityZoneReference pulumi.StringMapInput
// - (Optional) Address of disk to boot from.
BootDeviceDiskAddress pulumi.StringMapInput
// - (Optional) MAC address of nic to boot from.
BootDeviceMacAddress pulumi.StringPtrInput
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
BootDeviceOrderLists pulumi.StringArrayInput
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
BootType pulumi.StringPtrInput
// - (Optional) Categories for the vm.
Categories VirtualMachineCategoryArrayInput
CloudInitCdromUuid pulumi.StringPtrInput
// - (Required) The UUID of the cluster.
ClusterUuid pulumi.StringInput
// - (Optional) A description for vm.
Description pulumi.StringPtrInput
// Disks attached to the VM.
DiskLists VirtualMachineDiskListArrayInput
// - (Optional) Add true to enable CPU passthrough.
EnableCpuPassthrough pulumi.BoolPtrInput
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec pulumi.BoolPtrInput
// - (Optional) GPUs attached to the VM.
GpuLists VirtualMachineGpuListArrayInput
// - (Optional) Generic key value pair used for custom attributes in cloud init.
GuestCustomizationCloudInitCustomKeyValues pulumi.StringMapInput
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
GuestCustomizationCloudInitMetaData pulumi.StringPtrInput
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
GuestCustomizationCloudInitUserData pulumi.StringPtrInput
// - (Optional) Flag to allow override of customization by deployer.
GuestCustomizationIsOverridable pulumi.BoolPtrInput
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
GuestCustomizationSysprep pulumi.StringMapInput
GuestCustomizationSysprepCustomKeyValues pulumi.MapInput
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
GuestOsId pulumi.StringPtrInput
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone pulumi.StringPtrInput
// - (Optional) Add true to enable CPU pinning.
IsVcpuHardPinned pulumi.BoolPtrInput
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
MachineType pulumi.StringPtrInput
// - (Optional) Memory size in MiB.
MemorySizeMib pulumi.IntPtrInput
// - (Required) The name for the vm.
Name pulumi.StringPtrInput
// - (Ooptional) Credentials to login server.
NgtCredentials pulumi.MapInput
// Application names that are enabled.
NgtEnabledCapabilityLists pulumi.StringArrayInput
// - (Optional) Spec NICs attached to the VM.
NicLists VirtualMachineNicListArrayInput
// - (Optional) Number of vCPU sockets.
NumSockets pulumi.IntPtrInput
// - (Optional) Number of vCPUs per socket.
NumVcpusPerSocket pulumi.IntPtrInput
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes pulumi.IntPtrInput
// - (Optional) Information regarding Nutanix Guest Tools.
NutanixGuestTools pulumi.StringMapInput
// - (Optional) The reference to a user.
OwnerReference pulumi.StringMapInput
ParentReference pulumi.StringMapInput
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
PowerStateMechanism pulumi.StringPtrInput
// - (Optional) The reference to a project.
ProjectReference pulumi.StringMapInput
// - (Optional) Serial Ports configured on the VM.
SerialPortLists VirtualMachineSerialPortListArrayInput
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure pulumi.BoolPtrInput
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
UseHotAdd pulumi.BoolPtrInput
// - (Optional) Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled pulumi.BoolPtrInput
}
func (VirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineArgs)(nil)).Elem()
}
type VirtualMachineInput interface {
pulumi.Input
ToVirtualMachineOutput() VirtualMachineOutput
ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput
}
func (*VirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachine)(nil)).Elem()
}
func (i *VirtualMachine) ToVirtualMachineOutput() VirtualMachineOutput {
return i.ToVirtualMachineOutputWithContext(context.Background())
}
func (i *VirtualMachine) ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineOutput)
}
// VirtualMachineArrayInput is an input type that accepts VirtualMachineArray and VirtualMachineArrayOutput values.
// You can construct a concrete instance of `VirtualMachineArrayInput` via:
//
// VirtualMachineArray{ VirtualMachineArgs{...} }
type VirtualMachineArrayInput interface {
pulumi.Input
ToVirtualMachineArrayOutput() VirtualMachineArrayOutput
ToVirtualMachineArrayOutputWithContext(context.Context) VirtualMachineArrayOutput
}
type VirtualMachineArray []VirtualMachineInput
func (VirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachine)(nil)).Elem()
}
func (i VirtualMachineArray) ToVirtualMachineArrayOutput() VirtualMachineArrayOutput {
return i.ToVirtualMachineArrayOutputWithContext(context.Background())
}
func (i VirtualMachineArray) ToVirtualMachineArrayOutputWithContext(ctx context.Context) VirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineArrayOutput)
}
// VirtualMachineMapInput is an input type that accepts VirtualMachineMap and VirtualMachineMapOutput values.
// You can construct a concrete instance of `VirtualMachineMapInput` via:
//
// VirtualMachineMap{ "key": VirtualMachineArgs{...} }
type VirtualMachineMapInput interface {
pulumi.Input
ToVirtualMachineMapOutput() VirtualMachineMapOutput
ToVirtualMachineMapOutputWithContext(context.Context) VirtualMachineMapOutput
}
type VirtualMachineMap map[string]VirtualMachineInput
func (VirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachine)(nil)).Elem()
}
func (i VirtualMachineMap) ToVirtualMachineMapOutput() VirtualMachineMapOutput {
return i.ToVirtualMachineMapOutputWithContext(context.Background())
}
func (i VirtualMachineMap) ToVirtualMachineMapOutputWithContext(ctx context.Context) VirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineMapOutput)
}
type VirtualMachineOutput struct{ *pulumi.OutputState }
func (VirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineOutput) ToVirtualMachineOutput() VirtualMachineOutput {
return o
}
func (o VirtualMachineOutput) ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput {
return o
}
// The version of the API.
func (o VirtualMachineOutput) ApiVersion() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.ApiVersion }).(pulumi.StringOutput)
}
// - (Optional) The reference to a availability_zone.
func (o VirtualMachineOutput) AvailabilityZoneReference() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.AvailabilityZoneReference }).(pulumi.StringMapOutput)
}
// - (Optional) Address of disk to boot from.
func (o VirtualMachineOutput) BootDeviceDiskAddress() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.BootDeviceDiskAddress }).(pulumi.StringMapOutput)
}
// - (Optional) MAC address of nic to boot from.
func (o VirtualMachineOutput) BootDeviceMacAddress() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.BootDeviceMacAddress }).(pulumi.StringOutput)
}
// - (Optional) Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the system will decide appropriate boot device order.
func (o VirtualMachineOutput) BootDeviceOrderLists() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringArrayOutput { return v.BootDeviceOrderLists }).(pulumi.StringArrayOutput)
}
// - (Optional) Indicates whether the VM should use Secure boot, UEFI boot or Legacy boot.If UEFI or; Secure boot is enabled then other legacy boot options (like bootDevice and; boot_device_order_list) are ignored. Secure boot depends on UEFI boot, i.e. enabling; Secure boot means that UEFI boot is also enabled. The possible value are: UEFI", "LEGACY", "SECURE_BOOT".
func (o VirtualMachineOutput) BootType() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.BootType }).(pulumi.StringOutput)
}
// - (Optional) Categories for the vm.
func (o VirtualMachineOutput) Categories() VirtualMachineCategoryArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineCategoryArrayOutput { return v.Categories }).(VirtualMachineCategoryArrayOutput)
}
func (o VirtualMachineOutput) CloudInitCdromUuid() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.CloudInitCdromUuid }).(pulumi.StringOutput)
}
// - The name of the cluster.
func (o VirtualMachineOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// - (Required) The UUID of the cluster.
func (o VirtualMachineOutput) ClusterUuid() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.ClusterUuid }).(pulumi.StringOutput)
}
// - (Optional) A description for vm.
func (o VirtualMachineOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Disks attached to the VM.
func (o VirtualMachineOutput) DiskLists() VirtualMachineDiskListArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineDiskListArrayOutput { return v.DiskLists }).(VirtualMachineDiskListArrayOutput)
}
// - (Optional) Add true to enable CPU passthrough.
func (o VirtualMachineOutput) EnableCpuPassthrough() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolPtrOutput { return v.EnableCpuPassthrough }).(pulumi.BoolPtrOutput)
}
// - (Optional) Extra configs related to power state transition. Indicates whether to execute set script before ngt shutdown/reboot.
func (o VirtualMachineOutput) EnableScriptExec() pulumi.BoolOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolOutput { return v.EnableScriptExec }).(pulumi.BoolOutput)
}
// - (Optional) GPUs attached to the VM.
func (o VirtualMachineOutput) GpuLists() VirtualMachineGpuListArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineGpuListArrayOutput { return v.GpuLists }).(VirtualMachineGpuListArrayOutput)
}
// - (Optional) Generic key value pair used for custom attributes in cloud init.
func (o VirtualMachineOutput) GuestCustomizationCloudInitCustomKeyValues() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.GuestCustomizationCloudInitCustomKeyValues }).(pulumi.StringMapOutput)
}
// The contents of the metaData configuration for cloud-init. This can be formatted as YAML or JSON. The value must be base64 encoded.
func (o VirtualMachineOutput) GuestCustomizationCloudInitMetaData() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.GuestCustomizationCloudInitMetaData }).(pulumi.StringOutput)
}
// - (Optional) The contents of the userData configuration for cloud-init. This can be formatted as YAML, JSON, or could be a shell script. The value must be base64 encoded.
func (o VirtualMachineOutput) GuestCustomizationCloudInitUserData() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.GuestCustomizationCloudInitUserData }).(pulumi.StringOutput)
}
// - (Optional) Flag to allow override of customization by deployer.
func (o VirtualMachineOutput) GuestCustomizationIsOverridable() pulumi.BoolOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolOutput { return v.GuestCustomizationIsOverridable }).(pulumi.BoolOutput)
}
// - (Optional) VM guests may be customized at boot time using one of several different methods. Currently, cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or cloudInit should be provided. Note that guest customization can currently only be set during VM creation. Attempting to change it after creation will result in an error. Additional properties can be specified. For example - in the context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own custom script.
func (o VirtualMachineOutput) GuestCustomizationSysprep() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.GuestCustomizationSysprep }).(pulumi.StringMapOutput)
}
func (o VirtualMachineOutput) GuestCustomizationSysprepCustomKeyValues() pulumi.MapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.MapOutput { return v.GuestCustomizationSysprepCustomKeyValues }).(pulumi.MapOutput)
}
// - (Optional) Guest OS Identifier. For ESX, refer to VMware documentation [link](https://www.vmware.com/support/developer/converter-sdk/conv43_apireference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html) for the list of guest OS identifiers.
func (o VirtualMachineOutput) GuestOsId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.GuestOsId }).(pulumi.StringOutput)
}
// - (Optional) VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
func (o VirtualMachineOutput) HardwareClockTimezone() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.HardwareClockTimezone }).(pulumi.StringOutput)
}
// - Reference to a host.
func (o VirtualMachineOutput) HostReference() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.HostReference }).(pulumi.StringMapOutput)
}
// - The hypervisor type for the hypervisor the VM is hosted on.
func (o VirtualMachineOutput) HypervisorType() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.HypervisorType }).(pulumi.StringOutput)
}
// - (Optional) Add true to enable CPU pinning.
func (o VirtualMachineOutput) IsVcpuHardPinned() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolPtrOutput { return v.IsVcpuHardPinned }).(pulumi.BoolPtrOutput)
}
// - Machine type for the VM. Machine type Q35 is required for secure boot and does not support IDE disks.
func (o VirtualMachineOutput) MachineType() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.MachineType }).(pulumi.StringOutput)
}
// - (Optional) Memory size in MiB.
func (o VirtualMachineOutput) MemorySizeMib() pulumi.IntOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.IntOutput { return v.MemorySizeMib }).(pulumi.IntOutput)
}
// - The vm kind metadata.
func (o VirtualMachineOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// - (Required) The name for the vm.
func (o VirtualMachineOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// - (Ooptional) Credentials to login server.
func (o VirtualMachineOutput) NgtCredentials() pulumi.MapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.MapOutput { return v.NgtCredentials }).(pulumi.MapOutput)
}
// Application names that are enabled.
func (o VirtualMachineOutput) NgtEnabledCapabilityLists() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringArrayOutput { return v.NgtEnabledCapabilityLists }).(pulumi.StringArrayOutput)
}
// - Status NICs attached to the VM.
func (o VirtualMachineOutput) NicListStatuses() VirtualMachineNicListStatusArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineNicListStatusArrayOutput { return v.NicListStatuses }).(VirtualMachineNicListStatusArrayOutput)
}
// - (Optional) Spec NICs attached to the VM.
func (o VirtualMachineOutput) NicLists() VirtualMachineNicListArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineNicListArrayOutput { return v.NicLists }).(VirtualMachineNicListArrayOutput)
}
// - (Optional) Number of vCPU sockets.
func (o VirtualMachineOutput) NumSockets() pulumi.IntOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.IntOutput { return v.NumSockets }).(pulumi.IntOutput)
}
// - (Optional) Number of vCPUs per socket.
func (o VirtualMachineOutput) NumVcpusPerSocket() pulumi.IntOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.IntOutput { return v.NumVcpusPerSocket }).(pulumi.IntOutput)
}
// - (Optional) Number of vNUMA nodes. 0 means vNUMA is disabled.
func (o VirtualMachineOutput) NumVnumaNodes() pulumi.IntOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.IntOutput { return v.NumVnumaNodes }).(pulumi.IntOutput)
}
// - (Optional) Information regarding Nutanix Guest Tools.
func (o VirtualMachineOutput) NutanixGuestTools() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.NutanixGuestTools }).(pulumi.StringMapOutput)
}
// - (Optional) The reference to a user.
func (o VirtualMachineOutput) OwnerReference() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.OwnerReference }).(pulumi.StringMapOutput)
}
func (o VirtualMachineOutput) ParentReference() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.ParentReference }).(pulumi.StringMapOutput)
}
// - (Optional) The current or desired power state of the VM. (Options : ON , OFF)
func (o VirtualMachineOutput) PowerState() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.PowerState }).(pulumi.StringOutput)
}
// - (Optional) Indicates the mechanism guiding the VM power state transition. Currently used for the transition to \"OFF\" state. Power state mechanism (ACPI/GUEST/HARD).
func (o VirtualMachineOutput) PowerStateMechanism() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.PowerStateMechanism }).(pulumi.StringOutput)
}
// - (Optional) The reference to a project.
func (o VirtualMachineOutput) ProjectReference() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.ProjectReference }).(pulumi.StringMapOutput)
}
// - (Optional) Serial Ports configured on the VM.
func (o VirtualMachineOutput) SerialPortLists() VirtualMachineSerialPortListArrayOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineSerialPortListArrayOutput { return v.SerialPortLists }).(VirtualMachineSerialPortListArrayOutput)
}
// - (Optional) Extra configs related to power state transition. Indicates whether to abort ngt shutdown/reboot if script fails.
func (o VirtualMachineOutput) ShouldFailOnScriptFailure() pulumi.BoolOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolOutput { return v.ShouldFailOnScriptFailure }).(pulumi.BoolOutput)
}
// - (Optional) Nutanix Guest Tools is enabled or not.
func (o VirtualMachineOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
func (o VirtualMachineOutput) UseHotAdd() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolPtrOutput { return v.UseHotAdd }).(pulumi.BoolPtrOutput)
}
// - (Optional) Indicates whether VGA console should be enabled or not.
func (o VirtualMachineOutput) VgaConsoleEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolOutput { return v.VgaConsoleEnabled }).(pulumi.BoolOutput)
}
type VirtualMachineArrayOutput struct{ *pulumi.OutputState }
func (VirtualMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineArrayOutput) ToVirtualMachineArrayOutput() VirtualMachineArrayOutput {
return o
}
func (o VirtualMachineArrayOutput) ToVirtualMachineArrayOutputWithContext(ctx context.Context) VirtualMachineArrayOutput {
return o
}
func (o VirtualMachineArrayOutput) Index(i pulumi.IntInput) VirtualMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachine {
return vs[0].([]*VirtualMachine)[vs[1].(int)]
}).(VirtualMachineOutput)
}
type VirtualMachineMapOutput struct{ *pulumi.OutputState }
func (VirtualMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineMapOutput) ToVirtualMachineMapOutput() VirtualMachineMapOutput {
return o
}
func (o VirtualMachineMapOutput) ToVirtualMachineMapOutputWithContext(ctx context.Context) VirtualMachineMapOutput {
return o
}
func (o VirtualMachineMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachine {
return vs[0].(map[string]*VirtualMachine)[vs[1].(string)]
}).(VirtualMachineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineInput)(nil)).Elem(), &VirtualMachine{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineArrayInput)(nil)).Elem(), VirtualMachineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineMapInput)(nil)).Elem(), VirtualMachineMap{})
pulumi.RegisterOutputType(VirtualMachineOutput{})
pulumi.RegisterOutputType(VirtualMachineArrayOutput{})
pulumi.RegisterOutputType(VirtualMachineMapOutput{})
}