diff --git a/sdk/dotnet/GetDatacenter.cs b/sdk/dotnet/GetDatacenter.cs index 9dc2538e..58cff292 100644 --- a/sdk/dotnet/GetDatacenter.cs +++ b/sdk/dotnet/GetDatacenter.cs @@ -116,15 +116,22 @@ public sealed class GetDatacenterResult /// public readonly string Id; public readonly string? Name; + /// + /// List of all virtual machines included in the vSphere datacenter object. + /// + public readonly ImmutableArray VirtualMachines; [OutputConstructor] private GetDatacenterResult( string id, - string? name) + string? name, + + ImmutableArray virtualMachines) { Id = id; Name = name; + VirtualMachines = virtualMachines; } } } diff --git a/sdk/dotnet/GetDatastoreCluster.cs b/sdk/dotnet/GetDatastoreCluster.cs index f418bb70..35a9597f 100644 --- a/sdk/dotnet/GetDatastoreCluster.cs +++ b/sdk/dotnet/GetDatastoreCluster.cs @@ -133,6 +133,11 @@ public sealed class GetDatastoreClusterResult { public readonly string? DatacenterId; /// + /// (Optional) The names of the datastores included in the specific + /// cluster. + /// + public readonly ImmutableArray Datastores; + /// /// The provider-assigned unique ID for this managed resource. /// public readonly string Id; @@ -142,11 +147,14 @@ public sealed class GetDatastoreClusterResult private GetDatastoreClusterResult( string? datacenterId, + ImmutableArray datastores, + string id, string name) { DatacenterId = datacenterId; + Datastores = datastores; Id = id; Name = name; } diff --git a/sdk/dotnet/GetNetwork.cs b/sdk/dotnet/GetNetwork.cs index b47b659e..3d25bde4 100644 --- a/sdk/dotnet/GetNetwork.cs +++ b/sdk/dotnet/GetNetwork.cs @@ -41,6 +41,38 @@ public static class GetNetwork /// /// }); /// ``` + /// + /// + /// ### Additional Examples + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using VSphere = Pulumi.VSphere; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var datacenter = VSphere.GetDatacenter.Invoke(new() + /// { + /// Name = "dc-01", + /// }); + /// + /// var myPortGroup = VSphere.GetNetwork.Invoke(new() + /// { + /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), + /// Name = "VM Network", + /// Filters = new[] + /// { + /// new VSphere.Inputs.GetNetworkFilterInputArgs + /// { + /// NetworkType = "Network", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` /// public static Task InvokeAsync(GetNetworkArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkArgs(), options.WithDefaults()); @@ -75,6 +107,38 @@ public static Task InvokeAsync(GetNetworkArgs args, InvokeOpti /// /// }); /// ``` + /// + /// + /// ### Additional Examples + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using VSphere = Pulumi.VSphere; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var datacenter = VSphere.GetDatacenter.Invoke(new() + /// { + /// Name = "dc-01", + /// }); + /// + /// var myPortGroup = VSphere.GetNetwork.Invoke(new() + /// { + /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), + /// Name = "VM Network", + /// Filters = new[] + /// { + /// new VSphere.Inputs.GetNetworkFilterInputArgs + /// { + /// NetworkType = "Network", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` /// public static Output Invoke(GetNetworkInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults()); @@ -101,6 +165,18 @@ public sealed class GetNetworkArgs : global::Pulumi.InvokeArgs [Input("distributedVirtualSwitchUuid")] public string? DistributedVirtualSwitchUuid { get; set; } + [Input("filters")] + private List? _filters; + + /// + /// Apply a filter for the discovered network. + /// + public List Filters + { + get => _filters ?? (_filters = new List()); + set => _filters = value; + } + /// /// The name of the network. This can be a name or path. /// @@ -133,6 +209,18 @@ public sealed class GetNetworkInvokeArgs : global::Pulumi.InvokeArgs [Input("distributedVirtualSwitchUuid")] public Input? DistributedVirtualSwitchUuid { get; set; } + [Input("filters")] + private InputList? _filters; + + /// + /// Apply a filter for the discovered network. + /// + public InputList Filters + { + get => _filters ?? (_filters = new InputList()); + set => _filters = value; + } + /// /// The name of the network. This can be a name or path. /// @@ -151,6 +239,7 @@ public sealed class GetNetworkResult { public readonly string? DatacenterId; public readonly string? DistributedVirtualSwitchUuid; + public readonly ImmutableArray Filters; /// /// The provider-assigned unique ID for this managed resource. /// @@ -170,6 +259,8 @@ private GetNetworkResult( string? distributedVirtualSwitchUuid, + ImmutableArray filters, + string id, string name, @@ -178,6 +269,7 @@ private GetNetworkResult( { DatacenterId = datacenterId; DistributedVirtualSwitchUuid = distributedVirtualSwitchUuid; + Filters = filters; Id = id; Name = name; Type = type; diff --git a/sdk/dotnet/GetVirtualMachine.cs b/sdk/dotnet/GetVirtualMachine.cs index 5e244ed6..18b75402 100644 --- a/sdk/dotnet/GetVirtualMachine.cs +++ b/sdk/dotnet/GetVirtualMachine.cs @@ -772,6 +772,10 @@ public sealed class GetVirtualMachineResult public readonly Outputs.GetVirtualMachineVappResult? Vapp; public readonly ImmutableArray VappTransports; public readonly bool? VbsEnabled; + /// + /// Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + /// + public readonly bool Vtpm; public readonly bool? VvtdEnabled; [OutputConstructor] @@ -906,6 +910,8 @@ private GetVirtualMachineResult( bool? vbsEnabled, + bool vtpm, + bool? vvtdEnabled) { AlternateGuestName = alternateGuestName; @@ -973,6 +979,7 @@ private GetVirtualMachineResult( Vapp = vapp; VappTransports = vappTransports; VbsEnabled = vbsEnabled; + Vtpm = vtpm; VvtdEnabled = vvtdEnabled; } } diff --git a/sdk/dotnet/Inputs/GetNetworkFilter.cs b/sdk/dotnet/Inputs/GetNetworkFilter.cs new file mode 100644 index 00000000..007b196d --- /dev/null +++ b/sdk/dotnet/Inputs/GetNetworkFilter.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Inputs +{ + + public sealed class GetNetworkFilterArgs : global::Pulumi.InvokeArgs + { + /// + /// This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + /// + [Input("networkType")] + public string? NetworkType { get; set; } + + public GetNetworkFilterArgs() + { + } + public static new GetNetworkFilterArgs Empty => new GetNetworkFilterArgs(); + } +} diff --git a/sdk/dotnet/Inputs/GetNetworkFilterArgs.cs b/sdk/dotnet/Inputs/GetNetworkFilterArgs.cs new file mode 100644 index 00000000..e1ccd54f --- /dev/null +++ b/sdk/dotnet/Inputs/GetNetworkFilterArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Inputs +{ + + public sealed class GetNetworkFilterInputArgs : global::Pulumi.ResourceArgs + { + /// + /// This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + /// + [Input("networkType")] + public Input? NetworkType { get; set; } + + public GetNetworkFilterInputArgs() + { + } + public static new GetNetworkFilterInputArgs Empty => new GetNetworkFilterInputArgs(); + } +} diff --git a/sdk/dotnet/Inputs/VirtualMachineVtpmArgs.cs b/sdk/dotnet/Inputs/VirtualMachineVtpmArgs.cs new file mode 100644 index 00000000..8e752a40 --- /dev/null +++ b/sdk/dotnet/Inputs/VirtualMachineVtpmArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Inputs +{ + + public sealed class VirtualMachineVtpmArgs : global::Pulumi.ResourceArgs + { + /// + /// The version of the TPM device. Default is 2.0. + /// + [Input("version")] + public Input? Version { get; set; } + + public VirtualMachineVtpmArgs() + { + } + public static new VirtualMachineVtpmArgs Empty => new VirtualMachineVtpmArgs(); + } +} diff --git a/sdk/dotnet/Inputs/VirtualMachineVtpmGetArgs.cs b/sdk/dotnet/Inputs/VirtualMachineVtpmGetArgs.cs new file mode 100644 index 00000000..01c96933 --- /dev/null +++ b/sdk/dotnet/Inputs/VirtualMachineVtpmGetArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Inputs +{ + + public sealed class VirtualMachineVtpmGetArgs : global::Pulumi.ResourceArgs + { + /// + /// The version of the TPM device. Default is 2.0. + /// + [Input("version")] + public Input? Version { get; set; } + + public VirtualMachineVtpmGetArgs() + { + } + public static new VirtualMachineVtpmGetArgs Empty => new VirtualMachineVtpmGetArgs(); + } +} diff --git a/sdk/dotnet/Outputs/GetNetworkFilterResult.cs b/sdk/dotnet/Outputs/GetNetworkFilterResult.cs new file mode 100644 index 00000000..98674e5b --- /dev/null +++ b/sdk/dotnet/Outputs/GetNetworkFilterResult.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Outputs +{ + + [OutputType] + public sealed class GetNetworkFilterResult + { + /// + /// This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + /// + public readonly string? NetworkType; + + [OutputConstructor] + private GetNetworkFilterResult(string? networkType) + { + NetworkType = networkType; + } + } +} diff --git a/sdk/dotnet/Outputs/VirtualMachineVtpm.cs b/sdk/dotnet/Outputs/VirtualMachineVtpm.cs new file mode 100644 index 00000000..4d371ab7 --- /dev/null +++ b/sdk/dotnet/Outputs/VirtualMachineVtpm.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.VSphere.Outputs +{ + + [OutputType] + public sealed class VirtualMachineVtpm + { + /// + /// The version of the TPM device. Default is 2.0. + /// + public readonly string? Version; + + [OutputConstructor] + private VirtualMachineVtpm(string? version) + { + Version = version; + } + } +} diff --git a/sdk/dotnet/VirtualMachine.cs b/sdk/dotnet/VirtualMachine.cs index b1a4550d..d98ab007 100644 --- a/sdk/dotnet/VirtualMachine.cs +++ b/sdk/dotnet/VirtualMachine.cs @@ -528,6 +528,12 @@ public partial class VirtualMachine : global::Pulumi.CustomResource [Output("vmxPath")] public Output VmxPath { get; private set; } = null!; + /// + /// A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + /// + [Output("vtpm")] + public Output Vtpm { get; private set; } = null!; + /// /// Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD /// I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -1078,6 +1084,12 @@ public InputList Tags [Input("vbsEnabled")] public Input? VbsEnabled { get; set; } + /// + /// A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + /// + [Input("vtpm")] + public Input? Vtpm { get; set; } + /// /// Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD /// I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -1665,6 +1677,12 @@ public InputList VappTransports [Input("vmxPath")] public Input? VmxPath { get; set; } + /// + /// A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + /// + [Input("vtpm")] + public Input? Vtpm { get; set; } + /// /// Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD /// I/O Virtualization (AMD-Vi or IOMMU), is enabled. diff --git a/sdk/go/vsphere/getDatacenter.go b/sdk/go/vsphere/getDatacenter.go index bf3ba873..8671619d 100644 --- a/sdk/go/vsphere/getDatacenter.go +++ b/sdk/go/vsphere/getDatacenter.go @@ -68,6 +68,8 @@ type LookupDatacenterResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name *string `pulumi:"name"` + // List of all virtual machines included in the vSphere datacenter object. + VirtualMachines []string `pulumi:"virtualMachines"` } func LookupDatacenterOutput(ctx *pulumi.Context, args LookupDatacenterOutputArgs, opts ...pulumi.InvokeOption) LookupDatacenterResultOutput { @@ -129,6 +131,11 @@ func (o LookupDatacenterResultOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupDatacenterResult) *string { return v.Name }).(pulumi.StringPtrOutput) } +// List of all virtual machines included in the vSphere datacenter object. +func (o LookupDatacenterResultOutput) VirtualMachines() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupDatacenterResult) []string { return v.VirtualMachines }).(pulumi.StringArrayOutput) +} + func init() { pulumi.RegisterOutputType(LookupDatacenterResultOutput{}) } diff --git a/sdk/go/vsphere/getDatastoreCluster.go b/sdk/go/vsphere/getDatastoreCluster.go index be5cda2f..c757a4ba 100644 --- a/sdk/go/vsphere/getDatastoreCluster.go +++ b/sdk/go/vsphere/getDatastoreCluster.go @@ -73,6 +73,9 @@ type LookupDatastoreClusterArgs struct { // A collection of values returned by getDatastoreCluster. type LookupDatastoreClusterResult struct { DatacenterId *string `pulumi:"datacenterId"` + // (Optional) The names of the datastores included in the specific + // cluster. + Datastores []string `pulumi:"datastores"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` @@ -132,6 +135,12 @@ func (o LookupDatastoreClusterResultOutput) DatacenterId() pulumi.StringPtrOutpu return o.ApplyT(func(v LookupDatastoreClusterResult) *string { return v.DatacenterId }).(pulumi.StringPtrOutput) } +// (Optional) The names of the datastores included in the specific +// cluster. +func (o LookupDatastoreClusterResultOutput) Datastores() pulumi.StringArrayOutput { + return o.ApplyT(func(v LookupDatastoreClusterResult) []string { return v.Datastores }).(pulumi.StringArrayOutput) +} + // The provider-assigned unique ID for this managed resource. func (o LookupDatastoreClusterResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDatastoreClusterResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/vsphere/getNetwork.go b/sdk/go/vsphere/getNetwork.go index 8828fbd8..b2a72d83 100644 --- a/sdk/go/vsphere/getNetwork.go +++ b/sdk/go/vsphere/getNetwork.go @@ -49,6 +49,44 @@ import ( // } // // ``` +// +// ### Additional Examples +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ +// Name: pulumi.StringRef("dc-01"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{ +// DatacenterId: pulumi.StringRef(datacenter.Id), +// Name: "VM Network", +// Filters: []vsphere.GetNetworkFilter{ +// { +// NetworkType: pulumi.StringRef("Network"), +// }, +// }, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetNetwork(ctx *pulumi.Context, args *GetNetworkArgs, opts ...pulumi.InvokeOption) (*GetNetworkResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetNetworkResult @@ -71,14 +109,17 @@ type GetNetworkArgs struct { // group belongs. It is useful to differentiate port groups with same name using // the distributed virtual switch ID. DistributedVirtualSwitchUuid *string `pulumi:"distributedVirtualSwitchUuid"` + // Apply a filter for the discovered network. + Filters []GetNetworkFilter `pulumi:"filters"` // The name of the network. This can be a name or path. Name string `pulumi:"name"` } // A collection of values returned by getNetwork. type GetNetworkResult struct { - DatacenterId *string `pulumi:"datacenterId"` - DistributedVirtualSwitchUuid *string `pulumi:"distributedVirtualSwitchUuid"` + DatacenterId *string `pulumi:"datacenterId"` + DistributedVirtualSwitchUuid *string `pulumi:"distributedVirtualSwitchUuid"` + Filters []GetNetworkFilter `pulumi:"filters"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` @@ -120,6 +161,8 @@ type GetNetworkOutputArgs struct { // group belongs. It is useful to differentiate port groups with same name using // the distributed virtual switch ID. DistributedVirtualSwitchUuid pulumi.StringPtrInput `pulumi:"distributedVirtualSwitchUuid"` + // Apply a filter for the discovered network. + Filters GetNetworkFilterArrayInput `pulumi:"filters"` // The name of the network. This can be a name or path. Name pulumi.StringInput `pulumi:"name"` } @@ -151,6 +194,10 @@ func (o GetNetworkResultOutput) DistributedVirtualSwitchUuid() pulumi.StringPtrO return o.ApplyT(func(v GetNetworkResult) *string { return v.DistributedVirtualSwitchUuid }).(pulumi.StringPtrOutput) } +func (o GetNetworkResultOutput) Filters() GetNetworkFilterArrayOutput { + return o.ApplyT(func(v GetNetworkResult) []GetNetworkFilter { return v.Filters }).(GetNetworkFilterArrayOutput) +} + // The provider-assigned unique ID for this managed resource. func (o GetNetworkResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetNetworkResult) string { return v.Id }).(pulumi.StringOutput) diff --git a/sdk/go/vsphere/getVirtualMachine.go b/sdk/go/vsphere/getVirtualMachine.go index c9506979..570e46dc 100644 --- a/sdk/go/vsphere/getVirtualMachine.go +++ b/sdk/go/vsphere/getVirtualMachine.go @@ -309,7 +309,9 @@ type LookupVirtualMachineResult struct { Vapp *GetVirtualMachineVapp `pulumi:"vapp"` VappTransports []string `pulumi:"vappTransports"` VbsEnabled *bool `pulumi:"vbsEnabled"` - VvtdEnabled *bool `pulumi:"vvtdEnabled"` + // Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + Vtpm bool `pulumi:"vtpm"` + VvtdEnabled *bool `pulumi:"vvtdEnabled"` } func LookupVirtualMachineOutput(ctx *pulumi.Context, args LookupVirtualMachineOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualMachineResultOutput { @@ -749,6 +751,11 @@ func (o LookupVirtualMachineResultOutput) VbsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v LookupVirtualMachineResult) *bool { return v.VbsEnabled }).(pulumi.BoolPtrOutput) } +// Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. +func (o LookupVirtualMachineResultOutput) Vtpm() pulumi.BoolOutput { + return o.ApplyT(func(v LookupVirtualMachineResult) bool { return v.Vtpm }).(pulumi.BoolOutput) +} + func (o LookupVirtualMachineResultOutput) VvtdEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v LookupVirtualMachineResult) *bool { return v.VvtdEnabled }).(pulumi.BoolPtrOutput) } diff --git a/sdk/go/vsphere/pulumiTypes.go b/sdk/go/vsphere/pulumiTypes.go index d1a76b6a..8d8a2c57 100644 --- a/sdk/go/vsphere/pulumiTypes.go +++ b/sdk/go/vsphere/pulumiTypes.go @@ -6598,6 +6598,143 @@ func (o VirtualMachineVappPtrOutput) Properties() pulumi.StringMapOutput { }).(pulumi.StringMapOutput) } +type VirtualMachineVtpm struct { + // The version of the TPM device. Default is 2.0. + Version *string `pulumi:"version"` +} + +// VirtualMachineVtpmInput is an input type that accepts VirtualMachineVtpmArgs and VirtualMachineVtpmOutput values. +// You can construct a concrete instance of `VirtualMachineVtpmInput` via: +// +// VirtualMachineVtpmArgs{...} +type VirtualMachineVtpmInput interface { + pulumi.Input + + ToVirtualMachineVtpmOutput() VirtualMachineVtpmOutput + ToVirtualMachineVtpmOutputWithContext(context.Context) VirtualMachineVtpmOutput +} + +type VirtualMachineVtpmArgs struct { + // The version of the TPM device. Default is 2.0. + Version pulumi.StringPtrInput `pulumi:"version"` +} + +func (VirtualMachineVtpmArgs) ElementType() reflect.Type { + return reflect.TypeOf((*VirtualMachineVtpm)(nil)).Elem() +} + +func (i VirtualMachineVtpmArgs) ToVirtualMachineVtpmOutput() VirtualMachineVtpmOutput { + return i.ToVirtualMachineVtpmOutputWithContext(context.Background()) +} + +func (i VirtualMachineVtpmArgs) ToVirtualMachineVtpmOutputWithContext(ctx context.Context) VirtualMachineVtpmOutput { + return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineVtpmOutput) +} + +func (i VirtualMachineVtpmArgs) ToVirtualMachineVtpmPtrOutput() VirtualMachineVtpmPtrOutput { + return i.ToVirtualMachineVtpmPtrOutputWithContext(context.Background()) +} + +func (i VirtualMachineVtpmArgs) ToVirtualMachineVtpmPtrOutputWithContext(ctx context.Context) VirtualMachineVtpmPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineVtpmOutput).ToVirtualMachineVtpmPtrOutputWithContext(ctx) +} + +// VirtualMachineVtpmPtrInput is an input type that accepts VirtualMachineVtpmArgs, VirtualMachineVtpmPtr and VirtualMachineVtpmPtrOutput values. +// You can construct a concrete instance of `VirtualMachineVtpmPtrInput` via: +// +// VirtualMachineVtpmArgs{...} +// +// or: +// +// nil +type VirtualMachineVtpmPtrInput interface { + pulumi.Input + + ToVirtualMachineVtpmPtrOutput() VirtualMachineVtpmPtrOutput + ToVirtualMachineVtpmPtrOutputWithContext(context.Context) VirtualMachineVtpmPtrOutput +} + +type virtualMachineVtpmPtrType VirtualMachineVtpmArgs + +func VirtualMachineVtpmPtr(v *VirtualMachineVtpmArgs) VirtualMachineVtpmPtrInput { + return (*virtualMachineVtpmPtrType)(v) +} + +func (*virtualMachineVtpmPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**VirtualMachineVtpm)(nil)).Elem() +} + +func (i *virtualMachineVtpmPtrType) ToVirtualMachineVtpmPtrOutput() VirtualMachineVtpmPtrOutput { + return i.ToVirtualMachineVtpmPtrOutputWithContext(context.Background()) +} + +func (i *virtualMachineVtpmPtrType) ToVirtualMachineVtpmPtrOutputWithContext(ctx context.Context) VirtualMachineVtpmPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineVtpmPtrOutput) +} + +type VirtualMachineVtpmOutput struct{ *pulumi.OutputState } + +func (VirtualMachineVtpmOutput) ElementType() reflect.Type { + return reflect.TypeOf((*VirtualMachineVtpm)(nil)).Elem() +} + +func (o VirtualMachineVtpmOutput) ToVirtualMachineVtpmOutput() VirtualMachineVtpmOutput { + return o +} + +func (o VirtualMachineVtpmOutput) ToVirtualMachineVtpmOutputWithContext(ctx context.Context) VirtualMachineVtpmOutput { + return o +} + +func (o VirtualMachineVtpmOutput) ToVirtualMachineVtpmPtrOutput() VirtualMachineVtpmPtrOutput { + return o.ToVirtualMachineVtpmPtrOutputWithContext(context.Background()) +} + +func (o VirtualMachineVtpmOutput) ToVirtualMachineVtpmPtrOutputWithContext(ctx context.Context) VirtualMachineVtpmPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v VirtualMachineVtpm) *VirtualMachineVtpm { + return &v + }).(VirtualMachineVtpmPtrOutput) +} + +// The version of the TPM device. Default is 2.0. +func (o VirtualMachineVtpmOutput) Version() pulumi.StringPtrOutput { + return o.ApplyT(func(v VirtualMachineVtpm) *string { return v.Version }).(pulumi.StringPtrOutput) +} + +type VirtualMachineVtpmPtrOutput struct{ *pulumi.OutputState } + +func (VirtualMachineVtpmPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**VirtualMachineVtpm)(nil)).Elem() +} + +func (o VirtualMachineVtpmPtrOutput) ToVirtualMachineVtpmPtrOutput() VirtualMachineVtpmPtrOutput { + return o +} + +func (o VirtualMachineVtpmPtrOutput) ToVirtualMachineVtpmPtrOutputWithContext(ctx context.Context) VirtualMachineVtpmPtrOutput { + return o +} + +func (o VirtualMachineVtpmPtrOutput) Elem() VirtualMachineVtpmOutput { + return o.ApplyT(func(v *VirtualMachineVtpm) VirtualMachineVtpm { + if v != nil { + return *v + } + var ret VirtualMachineVtpm + return ret + }).(VirtualMachineVtpmOutput) +} + +// The version of the TPM device. Default is 2.0. +func (o VirtualMachineVtpmPtrOutput) Version() pulumi.StringPtrOutput { + return o.ApplyT(func(v *VirtualMachineVtpm) *string { + if v == nil { + return nil + } + return v.Version + }).(pulumi.StringPtrOutput) +} + type VmStoragePolicyTagRule struct { // Include datastores with the given tags or exclude. Default `true`. IncludeDatastoresWithTags *bool `pulumi:"includeDatastoresWithTags"` @@ -7857,6 +7994,103 @@ func (o GetHostVgpuProfileVgpuProfileArrayOutput) Index(i pulumi.IntInput) GetHo }).(GetHostVgpuProfileVgpuProfileOutput) } +type GetNetworkFilter struct { + // This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + NetworkType *string `pulumi:"networkType"` +} + +// GetNetworkFilterInput is an input type that accepts GetNetworkFilterArgs and GetNetworkFilterOutput values. +// You can construct a concrete instance of `GetNetworkFilterInput` via: +// +// GetNetworkFilterArgs{...} +type GetNetworkFilterInput interface { + pulumi.Input + + ToGetNetworkFilterOutput() GetNetworkFilterOutput + ToGetNetworkFilterOutputWithContext(context.Context) GetNetworkFilterOutput +} + +type GetNetworkFilterArgs struct { + // This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + NetworkType pulumi.StringPtrInput `pulumi:"networkType"` +} + +func (GetNetworkFilterArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkFilter)(nil)).Elem() +} + +func (i GetNetworkFilterArgs) ToGetNetworkFilterOutput() GetNetworkFilterOutput { + return i.ToGetNetworkFilterOutputWithContext(context.Background()) +} + +func (i GetNetworkFilterArgs) ToGetNetworkFilterOutputWithContext(ctx context.Context) GetNetworkFilterOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkFilterOutput) +} + +// GetNetworkFilterArrayInput is an input type that accepts GetNetworkFilterArray and GetNetworkFilterArrayOutput values. +// You can construct a concrete instance of `GetNetworkFilterArrayInput` via: +// +// GetNetworkFilterArray{ GetNetworkFilterArgs{...} } +type GetNetworkFilterArrayInput interface { + pulumi.Input + + ToGetNetworkFilterArrayOutput() GetNetworkFilterArrayOutput + ToGetNetworkFilterArrayOutputWithContext(context.Context) GetNetworkFilterArrayOutput +} + +type GetNetworkFilterArray []GetNetworkFilterInput + +func (GetNetworkFilterArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkFilter)(nil)).Elem() +} + +func (i GetNetworkFilterArray) ToGetNetworkFilterArrayOutput() GetNetworkFilterArrayOutput { + return i.ToGetNetworkFilterArrayOutputWithContext(context.Background()) +} + +func (i GetNetworkFilterArray) ToGetNetworkFilterArrayOutputWithContext(ctx context.Context) GetNetworkFilterArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNetworkFilterArrayOutput) +} + +type GetNetworkFilterOutput struct{ *pulumi.OutputState } + +func (GetNetworkFilterOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNetworkFilter)(nil)).Elem() +} + +func (o GetNetworkFilterOutput) ToGetNetworkFilterOutput() GetNetworkFilterOutput { + return o +} + +func (o GetNetworkFilterOutput) ToGetNetworkFilterOutputWithContext(ctx context.Context) GetNetworkFilterOutput { + return o +} + +// This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. +func (o GetNetworkFilterOutput) NetworkType() pulumi.StringPtrOutput { + return o.ApplyT(func(v GetNetworkFilter) *string { return v.NetworkType }).(pulumi.StringPtrOutput) +} + +type GetNetworkFilterArrayOutput struct{ *pulumi.OutputState } + +func (GetNetworkFilterArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNetworkFilter)(nil)).Elem() +} + +func (o GetNetworkFilterArrayOutput) ToGetNetworkFilterArrayOutput() GetNetworkFilterArrayOutput { + return o +} + +func (o GetNetworkFilterArrayOutput) ToGetNetworkFilterArrayOutputWithContext(ctx context.Context) GetNetworkFilterArrayOutput { + return o +} + +func (o GetNetworkFilterArrayOutput) Index(i pulumi.IntInput) GetNetworkFilterOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNetworkFilter { + return vs[0].([]GetNetworkFilter)[vs[1].(int)] + }).(GetNetworkFilterOutput) +} + type GetVirtualMachineDisk struct { // Set to `true` if the disk has been eager zeroed. EagerlyScrub bool `pulumi:"eagerlyScrub"` @@ -8385,6 +8619,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineOvfDeployPtrInput)(nil)).Elem(), VirtualMachineOvfDeployArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineVappInput)(nil)).Elem(), VirtualMachineVappArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineVappPtrInput)(nil)).Elem(), VirtualMachineVappArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineVtpmInput)(nil)).Elem(), VirtualMachineVtpmArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineVtpmPtrInput)(nil)).Elem(), VirtualMachineVtpmArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VmStoragePolicyTagRuleInput)(nil)).Elem(), VmStoragePolicyTagRuleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*VmStoragePolicyTagRuleArrayInput)(nil)).Elem(), VmStoragePolicyTagRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VnicIpv4Input)(nil)).Elem(), VnicIpv4Args{}) @@ -8401,6 +8637,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetGuestOsCustomizationSpecWindowsOptionArrayInput)(nil)).Elem(), GetGuestOsCustomizationSpecWindowsOptionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHostVgpuProfileVgpuProfileInput)(nil)).Elem(), GetHostVgpuProfileVgpuProfileArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHostVgpuProfileVgpuProfileArrayInput)(nil)).Elem(), GetHostVgpuProfileVgpuProfileArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkFilterInput)(nil)).Elem(), GetNetworkFilterArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNetworkFilterArrayInput)(nil)).Elem(), GetNetworkFilterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetVirtualMachineDiskInput)(nil)).Elem(), GetVirtualMachineDiskArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetVirtualMachineDiskArrayInput)(nil)).Elem(), GetVirtualMachineDiskArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetVirtualMachineNetworkInterfaceInput)(nil)).Elem(), GetVirtualMachineNetworkInterfaceArgs{}) @@ -8483,6 +8721,8 @@ func init() { pulumi.RegisterOutputType(VirtualMachineOvfDeployPtrOutput{}) pulumi.RegisterOutputType(VirtualMachineVappOutput{}) pulumi.RegisterOutputType(VirtualMachineVappPtrOutput{}) + pulumi.RegisterOutputType(VirtualMachineVtpmOutput{}) + pulumi.RegisterOutputType(VirtualMachineVtpmPtrOutput{}) pulumi.RegisterOutputType(VmStoragePolicyTagRuleOutput{}) pulumi.RegisterOutputType(VmStoragePolicyTagRuleArrayOutput{}) pulumi.RegisterOutputType(VnicIpv4Output{}) @@ -8499,6 +8739,8 @@ func init() { pulumi.RegisterOutputType(GetGuestOsCustomizationSpecWindowsOptionArrayOutput{}) pulumi.RegisterOutputType(GetHostVgpuProfileVgpuProfileOutput{}) pulumi.RegisterOutputType(GetHostVgpuProfileVgpuProfileArrayOutput{}) + pulumi.RegisterOutputType(GetNetworkFilterOutput{}) + pulumi.RegisterOutputType(GetNetworkFilterArrayOutput{}) pulumi.RegisterOutputType(GetVirtualMachineDiskOutput{}) pulumi.RegisterOutputType(GetVirtualMachineDiskArrayOutput{}) pulumi.RegisterOutputType(GetVirtualMachineNetworkInterfaceOutput{}) diff --git a/sdk/go/vsphere/virtualMachine.go b/sdk/go/vsphere/virtualMachine.go index 15ca0a9e..0d2ca465 100644 --- a/sdk/go/vsphere/virtualMachine.go +++ b/sdk/go/vsphere/virtualMachine.go @@ -209,6 +209,8 @@ type VirtualMachine struct { VmwareToolsStatus pulumi.StringOutput `pulumi:"vmwareToolsStatus"` // The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. VmxPath pulumi.StringOutput `pulumi:"vmxPath"` + // A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + Vtpm VirtualMachineVtpmPtrOutput `pulumi:"vtpm"` // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. VvtdEnabled pulumi.BoolPtrOutput `pulumi:"vvtdEnabled"` @@ -427,6 +429,8 @@ type virtualMachineState struct { VmwareToolsStatus *string `pulumi:"vmwareToolsStatus"` // The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. VmxPath *string `pulumi:"vmxPath"` + // A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + Vtpm *VirtualMachineVtpm `pulumi:"vtpm"` // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. VvtdEnabled *bool `pulumi:"vvtdEnabled"` @@ -613,6 +617,8 @@ type VirtualMachineState struct { VmwareToolsStatus pulumi.StringPtrInput // The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. VmxPath pulumi.StringPtrInput + // A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + Vtpm VirtualMachineVtpmPtrInput // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. VvtdEnabled pulumi.BoolPtrInput @@ -782,6 +788,8 @@ type virtualMachineArgs struct { Vapp *VirtualMachineVapp `pulumi:"vapp"` // Flag to specify if Virtualization-based security is enabled for this virtual machine. VbsEnabled *bool `pulumi:"vbsEnabled"` + // A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + Vtpm *VirtualMachineVtpm `pulumi:"vtpm"` // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. VvtdEnabled *bool `pulumi:"vvtdEnabled"` @@ -948,6 +956,8 @@ type VirtualMachineArgs struct { Vapp VirtualMachineVappPtrInput // Flag to specify if Virtualization-based security is enabled for this virtual machine. VbsEnabled pulumi.BoolPtrInput + // A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + Vtpm VirtualMachineVtpmPtrInput // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. VvtdEnabled pulumi.BoolPtrInput @@ -1466,6 +1476,11 @@ func (o VirtualMachineOutput) VmxPath() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.VmxPath }).(pulumi.StringOutput) } +// A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. +func (o VirtualMachineOutput) Vtpm() VirtualMachineVtpmPtrOutput { + return o.ApplyT(func(v *VirtualMachine) VirtualMachineVtpmPtrOutput { return v.Vtpm }).(VirtualMachineVtpmPtrOutput) +} + // Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD // I/O Virtualization (AMD-Vi or IOMMU), is enabled. func (o VirtualMachineOutput) VvtdEnabled() pulumi.BoolPtrOutput { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java index 32a04bc2..b5cfbfb2 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java @@ -16,6 +16,7 @@ import com.pulumi.vsphere.outputs.VirtualMachineNetworkInterface; import com.pulumi.vsphere.outputs.VirtualMachineOvfDeploy; import com.pulumi.vsphere.outputs.VirtualMachineVapp; +import com.pulumi.vsphere.outputs.VirtualMachineVtpm; import java.lang.Boolean; import java.lang.Integer; import java.lang.String; @@ -1190,6 +1191,20 @@ public Output vmwareToolsStatus() { public Output vmxPath() { return this.vmxPath; } + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + @Export(name="vtpm", refs={VirtualMachineVtpm.class}, tree="[0]") + private Output vtpm; + + /** + * @return A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + public Output> vtpm() { + return Codegen.optional(this.vtpm); + } /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java index 0761d394..f38e4e27 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java @@ -12,6 +12,7 @@ import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs; import com.pulumi.vsphere.inputs.VirtualMachineOvfDeployArgs; import com.pulumi.vsphere.inputs.VirtualMachineVappArgs; +import com.pulumi.vsphere.inputs.VirtualMachineVtpmArgs; import java.lang.Boolean; import java.lang.Integer; import java.lang.String; @@ -1089,6 +1090,21 @@ public Optional> vbsEnabled() { return Optional.ofNullable(this.vbsEnabled); } + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + @Import(name="vtpm") + private @Nullable Output vtpm; + + /** + * @return A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + public Optional> vtpm() { + return Optional.ofNullable(this.vtpm); + } + /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -1231,6 +1247,7 @@ private VirtualMachineArgs(VirtualMachineArgs $) { this.toolsUpgradePolicy = $.toolsUpgradePolicy; this.vapp = $.vapp; this.vbsEnabled = $.vbsEnabled; + this.vtpm = $.vtpm; this.vvtdEnabled = $.vvtdEnabled; this.waitForGuestIpTimeout = $.waitForGuestIpTimeout; this.waitForGuestNetRoutable = $.waitForGuestNetRoutable; @@ -2792,6 +2809,27 @@ public Builder vbsEnabled(Boolean vbsEnabled) { return vbsEnabled(Output.of(vbsEnabled)); } + /** + * @param vtpm A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + * @return builder + * + */ + public Builder vtpm(@Nullable Output vtpm) { + $.vtpm = vtpm; + return this; + } + + /** + * @param vtpm A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + * @return builder + * + */ + public Builder vtpm(VirtualMachineVtpmArgs vtpm) { + return vtpm(Output.of(vtpm)); + } + /** * @param vvtdEnabled Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java b/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java index 7a5cdcb6..4b60857b 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java @@ -4507,6 +4507,50 @@ public static CompletableFuture getLicensePlain(GetLicensePlai * * <!--End PulumiCodeChooser --> * + * ### Additional Examples + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var myPortGroup = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .name("VM Network")
+     *             .filters(GetNetworkFilterArgs.builder()
+     *                 .networkType("Network")
+     *                 .build())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * */ public static Output getNetwork(GetNetworkArgs args) { return getNetwork(args, InvokeOptions.Empty); @@ -4559,6 +4603,50 @@ public static Output getNetwork(GetNetworkArgs args) { * * <!--End PulumiCodeChooser --> * + * ### Additional Examples + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var myPortGroup = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .name("VM Network")
+     *             .filters(GetNetworkFilterArgs.builder()
+     *                 .networkType("Network")
+     *                 .build())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * */ public static CompletableFuture getNetworkPlain(GetNetworkPlainArgs args) { return getNetworkPlain(args, InvokeOptions.Empty); @@ -4611,6 +4699,50 @@ public static CompletableFuture getNetworkPlain(GetNetworkPlai * * <!--End PulumiCodeChooser --> * + * ### Additional Examples + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var myPortGroup = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .name("VM Network")
+     *             .filters(GetNetworkFilterArgs.builder()
+     *                 .networkType("Network")
+     *                 .build())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * */ public static Output getNetwork(GetNetworkArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getNetwork:getNetwork", TypeShape.of(GetNetworkResult.class), args, Utilities.withVersion(options)); @@ -4663,6 +4795,50 @@ public static Output getNetwork(GetNetworkArgs args, InvokeOpt * * <!--End PulumiCodeChooser --> * + * ### Additional Examples + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var myPortGroup = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .name("VM Network")
+     *             .filters(GetNetworkFilterArgs.builder()
+     *                 .networkType("Network")
+     *                 .build())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * */ public static CompletableFuture getNetworkPlain(GetNetworkPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("vsphere:index/getNetwork:getNetwork", TypeShape.of(GetNetworkResult.class), args, Utilities.withVersion(options)); diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkArgs.java index 9b5bb16d..34af4020 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkArgs.java @@ -6,7 +6,9 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.vsphere.inputs.GetNetworkFilterArgs; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -58,6 +60,21 @@ public Optional> distributedVirtualSwitchUuid() { return Optional.ofNullable(this.distributedVirtualSwitchUuid); } + /** + * Apply a filter for the discovered network. + * + */ + @Import(name="filters") + private @Nullable Output> filters; + + /** + * @return Apply a filter for the discovered network. + * + */ + public Optional>> filters() { + return Optional.ofNullable(this.filters); + } + /** * The name of the network. This can be a name or path. * @@ -78,6 +95,7 @@ private GetNetworkArgs() {} private GetNetworkArgs(GetNetworkArgs $) { this.datacenterId = $.datacenterId; this.distributedVirtualSwitchUuid = $.distributedVirtualSwitchUuid; + this.filters = $.filters; this.name = $.name; } @@ -153,6 +171,37 @@ public Builder distributedVirtualSwitchUuid(String distributedVirtualSwitchUuid) return distributedVirtualSwitchUuid(Output.of(distributedVirtualSwitchUuid)); } + /** + * @param filters Apply a filter for the discovered network. + * + * @return builder + * + */ + public Builder filters(@Nullable Output> filters) { + $.filters = filters; + return this; + } + + /** + * @param filters Apply a filter for the discovered network. + * + * @return builder + * + */ + public Builder filters(List filters) { + return filters(Output.of(filters)); + } + + /** + * @param filters Apply a filter for the discovered network. + * + * @return builder + * + */ + public Builder filters(GetNetworkFilterArgs... filters) { + return filters(List.of(filters)); + } + /** * @param name The name of the network. This can be a name or path. * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilter.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilter.java new file mode 100644 index 00000000..124068d1 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilter.java @@ -0,0 +1,72 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.vsphere.inputs; + +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class GetNetworkFilter extends com.pulumi.resources.InvokeArgs { + + public static final GetNetworkFilter Empty = new GetNetworkFilter(); + + /** + * This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + @Import(name="networkType") + private @Nullable String networkType; + + /** + * @return This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + public Optional networkType() { + return Optional.ofNullable(this.networkType); + } + + private GetNetworkFilter() {} + + private GetNetworkFilter(GetNetworkFilter $) { + this.networkType = $.networkType; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetNetworkFilter defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetNetworkFilter $; + + public Builder() { + $ = new GetNetworkFilter(); + } + + public Builder(GetNetworkFilter defaults) { + $ = new GetNetworkFilter(Objects.requireNonNull(defaults)); + } + + /** + * @param networkType This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + * @return builder + * + */ + public Builder networkType(@Nullable String networkType) { + $.networkType = networkType; + return this; + } + + public GetNetworkFilter build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilterArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilterArgs.java new file mode 100644 index 00000000..807520ee --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkFilterArgs.java @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.vsphere.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class GetNetworkFilterArgs extends com.pulumi.resources.ResourceArgs { + + public static final GetNetworkFilterArgs Empty = new GetNetworkFilterArgs(); + + /** + * This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + @Import(name="networkType") + private @Nullable Output networkType; + + /** + * @return This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + public Optional> networkType() { + return Optional.ofNullable(this.networkType); + } + + private GetNetworkFilterArgs() {} + + private GetNetworkFilterArgs(GetNetworkFilterArgs $) { + this.networkType = $.networkType; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetNetworkFilterArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetNetworkFilterArgs $; + + public Builder() { + $ = new GetNetworkFilterArgs(); + } + + public Builder(GetNetworkFilterArgs defaults) { + $ = new GetNetworkFilterArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param networkType This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + * @return builder + * + */ + public Builder networkType(@Nullable Output networkType) { + $.networkType = networkType; + return this; + } + + /** + * @param networkType This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + * @return builder + * + */ + public Builder networkType(String networkType) { + return networkType(Output.of(networkType)); + } + + public GetNetworkFilterArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkPlainArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkPlainArgs.java index 31e5135c..5763f41a 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkPlainArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/GetNetworkPlainArgs.java @@ -5,7 +5,9 @@ import com.pulumi.core.annotations.Import; import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.vsphere.inputs.GetNetworkFilter; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -57,6 +59,21 @@ public Optional distributedVirtualSwitchUuid() { return Optional.ofNullable(this.distributedVirtualSwitchUuid); } + /** + * Apply a filter for the discovered network. + * + */ + @Import(name="filters") + private @Nullable List filters; + + /** + * @return Apply a filter for the discovered network. + * + */ + public Optional> filters() { + return Optional.ofNullable(this.filters); + } + /** * The name of the network. This can be a name or path. * @@ -77,6 +94,7 @@ private GetNetworkPlainArgs() {} private GetNetworkPlainArgs(GetNetworkPlainArgs $) { this.datacenterId = $.datacenterId; this.distributedVirtualSwitchUuid = $.distributedVirtualSwitchUuid; + this.filters = $.filters; this.name = $.name; } @@ -126,6 +144,27 @@ public Builder distributedVirtualSwitchUuid(@Nullable String distributedVirtualS return this; } + /** + * @param filters Apply a filter for the discovered network. + * + * @return builder + * + */ + public Builder filters(@Nullable List filters) { + $.filters = filters; + return this; + } + + /** + * @param filters Apply a filter for the discovered network. + * + * @return builder + * + */ + public Builder filters(GetNetworkFilter... filters) { + return filters(List.of(filters)); + } + /** * @param name The name of the network. This can be a name or path. * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineState.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineState.java index 56e11a3d..922b5a3c 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineState.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineState.java @@ -11,6 +11,7 @@ import com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs; import com.pulumi.vsphere.inputs.VirtualMachineOvfDeployArgs; import com.pulumi.vsphere.inputs.VirtualMachineVappArgs; +import com.pulumi.vsphere.inputs.VirtualMachineVtpmArgs; import java.lang.Boolean; import java.lang.Integer; import java.lang.String; @@ -1245,6 +1246,21 @@ public Optional> vmxPath() { return Optional.ofNullable(this.vmxPath); } + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + @Import(name="vtpm") + private @Nullable Output vtpm; + + /** + * @return A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + */ + public Optional> vtpm() { + return Optional.ofNullable(this.vtpm); + } + /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -1398,6 +1414,7 @@ private VirtualMachineState(VirtualMachineState $) { this.vbsEnabled = $.vbsEnabled; this.vmwareToolsStatus = $.vmwareToolsStatus; this.vmxPath = $.vmxPath; + this.vtpm = $.vtpm; this.vvtdEnabled = $.vvtdEnabled; this.waitForGuestIpTimeout = $.waitForGuestIpTimeout; this.waitForGuestNetRoutable = $.waitForGuestNetRoutable; @@ -3198,6 +3215,27 @@ public Builder vmxPath(String vmxPath) { return vmxPath(Output.of(vmxPath)); } + /** + * @param vtpm A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + * @return builder + * + */ + public Builder vtpm(@Nullable Output vtpm) { + $.vtpm = vtpm; + return this; + } + + /** + * @param vtpm A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + * + * @return builder + * + */ + public Builder vtpm(VirtualMachineVtpmArgs vtpm) { + return vtpm(Output.of(vtpm)); + } + /** * @param vvtdEnabled Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineVtpmArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineVtpmArgs.java new file mode 100644 index 00000000..836aa6ad --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualMachineVtpmArgs.java @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.vsphere.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class VirtualMachineVtpmArgs extends com.pulumi.resources.ResourceArgs { + + public static final VirtualMachineVtpmArgs Empty = new VirtualMachineVtpmArgs(); + + /** + * The version of the TPM device. Default is 2.0. + * + */ + @Import(name="version") + private @Nullable Output version; + + /** + * @return The version of the TPM device. Default is 2.0. + * + */ + public Optional> version() { + return Optional.ofNullable(this.version); + } + + private VirtualMachineVtpmArgs() {} + + private VirtualMachineVtpmArgs(VirtualMachineVtpmArgs $) { + this.version = $.version; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(VirtualMachineVtpmArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private VirtualMachineVtpmArgs $; + + public Builder() { + $ = new VirtualMachineVtpmArgs(); + } + + public Builder(VirtualMachineVtpmArgs defaults) { + $ = new VirtualMachineVtpmArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param version The version of the TPM device. Default is 2.0. + * + * @return builder + * + */ + public Builder version(@Nullable Output version) { + $.version = version; + return this; + } + + /** + * @param version The version of the TPM device. Default is 2.0. + * + * @return builder + * + */ + public Builder version(String version) { + return version(Output.of(version)); + } + + public VirtualMachineVtpmArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatacenterResult.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatacenterResult.java index 8f47947a..86aa43f4 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatacenterResult.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatacenterResult.java @@ -6,6 +6,7 @@ import com.pulumi.core.annotations.CustomType; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -18,6 +19,11 @@ public final class GetDatacenterResult { */ private String id; private @Nullable String name; + /** + * @return List of all virtual machines included in the vSphere datacenter object. + * + */ + private List virtualMachines; private GetDatacenterResult() {} /** @@ -30,6 +36,13 @@ public String id() { public Optional name() { return Optional.ofNullable(this.name); } + /** + * @return List of all virtual machines included in the vSphere datacenter object. + * + */ + public List virtualMachines() { + return this.virtualMachines; + } public static Builder builder() { return new Builder(); @@ -42,11 +55,13 @@ public static Builder builder(GetDatacenterResult defaults) { public static final class Builder { private String id; private @Nullable String name; + private List virtualMachines; public Builder() {} public Builder(GetDatacenterResult defaults) { Objects.requireNonNull(defaults); this.id = defaults.id; this.name = defaults.name; + this.virtualMachines = defaults.virtualMachines; } @CustomType.Setter @@ -63,10 +78,22 @@ public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter + public Builder virtualMachines(List virtualMachines) { + if (virtualMachines == null) { + throw new MissingRequiredPropertyException("GetDatacenterResult", "virtualMachines"); + } + this.virtualMachines = virtualMachines; + return this; + } + public Builder virtualMachines(String... virtualMachines) { + return virtualMachines(List.of(virtualMachines)); + } public GetDatacenterResult build() { final var _resultValue = new GetDatacenterResult(); _resultValue.id = id; _resultValue.name = name; + _resultValue.virtualMachines = virtualMachines; return _resultValue; } } diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatastoreClusterResult.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatastoreClusterResult.java index 57c5614e..fa8df9a7 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatastoreClusterResult.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetDatastoreClusterResult.java @@ -6,6 +6,7 @@ import com.pulumi.core.annotations.CustomType; import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -13,6 +14,12 @@ @CustomType public final class GetDatastoreClusterResult { private @Nullable String datacenterId; + /** + * @return (Optional) The names of the datastores included in the specific + * cluster. + * + */ + private List datastores; /** * @return The provider-assigned unique ID for this managed resource. * @@ -24,6 +31,14 @@ private GetDatastoreClusterResult() {} public Optional datacenterId() { return Optional.ofNullable(this.datacenterId); } + /** + * @return (Optional) The names of the datastores included in the specific + * cluster. + * + */ + public List datastores() { + return this.datastores; + } /** * @return The provider-assigned unique ID for this managed resource. * @@ -45,12 +60,14 @@ public static Builder builder(GetDatastoreClusterResult defaults) { @CustomType.Builder public static final class Builder { private @Nullable String datacenterId; + private List datastores; private String id; private String name; public Builder() {} public Builder(GetDatastoreClusterResult defaults) { Objects.requireNonNull(defaults); this.datacenterId = defaults.datacenterId; + this.datastores = defaults.datastores; this.id = defaults.id; this.name = defaults.name; } @@ -62,6 +79,17 @@ public Builder datacenterId(@Nullable String datacenterId) { return this; } @CustomType.Setter + public Builder datastores(List datastores) { + if (datastores == null) { + throw new MissingRequiredPropertyException("GetDatastoreClusterResult", "datastores"); + } + this.datastores = datastores; + return this; + } + public Builder datastores(String... datastores) { + return datastores(List.of(datastores)); + } + @CustomType.Setter public Builder id(String id) { if (id == null) { throw new MissingRequiredPropertyException("GetDatastoreClusterResult", "id"); @@ -80,6 +108,7 @@ public Builder name(String name) { public GetDatastoreClusterResult build() { final var _resultValue = new GetDatastoreClusterResult(); _resultValue.datacenterId = datacenterId; + _resultValue.datastores = datastores; _resultValue.id = id; _resultValue.name = name; return _resultValue; diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkFilter.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkFilter.java new file mode 100644 index 00000000..4051a272 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkFilter.java @@ -0,0 +1,57 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.vsphere.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class GetNetworkFilter { + /** + * @return This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + private @Nullable String networkType; + + private GetNetworkFilter() {} + /** + * @return This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + * + */ + public Optional networkType() { + return Optional.ofNullable(this.networkType); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetNetworkFilter defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String networkType; + public Builder() {} + public Builder(GetNetworkFilter defaults) { + Objects.requireNonNull(defaults); + this.networkType = defaults.networkType; + } + + @CustomType.Setter + public Builder networkType(@Nullable String networkType) { + + this.networkType = networkType; + return this; + } + public GetNetworkFilter build() { + final var _resultValue = new GetNetworkFilter(); + _resultValue.networkType = networkType; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkResult.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkResult.java index e7307d05..13d5f025 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkResult.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetNetworkResult.java @@ -5,7 +5,9 @@ import com.pulumi.core.annotations.CustomType; import com.pulumi.exceptions.MissingRequiredPropertyException; +import com.pulumi.vsphere.outputs.GetNetworkFilter; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; @@ -14,6 +16,7 @@ public final class GetNetworkResult { private @Nullable String datacenterId; private @Nullable String distributedVirtualSwitchUuid; + private @Nullable List filters; /** * @return The provider-assigned unique ID for this managed resource. * @@ -36,6 +39,9 @@ public Optional datacenterId() { public Optional distributedVirtualSwitchUuid() { return Optional.ofNullable(this.distributedVirtualSwitchUuid); } + public List filters() { + return this.filters == null ? List.of() : this.filters; + } /** * @return The provider-assigned unique ID for this managed resource. * @@ -68,6 +74,7 @@ public static Builder builder(GetNetworkResult defaults) { public static final class Builder { private @Nullable String datacenterId; private @Nullable String distributedVirtualSwitchUuid; + private @Nullable List filters; private String id; private String name; private String type; @@ -76,6 +83,7 @@ public Builder(GetNetworkResult defaults) { Objects.requireNonNull(defaults); this.datacenterId = defaults.datacenterId; this.distributedVirtualSwitchUuid = defaults.distributedVirtualSwitchUuid; + this.filters = defaults.filters; this.id = defaults.id; this.name = defaults.name; this.type = defaults.type; @@ -94,6 +102,15 @@ public Builder distributedVirtualSwitchUuid(@Nullable String distributedVirtualS return this; } @CustomType.Setter + public Builder filters(@Nullable List filters) { + + this.filters = filters; + return this; + } + public Builder filters(GetNetworkFilter... filters) { + return filters(List.of(filters)); + } + @CustomType.Setter public Builder id(String id) { if (id == null) { throw new MissingRequiredPropertyException("GetNetworkResult", "id"); @@ -121,6 +138,7 @@ public GetNetworkResult build() { final var _resultValue = new GetNetworkResult(); _resultValue.datacenterId = datacenterId; _resultValue.distributedVirtualSwitchUuid = distributedVirtualSwitchUuid; + _resultValue.filters = filters; _resultValue.id = id; _resultValue.name = name; _resultValue.type = type; diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetVirtualMachineResult.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetVirtualMachineResult.java index f74902f4..7165a34c 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetVirtualMachineResult.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/GetVirtualMachineResult.java @@ -183,6 +183,11 @@ public final class GetVirtualMachineResult { private @Nullable GetVirtualMachineVapp vapp; private List vappTransports; private @Nullable Boolean vbsEnabled; + /** + * @return Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + * + */ + private Boolean vtpm; private @Nullable Boolean vvtdEnabled; private GetVirtualMachineResult() {} @@ -480,6 +485,13 @@ public List vappTransports() { public Optional vbsEnabled() { return Optional.ofNullable(this.vbsEnabled); } + /** + * @return Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + * + */ + public Boolean vtpm() { + return this.vtpm; + } public Optional vvtdEnabled() { return Optional.ofNullable(this.vvtdEnabled); } @@ -558,6 +570,7 @@ public static final class Builder { private @Nullable GetVirtualMachineVapp vapp; private List vappTransports; private @Nullable Boolean vbsEnabled; + private Boolean vtpm; private @Nullable Boolean vvtdEnabled; public Builder() {} public Builder(GetVirtualMachineResult defaults) { @@ -627,6 +640,7 @@ public Builder(GetVirtualMachineResult defaults) { this.vapp = defaults.vapp; this.vappTransports = defaults.vappTransports; this.vbsEnabled = defaults.vbsEnabled; + this.vtpm = defaults.vtpm; this.vvtdEnabled = defaults.vvtdEnabled; } @@ -1078,6 +1092,14 @@ public Builder vbsEnabled(@Nullable Boolean vbsEnabled) { return this; } @CustomType.Setter + public Builder vtpm(Boolean vtpm) { + if (vtpm == null) { + throw new MissingRequiredPropertyException("GetVirtualMachineResult", "vtpm"); + } + this.vtpm = vtpm; + return this; + } + @CustomType.Setter public Builder vvtdEnabled(@Nullable Boolean vvtdEnabled) { this.vvtdEnabled = vvtdEnabled; @@ -1150,6 +1172,7 @@ public GetVirtualMachineResult build() { _resultValue.vapp = vapp; _resultValue.vappTransports = vappTransports; _resultValue.vbsEnabled = vbsEnabled; + _resultValue.vtpm = vtpm; _resultValue.vvtdEnabled = vvtdEnabled; return _resultValue; } diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/outputs/VirtualMachineVtpm.java b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/VirtualMachineVtpm.java new file mode 100644 index 00000000..08a4f289 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/vsphere/outputs/VirtualMachineVtpm.java @@ -0,0 +1,57 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.vsphere.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class VirtualMachineVtpm { + /** + * @return The version of the TPM device. Default is 2.0. + * + */ + private @Nullable String version; + + private VirtualMachineVtpm() {} + /** + * @return The version of the TPM device. Default is 2.0. + * + */ + public Optional version() { + return Optional.ofNullable(this.version); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(VirtualMachineVtpm defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String version; + public Builder() {} + public Builder(VirtualMachineVtpm defaults) { + Objects.requireNonNull(defaults); + this.version = defaults.version; + } + + @CustomType.Setter + public Builder version(@Nullable String version) { + + this.version = version; + return this; + } + public VirtualMachineVtpm build() { + final var _resultValue = new VirtualMachineVtpm(); + _resultValue.version = version; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/getDatacenter.ts b/sdk/nodejs/getDatacenter.ts index 3759eb49..09a216cc 100644 --- a/sdk/nodejs/getDatacenter.ts +++ b/sdk/nodejs/getDatacenter.ts @@ -54,6 +54,10 @@ export interface GetDatacenterResult { */ readonly id: string; readonly name?: string; + /** + * List of all virtual machines included in the vSphere datacenter object. + */ + readonly virtualMachines: string[]; } /** * The `vsphere.Datacenter` data source can be used to discover the ID of a diff --git a/sdk/nodejs/getDatastoreCluster.ts b/sdk/nodejs/getDatastoreCluster.ts index 91c496ed..f5ccec59 100644 --- a/sdk/nodejs/getDatastoreCluster.ts +++ b/sdk/nodejs/getDatastoreCluster.ts @@ -56,6 +56,11 @@ export interface GetDatastoreClusterArgs { */ export interface GetDatastoreClusterResult { readonly datacenterId?: string; + /** + * (Optional) The names of the datastores included in the specific + * cluster. + */ + readonly datastores: string[]; /** * The provider-assigned unique ID for this managed resource. */ diff --git a/sdk/nodejs/getNetwork.ts b/sdk/nodejs/getNetwork.ts index fb8ea2b5..695ce209 100644 --- a/sdk/nodejs/getNetwork.ts +++ b/sdk/nodejs/getNetwork.ts @@ -2,6 +2,8 @@ // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** @@ -25,12 +27,31 @@ import * as utilities from "./utilities"; * datacenterId: datacenter.id, * })); * ``` + * + * ### Additional Examples + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as vsphere from "@pulumi/vsphere"; + * + * const datacenter = vsphere.getDatacenter({ + * name: "dc-01", + * }); + * const myPortGroup = datacenter.then(datacenter => vsphere.getNetwork({ + * datacenterId: datacenter.id, + * name: "VM Network", + * filters: [{ + * networkType: "Network", + * }], + * })); + * ``` */ export function getNetwork(args: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getNetwork:getNetwork", { "datacenterId": args.datacenterId, "distributedVirtualSwitchUuid": args.distributedVirtualSwitchUuid, + "filters": args.filters, "name": args.name, }, opts); } @@ -53,6 +74,10 @@ export interface GetNetworkArgs { * the distributed virtual switch ID. */ distributedVirtualSwitchUuid?: string; + /** + * Apply a filter for the discovered network. + */ + filters?: inputs.GetNetworkFilter[]; /** * The name of the network. This can be a name or path. */ @@ -65,6 +90,7 @@ export interface GetNetworkArgs { export interface GetNetworkResult { readonly datacenterId?: string; readonly distributedVirtualSwitchUuid?: string; + readonly filters?: outputs.GetNetworkFilter[]; /** * The provider-assigned unique ID for this managed resource. */ @@ -99,12 +125,31 @@ export interface GetNetworkResult { * datacenterId: datacenter.id, * })); * ``` + * + * ### Additional Examples + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as vsphere from "@pulumi/vsphere"; + * + * const datacenter = vsphere.getDatacenter({ + * name: "dc-01", + * }); + * const myPortGroup = datacenter.then(datacenter => vsphere.getNetwork({ + * datacenterId: datacenter.id, + * name: "VM Network", + * filters: [{ + * networkType: "Network", + * }], + * })); + * ``` */ export function getNetworkOutput(args: GetNetworkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getNetwork:getNetwork", { "datacenterId": args.datacenterId, "distributedVirtualSwitchUuid": args.distributedVirtualSwitchUuid, + "filters": args.filters, "name": args.name, }, opts); } @@ -127,6 +172,10 @@ export interface GetNetworkOutputArgs { * the distributed virtual switch ID. */ distributedVirtualSwitchUuid?: pulumi.Input; + /** + * Apply a filter for the discovered network. + */ + filters?: pulumi.Input[]>; /** * The name of the network. This can be a name or path. */ diff --git a/sdk/nodejs/getVirtualMachine.ts b/sdk/nodejs/getVirtualMachine.ts index cb8c5ace..4142f9c0 100644 --- a/sdk/nodejs/getVirtualMachine.ts +++ b/sdk/nodejs/getVirtualMachine.ts @@ -383,6 +383,10 @@ export interface GetVirtualMachineResult { readonly vapp?: outputs.GetVirtualMachineVapp; readonly vappTransports: string[]; readonly vbsEnabled?: boolean; + /** + * Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + */ + readonly vtpm: boolean; readonly vvtdEnabled?: boolean; } /** diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index ff306bd2..4254fd91 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -199,6 +199,20 @@ export interface EntityPermissionsPermission { userOrGroup: pulumi.Input; } +export interface GetNetworkFilter { + /** + * This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + */ + networkType?: string; +} + +export interface GetNetworkFilterArgs { + /** + * This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + */ + networkType?: pulumi.Input; +} + export interface GetVirtualMachineVapp { /** * A map of customizable vApp properties and their values. Allows customization of VMs cloned from OVF templates which have customizable vApp properties. @@ -887,6 +901,13 @@ export interface VirtualMachineVapp { properties?: pulumi.Input<{[key: string]: pulumi.Input}>; } +export interface VirtualMachineVtpm { + /** + * The version of the TPM device. Default is 2.0. + */ + version?: pulumi.Input; +} + export interface VmStoragePolicyTagRule { /** * Include datastores with the given tags or exclude. Default `true`. diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 432ef308..c0d5a3ff 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -351,6 +351,13 @@ export interface GetHostVgpuProfileVgpuProfile { vgpu: string; } +export interface GetNetworkFilter { + /** + * This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + */ + networkType?: string; +} + export interface GetVirtualMachineDisk { /** * Set to `true` if the disk has been eager zeroed. @@ -1097,6 +1104,13 @@ export interface VirtualMachineVapp { properties?: {[key: string]: string}; } +export interface VirtualMachineVtpm { + /** + * The version of the TPM device. Default is 2.0. + */ + version?: string; +} + export interface VmStoragePolicyTagRule { /** * Include datastores with the given tags or exclude. Default `true`. diff --git a/sdk/nodejs/virtualMachine.ts b/sdk/nodejs/virtualMachine.ts index 211bc30e..af01bcbd 100644 --- a/sdk/nodejs/virtualMachine.ts +++ b/sdk/nodejs/virtualMachine.ts @@ -386,6 +386,10 @@ export class VirtualMachine extends pulumi.CustomResource { * The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. */ public /*out*/ readonly vmxPath!: pulumi.Output; + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + */ + public readonly vtpm!: pulumi.Output; /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -502,6 +506,7 @@ export class VirtualMachine extends pulumi.CustomResource { resourceInputs["vbsEnabled"] = state ? state.vbsEnabled : undefined; resourceInputs["vmwareToolsStatus"] = state ? state.vmwareToolsStatus : undefined; resourceInputs["vmxPath"] = state ? state.vmxPath : undefined; + resourceInputs["vtpm"] = state ? state.vtpm : undefined; resourceInputs["vvtdEnabled"] = state ? state.vvtdEnabled : undefined; resourceInputs["waitForGuestIpTimeout"] = state ? state.waitForGuestIpTimeout : undefined; resourceInputs["waitForGuestNetRoutable"] = state ? state.waitForGuestNetRoutable : undefined; @@ -582,6 +587,7 @@ export class VirtualMachine extends pulumi.CustomResource { resourceInputs["toolsUpgradePolicy"] = args ? args.toolsUpgradePolicy : undefined; resourceInputs["vapp"] = args ? args.vapp : undefined; resourceInputs["vbsEnabled"] = args ? args.vbsEnabled : undefined; + resourceInputs["vtpm"] = args ? args.vtpm : undefined; resourceInputs["vvtdEnabled"] = args ? args.vvtdEnabled : undefined; resourceInputs["waitForGuestIpTimeout"] = args ? args.waitForGuestIpTimeout : undefined; resourceInputs["waitForGuestNetRoutable"] = args ? args.waitForGuestNetRoutable : undefined; @@ -934,6 +940,10 @@ export interface VirtualMachineState { * The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. */ vmxPath?: pulumi.Input; + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + */ + vtpm?: pulumi.Input; /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. @@ -1246,6 +1256,10 @@ export interface VirtualMachineArgs { * Flag to specify if Virtualization-based security is enabled for this virtual machine. */ vbsEnabled?: pulumi.Input; + /** + * A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + */ + vtpm?: pulumi.Input; /** * Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD * I/O Virtualization (AMD-Vi or IOMMU), is enabled. diff --git a/sdk/python/pulumi_vsphere/_inputs.py b/sdk/python/pulumi_vsphere/_inputs.py index 8b4649ef..8bfde1e8 100644 --- a/sdk/python/pulumi_vsphere/_inputs.py +++ b/sdk/python/pulumi_vsphere/_inputs.py @@ -91,12 +91,16 @@ 'VirtualMachineOvfDeployArgsDict', 'VirtualMachineVappArgs', 'VirtualMachineVappArgsDict', + 'VirtualMachineVtpmArgs', + 'VirtualMachineVtpmArgsDict', 'VmStoragePolicyTagRuleArgs', 'VmStoragePolicyTagRuleArgsDict', 'VnicIpv4Args', 'VnicIpv4ArgsDict', 'VnicIpv6Args', 'VnicIpv6ArgsDict', + 'GetNetworkFilterArgs', + 'GetNetworkFilterArgsDict', 'GetVirtualMachineVappArgs', 'GetVirtualMachineVappArgsDict', ] @@ -4286,6 +4290,38 @@ def properties(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str] pulumi.set(self, "properties", value) +if not MYPY: + class VirtualMachineVtpmArgsDict(TypedDict): + version: NotRequired[pulumi.Input[str]] + """ + The version of the TPM device. Default is 2.0. + """ +elif False: + VirtualMachineVtpmArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class VirtualMachineVtpmArgs: + def __init__(__self__, *, + version: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] version: The version of the TPM device. Default is 2.0. + """ + if version is not None: + pulumi.set(__self__, "version", version) + + @property + @pulumi.getter + def version(self) -> Optional[pulumi.Input[str]]: + """ + The version of the TPM device. Default is 2.0. + """ + return pulumi.get(self, "version") + + @version.setter + def version(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "version", value) + + if not MYPY: class VmStoragePolicyTagRuleArgsDict(TypedDict): tag_category: pulumi.Input[str] @@ -4540,6 +4576,38 @@ def gw(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "gw", value) +if not MYPY: + class GetNetworkFilterArgsDict(TypedDict): + network_type: NotRequired[str] + """ + This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + """ +elif False: + GetNetworkFilterArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class GetNetworkFilterArgs: + def __init__(__self__, *, + network_type: Optional[str] = None): + """ + :param str network_type: This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + """ + if network_type is not None: + pulumi.set(__self__, "network_type", network_type) + + @property + @pulumi.getter(name="networkType") + def network_type(self) -> Optional[str]: + """ + This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + """ + return pulumi.get(self, "network_type") + + @network_type.setter + def network_type(self, value: Optional[str]): + pulumi.set(self, "network_type", value) + + if not MYPY: class GetVirtualMachineVappArgsDict(TypedDict): properties: NotRequired[Mapping[str, str]] diff --git a/sdk/python/pulumi_vsphere/get_datacenter.py b/sdk/python/pulumi_vsphere/get_datacenter.py index 0702c65c..47905427 100644 --- a/sdk/python/pulumi_vsphere/get_datacenter.py +++ b/sdk/python/pulumi_vsphere/get_datacenter.py @@ -26,13 +26,16 @@ class GetDatacenterResult: """ A collection of values returned by getDatacenter. """ - def __init__(__self__, id=None, name=None): + def __init__(__self__, id=None, name=None, virtual_machines=None): if id and not isinstance(id, str): raise TypeError("Expected argument 'id' to be a str") pulumi.set(__self__, "id", id) if name and not isinstance(name, str): raise TypeError("Expected argument 'name' to be a str") pulumi.set(__self__, "name", name) + if virtual_machines and not isinstance(virtual_machines, list): + raise TypeError("Expected argument 'virtual_machines' to be a list") + pulumi.set(__self__, "virtual_machines", virtual_machines) @property @pulumi.getter @@ -47,6 +50,14 @@ def id(self) -> str: def name(self) -> Optional[str]: return pulumi.get(self, "name") + @property + @pulumi.getter(name="virtualMachines") + def virtual_machines(self) -> Sequence[str]: + """ + List of all virtual machines included in the vSphere datacenter object. + """ + return pulumi.get(self, "virtual_machines") + class AwaitableGetDatacenterResult(GetDatacenterResult): # pylint: disable=using-constant-test @@ -55,7 +66,8 @@ def __await__(self): yield self return GetDatacenterResult( id=self.id, - name=self.name) + name=self.name, + virtual_machines=self.virtual_machines) def get_datacenter(name: Optional[str] = None, @@ -91,7 +103,8 @@ def get_datacenter(name: Optional[str] = None, return AwaitableGetDatacenterResult( id=pulumi.get(__ret__, 'id'), - name=pulumi.get(__ret__, 'name')) + name=pulumi.get(__ret__, 'name'), + virtual_machines=pulumi.get(__ret__, 'virtual_machines')) def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatacenterResult]: """ @@ -124,4 +137,5 @@ def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None, __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatacenter:getDatacenter', __args__, opts=opts, typ=GetDatacenterResult) return __ret__.apply(lambda __response__: GetDatacenterResult( id=pulumi.get(__response__, 'id'), - name=pulumi.get(__response__, 'name'))) + name=pulumi.get(__response__, 'name'), + virtual_machines=pulumi.get(__response__, 'virtual_machines'))) diff --git a/sdk/python/pulumi_vsphere/get_datastore_cluster.py b/sdk/python/pulumi_vsphere/get_datastore_cluster.py index bb4016a4..22f35a45 100644 --- a/sdk/python/pulumi_vsphere/get_datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/get_datastore_cluster.py @@ -26,10 +26,13 @@ class GetDatastoreClusterResult: """ A collection of values returned by getDatastoreCluster. """ - def __init__(__self__, datacenter_id=None, id=None, name=None): + def __init__(__self__, datacenter_id=None, datastores=None, id=None, name=None): if datacenter_id and not isinstance(datacenter_id, str): raise TypeError("Expected argument 'datacenter_id' to be a str") pulumi.set(__self__, "datacenter_id", datacenter_id) + if datastores and not isinstance(datastores, list): + raise TypeError("Expected argument 'datastores' to be a list") + pulumi.set(__self__, "datastores", datastores) if id and not isinstance(id, str): raise TypeError("Expected argument 'id' to be a str") pulumi.set(__self__, "id", id) @@ -42,6 +45,15 @@ def __init__(__self__, datacenter_id=None, id=None, name=None): def datacenter_id(self) -> Optional[str]: return pulumi.get(self, "datacenter_id") + @property + @pulumi.getter + def datastores(self) -> Sequence[str]: + """ + (Optional) The names of the datastores included in the specific + cluster. + """ + return pulumi.get(self, "datastores") + @property @pulumi.getter def id(self) -> str: @@ -63,6 +75,7 @@ def __await__(self): yield self return GetDatastoreClusterResult( datacenter_id=self.datacenter_id, + datastores=self.datastores, id=self.id, name=self.name) @@ -103,6 +116,7 @@ def get_datastore_cluster(datacenter_id: Optional[str] = None, return AwaitableGetDatastoreClusterResult( datacenter_id=pulumi.get(__ret__, 'datacenter_id'), + datastores=pulumi.get(__ret__, 'datastores'), id=pulumi.get(__ret__, 'id'), name=pulumi.get(__ret__, 'name')) def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None, @@ -140,5 +154,6 @@ def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[s __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatastoreCluster:getDatastoreCluster', __args__, opts=opts, typ=GetDatastoreClusterResult) return __ret__.apply(lambda __response__: GetDatastoreClusterResult( datacenter_id=pulumi.get(__response__, 'datacenter_id'), + datastores=pulumi.get(__response__, 'datastores'), id=pulumi.get(__response__, 'id'), name=pulumi.get(__response__, 'name'))) diff --git a/sdk/python/pulumi_vsphere/get_network.py b/sdk/python/pulumi_vsphere/get_network.py index 78b6b14e..79d866a1 100644 --- a/sdk/python/pulumi_vsphere/get_network.py +++ b/sdk/python/pulumi_vsphere/get_network.py @@ -13,6 +13,8 @@ else: from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities +from . import outputs +from ._inputs import * __all__ = [ 'GetNetworkResult', @@ -26,13 +28,16 @@ class GetNetworkResult: """ A collection of values returned by getNetwork. """ - def __init__(__self__, datacenter_id=None, distributed_virtual_switch_uuid=None, id=None, name=None, type=None): + def __init__(__self__, datacenter_id=None, distributed_virtual_switch_uuid=None, filters=None, id=None, name=None, type=None): if datacenter_id and not isinstance(datacenter_id, str): raise TypeError("Expected argument 'datacenter_id' to be a str") pulumi.set(__self__, "datacenter_id", datacenter_id) if distributed_virtual_switch_uuid and not isinstance(distributed_virtual_switch_uuid, str): raise TypeError("Expected argument 'distributed_virtual_switch_uuid' to be a str") pulumi.set(__self__, "distributed_virtual_switch_uuid", distributed_virtual_switch_uuid) + if filters and not isinstance(filters, list): + raise TypeError("Expected argument 'filters' to be a list") + pulumi.set(__self__, "filters", filters) if id and not isinstance(id, str): raise TypeError("Expected argument 'id' to be a str") pulumi.set(__self__, "id", id) @@ -53,6 +58,11 @@ def datacenter_id(self) -> Optional[str]: def distributed_virtual_switch_uuid(self) -> Optional[str]: return pulumi.get(self, "distributed_virtual_switch_uuid") + @property + @pulumi.getter + def filters(self) -> Optional[Sequence['outputs.GetNetworkFilterResult']]: + return pulumi.get(self, "filters") + @property @pulumi.getter def id(self) -> str: @@ -86,6 +96,7 @@ def __await__(self): return GetNetworkResult( datacenter_id=self.datacenter_id, distributed_virtual_switch_uuid=self.distributed_virtual_switch_uuid, + filters=self.filters, id=self.id, name=self.name, type=self.type) @@ -93,6 +104,7 @@ def __await__(self): def get_network(datacenter_id: Optional[str] = None, distributed_virtual_switch_uuid: Optional[str] = None, + filters: Optional[Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']]] = None, name: Optional[str] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNetworkResult: """ @@ -113,6 +125,20 @@ def get_network(datacenter_id: Optional[str] = None, datacenter_id=datacenter.id) ``` + ### Additional Examples + + ```python + import pulumi + import pulumi_vsphere as vsphere + + datacenter = vsphere.get_datacenter(name="dc-01") + my_port_group = vsphere.get_network(datacenter_id=datacenter.id, + name="VM Network", + filters=[{ + "network_type": "Network", + }]) + ``` + :param str datacenter_id: The managed object reference ID of the datacenter the network is located in. This can be omitted if the @@ -122,11 +148,13 @@ def get_network(datacenter_id: Optional[str] = None, network objects, the ID of the distributed virtual switch for which the port group belongs. It is useful to differentiate port groups with same name using the distributed virtual switch ID. + :param Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']] filters: Apply a filter for the discovered network. :param str name: The name of the network. This can be a name or path. """ __args__ = dict() __args__['datacenterId'] = datacenter_id __args__['distributedVirtualSwitchUuid'] = distributed_virtual_switch_uuid + __args__['filters'] = filters __args__['name'] = name opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ = pulumi.runtime.invoke('vsphere:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult).value @@ -134,11 +162,13 @@ def get_network(datacenter_id: Optional[str] = None, return AwaitableGetNetworkResult( datacenter_id=pulumi.get(__ret__, 'datacenter_id'), distributed_virtual_switch_uuid=pulumi.get(__ret__, 'distributed_virtual_switch_uuid'), + filters=pulumi.get(__ret__, 'filters'), id=pulumi.get(__ret__, 'id'), name=pulumi.get(__ret__, 'name'), type=pulumi.get(__ret__, 'type')) def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None, distributed_virtual_switch_uuid: Optional[pulumi.Input[Optional[str]]] = None, + filters: Optional[pulumi.Input[Optional[Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']]]]] = None, name: Optional[pulumi.Input[str]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkResult]: """ @@ -159,6 +189,20 @@ def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = No datacenter_id=datacenter.id) ``` + ### Additional Examples + + ```python + import pulumi + import pulumi_vsphere as vsphere + + datacenter = vsphere.get_datacenter(name="dc-01") + my_port_group = vsphere.get_network(datacenter_id=datacenter.id, + name="VM Network", + filters=[{ + "network_type": "Network", + }]) + ``` + :param str datacenter_id: The managed object reference ID of the datacenter the network is located in. This can be omitted if the @@ -168,17 +212,20 @@ def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = No network objects, the ID of the distributed virtual switch for which the port group belongs. It is useful to differentiate port groups with same name using the distributed virtual switch ID. + :param Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']] filters: Apply a filter for the discovered network. :param str name: The name of the network. This can be a name or path. """ __args__ = dict() __args__['datacenterId'] = datacenter_id __args__['distributedVirtualSwitchUuid'] = distributed_virtual_switch_uuid + __args__['filters'] = filters __args__['name'] = name opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ = pulumi.runtime.invoke_output('vsphere:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult) return __ret__.apply(lambda __response__: GetNetworkResult( datacenter_id=pulumi.get(__response__, 'datacenter_id'), distributed_virtual_switch_uuid=pulumi.get(__response__, 'distributed_virtual_switch_uuid'), + filters=pulumi.get(__response__, 'filters'), id=pulumi.get(__response__, 'id'), name=pulumi.get(__response__, 'name'), type=pulumi.get(__response__, 'type'))) diff --git a/sdk/python/pulumi_vsphere/get_virtual_machine.py b/sdk/python/pulumi_vsphere/get_virtual_machine.py index 2a3982f5..26436ab0 100644 --- a/sdk/python/pulumi_vsphere/get_virtual_machine.py +++ b/sdk/python/pulumi_vsphere/get_virtual_machine.py @@ -28,7 +28,7 @@ class GetVirtualMachineResult: """ A collection of values returned by getVirtualMachine. """ - def __init__(__self__, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, change_version=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, datacenter_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, extra_config_reboot_required=None, firmware=None, folder=None, guest_id=None, guest_ip_addresses=None, hardware_version=None, hv_mode=None, id=None, ide_controller_scan_count=None, instance_uuid=None, latency_sensitivity=None, memory=None, memory_hot_add_enabled=None, memory_limit=None, memory_reservation=None, memory_reservation_locked_to_max=None, memory_share_count=None, memory_share_level=None, moid=None, name=None, nested_hv_enabled=None, network_interface_types=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, replace_trigger=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_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, sync_time_with_host_periodically=None, tools_upgrade_policy=None, uuid=None, vapp=None, vapp_transports=None, vbs_enabled=None, vvtd_enabled=None): + def __init__(__self__, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, change_version=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, datacenter_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, extra_config_reboot_required=None, firmware=None, folder=None, guest_id=None, guest_ip_addresses=None, hardware_version=None, hv_mode=None, id=None, ide_controller_scan_count=None, instance_uuid=None, latency_sensitivity=None, memory=None, memory_hot_add_enabled=None, memory_limit=None, memory_reservation=None, memory_reservation_locked_to_max=None, memory_share_count=None, memory_share_level=None, moid=None, name=None, nested_hv_enabled=None, network_interface_types=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, replace_trigger=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_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, sync_time_with_host_periodically=None, tools_upgrade_policy=None, uuid=None, vapp=None, vapp_transports=None, vbs_enabled=None, vtpm=None, vvtd_enabled=None): if alternate_guest_name and not isinstance(alternate_guest_name, str): raise TypeError("Expected argument 'alternate_guest_name' to be a str") pulumi.set(__self__, "alternate_guest_name", alternate_guest_name) @@ -224,6 +224,9 @@ def __init__(__self__, alternate_guest_name=None, annotation=None, boot_delay=No if vbs_enabled and not isinstance(vbs_enabled, bool): raise TypeError("Expected argument 'vbs_enabled' to be a bool") pulumi.set(__self__, "vbs_enabled", vbs_enabled) + if vtpm and not isinstance(vtpm, bool): + raise TypeError("Expected argument 'vtpm' to be a bool") + pulumi.set(__self__, "vtpm", vtpm) if vvtd_enabled and not isinstance(vvtd_enabled, bool): raise TypeError("Expected argument 'vvtd_enabled' to be a bool") pulumi.set(__self__, "vvtd_enabled", vvtd_enabled) @@ -635,6 +638,14 @@ def vapp_transports(self) -> Sequence[str]: def vbs_enabled(self) -> Optional[bool]: return pulumi.get(self, "vbs_enabled") + @property + @pulumi.getter + def vtpm(self) -> bool: + """ + Indicates whether a virtual Trusted Platform Module (TPM) device is present on the virtual machine. + """ + return pulumi.get(self, "vtpm") + @property @pulumi.getter(name="vvtdEnabled") def vvtd_enabled(self) -> Optional[bool]: @@ -712,6 +723,7 @@ def __await__(self): vapp=self.vapp, vapp_transports=self.vapp_transports, vbs_enabled=self.vbs_enabled, + vtpm=self.vtpm, vvtd_enabled=self.vvtd_enabled) @@ -965,6 +977,7 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None, vapp=pulumi.get(__ret__, 'vapp'), vapp_transports=pulumi.get(__ret__, 'vapp_transports'), vbs_enabled=pulumi.get(__ret__, 'vbs_enabled'), + vtpm=pulumi.get(__ret__, 'vtpm'), vvtd_enabled=pulumi.get(__ret__, 'vvtd_enabled')) def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optional[str]]] = None, annotation: Optional[pulumi.Input[Optional[str]]] = None, @@ -1215,4 +1228,5 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio vapp=pulumi.get(__response__, 'vapp'), vapp_transports=pulumi.get(__response__, 'vapp_transports'), vbs_enabled=pulumi.get(__response__, 'vbs_enabled'), + vtpm=pulumi.get(__response__, 'vtpm'), vvtd_enabled=pulumi.get(__response__, 'vvtd_enabled'))) diff --git a/sdk/python/pulumi_vsphere/outputs.py b/sdk/python/pulumi_vsphere/outputs.py index f1e06795..a17e43f0 100644 --- a/sdk/python/pulumi_vsphere/outputs.py +++ b/sdk/python/pulumi_vsphere/outputs.py @@ -54,6 +54,7 @@ 'VirtualMachineNetworkInterface', 'VirtualMachineOvfDeploy', 'VirtualMachineVapp', + 'VirtualMachineVtpm', 'VmStoragePolicyTagRule', 'VnicIpv4', 'VnicIpv6', @@ -62,6 +63,7 @@ 'GetGuestOsCustomizationSpecNetworkInterfaceResult', 'GetGuestOsCustomizationSpecWindowsOptionResult', 'GetHostVgpuProfileVgpuProfileResult', + 'GetNetworkFilterResult', 'GetVirtualMachineDiskResult', 'GetVirtualMachineNetworkInterfaceResult', 'GetVirtualMachineVappResult', @@ -3265,6 +3267,25 @@ def properties(self) -> Optional[Mapping[str, str]]: return pulumi.get(self, "properties") +@pulumi.output_type +class VirtualMachineVtpm(dict): + def __init__(__self__, *, + version: Optional[str] = None): + """ + :param str version: The version of the TPM device. Default is 2.0. + """ + if version is not None: + pulumi.set(__self__, "version", version) + + @property + @pulumi.getter + def version(self) -> Optional[str]: + """ + The version of the TPM device. Default is 2.0. + """ + return pulumi.get(self, "version") + + @pulumi.output_type class VmStoragePolicyTagRule(dict): @staticmethod @@ -3844,6 +3865,25 @@ def vgpu(self) -> str: return pulumi.get(self, "vgpu") +@pulumi.output_type +class GetNetworkFilterResult(dict): + def __init__(__self__, *, + network_type: Optional[str] = None): + """ + :param str network_type: This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + """ + if network_type is not None: + pulumi.set(__self__, "network_type", network_type) + + @property + @pulumi.getter(name="networkType") + def network_type(self) -> Optional[str]: + """ + This is required if you have multiple port groups with the same name. This will be one of `DistributedVirtualPortgroup` for distributed port groups, `Network` for standard (host-based) port groups, or `OpaqueNetwork` for networks managed externally, such as those managed by NSX. + """ + return pulumi.get(self, "network_type") + + @pulumi.output_type class GetVirtualMachineDiskResult(dict): def __init__(__self__, *, diff --git a/sdk/python/pulumi_vsphere/virtual_machine.py b/sdk/python/pulumi_vsphere/virtual_machine.py index fb5ea623..b370f497 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine.py +++ b/sdk/python/pulumi_vsphere/virtual_machine.py @@ -92,6 +92,7 @@ def __init__(__self__, *, tools_upgrade_policy: Optional[pulumi.Input[str]] = None, vapp: Optional[pulumi.Input['VirtualMachineVappArgs']] = None, vbs_enabled: Optional[pulumi.Input[bool]] = None, + vtpm: Optional[pulumi.Input['VirtualMachineVtpmArgs']] = None, vvtd_enabled: Optional[pulumi.Input[bool]] = None, wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, @@ -177,6 +178,7 @@ def __init__(__self__, *, :param pulumi.Input[str] tools_upgrade_policy: Set the upgrade policy for VMware Tools. Can be one of `manual` or `upgradeAtPowerCycle`. :param pulumi.Input['VirtualMachineVappArgs'] vapp: vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images. :param pulumi.Input[bool] vbs_enabled: Flag to specify if Virtualization-based security is enabled for this virtual machine. + :param pulumi.Input['VirtualMachineVtpmArgs'] vtpm: A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. :param pulumi.Input[bool] vvtd_enabled: Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled. :param pulumi.Input[int] wait_for_guest_ip_timeout: The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 @@ -327,6 +329,8 @@ def __init__(__self__, *, pulumi.set(__self__, "vapp", vapp) if vbs_enabled is not None: pulumi.set(__self__, "vbs_enabled", vbs_enabled) + if vtpm is not None: + pulumi.set(__self__, "vtpm", vtpm) if vvtd_enabled is not None: pulumi.set(__self__, "vvtd_enabled", vvtd_enabled) if wait_for_guest_ip_timeout is not None: @@ -1190,6 +1194,18 @@ def vbs_enabled(self) -> Optional[pulumi.Input[bool]]: def vbs_enabled(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "vbs_enabled", value) + @property + @pulumi.getter + def vtpm(self) -> Optional[pulumi.Input['VirtualMachineVtpmArgs']]: + """ + A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + """ + return pulumi.get(self, "vtpm") + + @vtpm.setter + def vtpm(self, value: Optional[pulumi.Input['VirtualMachineVtpmArgs']]): + pulumi.set(self, "vtpm", value) + @property @pulumi.getter(name="vvtdEnabled") def vvtd_enabled(self) -> Optional[pulumi.Input[bool]]: @@ -1328,6 +1344,7 @@ def __init__(__self__, *, vbs_enabled: Optional[pulumi.Input[bool]] = None, vmware_tools_status: Optional[pulumi.Input[str]] = None, vmx_path: Optional[pulumi.Input[str]] = None, + vtpm: Optional[pulumi.Input['VirtualMachineVtpmArgs']] = None, vvtd_enabled: Optional[pulumi.Input[bool]] = None, wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, @@ -1423,6 +1440,7 @@ def __init__(__self__, *, :param pulumi.Input[bool] vbs_enabled: Flag to specify if Virtualization-based security is enabled for this virtual machine. :param pulumi.Input[str] vmware_tools_status: The state of VMware Tools in the guest. This will determine the proper course of action for some device operations. :param pulumi.Input[str] vmx_path: The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. + :param pulumi.Input['VirtualMachineVtpmArgs'] vtpm: A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. :param pulumi.Input[bool] vvtd_enabled: Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled. :param pulumi.Input[int] wait_for_guest_ip_timeout: The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 @@ -1596,6 +1614,8 @@ def __init__(__self__, *, pulumi.set(__self__, "vmware_tools_status", vmware_tools_status) if vmx_path is not None: pulumi.set(__self__, "vmx_path", vmx_path) + if vtpm is not None: + pulumi.set(__self__, "vtpm", vtpm) if vvtd_enabled is not None: pulumi.set(__self__, "vvtd_enabled", vvtd_enabled) if wait_for_guest_ip_timeout is not None: @@ -2588,6 +2608,18 @@ def vmx_path(self) -> Optional[pulumi.Input[str]]: def vmx_path(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "vmx_path", value) + @property + @pulumi.getter + def vtpm(self) -> Optional[pulumi.Input['VirtualMachineVtpmArgs']]: + """ + A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + """ + return pulumi.get(self, "vtpm") + + @vtpm.setter + def vtpm(self, value: Optional[pulumi.Input['VirtualMachineVtpmArgs']]): + pulumi.set(self, "vtpm", value) + @property @pulumi.getter(name="vvtdEnabled") def vvtd_enabled(self) -> Optional[pulumi.Input[bool]]: @@ -2717,6 +2749,7 @@ def __init__(__self__, tools_upgrade_policy: Optional[pulumi.Input[str]] = None, vapp: Optional[pulumi.Input[Union['VirtualMachineVappArgs', 'VirtualMachineVappArgsDict']]] = None, vbs_enabled: Optional[pulumi.Input[bool]] = None, + vtpm: Optional[pulumi.Input[Union['VirtualMachineVtpmArgs', 'VirtualMachineVtpmArgsDict']]] = None, vvtd_enabled: Optional[pulumi.Input[bool]] = None, wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, @@ -2828,6 +2861,7 @@ def __init__(__self__, :param pulumi.Input[str] tools_upgrade_policy: Set the upgrade policy for VMware Tools. Can be one of `manual` or `upgradeAtPowerCycle`. :param pulumi.Input[Union['VirtualMachineVappArgs', 'VirtualMachineVappArgsDict']] vapp: vApp configuration data for this virtual machine. Can be used to provide configuration data for OVF images. :param pulumi.Input[bool] vbs_enabled: Flag to specify if Virtualization-based security is enabled for this virtual machine. + :param pulumi.Input[Union['VirtualMachineVtpmArgs', 'VirtualMachineVtpmArgsDict']] vtpm: A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. :param pulumi.Input[bool] vvtd_enabled: Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled. :param pulumi.Input[int] wait_for_guest_ip_timeout: The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 @@ -2954,6 +2988,7 @@ def _internal_init(__self__, tools_upgrade_policy: Optional[pulumi.Input[str]] = None, vapp: Optional[pulumi.Input[Union['VirtualMachineVappArgs', 'VirtualMachineVappArgsDict']]] = None, vbs_enabled: Optional[pulumi.Input[bool]] = None, + vtpm: Optional[pulumi.Input[Union['VirtualMachineVtpmArgs', 'VirtualMachineVtpmArgsDict']]] = None, vvtd_enabled: Optional[pulumi.Input[bool]] = None, wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, @@ -3040,6 +3075,7 @@ def _internal_init(__self__, __props__.__dict__["tools_upgrade_policy"] = tools_upgrade_policy __props__.__dict__["vapp"] = vapp __props__.__dict__["vbs_enabled"] = vbs_enabled + __props__.__dict__["vtpm"] = vtpm __props__.__dict__["vvtd_enabled"] = vvtd_enabled __props__.__dict__["wait_for_guest_ip_timeout"] = wait_for_guest_ip_timeout __props__.__dict__["wait_for_guest_net_routable"] = wait_for_guest_net_routable @@ -3147,6 +3183,7 @@ def get(resource_name: str, vbs_enabled: Optional[pulumi.Input[bool]] = None, vmware_tools_status: Optional[pulumi.Input[str]] = None, vmx_path: Optional[pulumi.Input[str]] = None, + vtpm: Optional[pulumi.Input[Union['VirtualMachineVtpmArgs', 'VirtualMachineVtpmArgsDict']]] = None, vvtd_enabled: Optional[pulumi.Input[bool]] = None, wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, @@ -3247,6 +3284,7 @@ def get(resource_name: str, :param pulumi.Input[bool] vbs_enabled: Flag to specify if Virtualization-based security is enabled for this virtual machine. :param pulumi.Input[str] vmware_tools_status: The state of VMware Tools in the guest. This will determine the proper course of action for some device operations. :param pulumi.Input[str] vmx_path: The path of the virtual machine configuration file on the datastore in which the virtual machine is placed. + :param pulumi.Input[Union['VirtualMachineVtpmArgs', 'VirtualMachineVtpmArgsDict']] vtpm: A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. :param pulumi.Input[bool] vvtd_enabled: Flag to specify if I/O MMU virtualization, also called Intel Virtualization Technology for Directed I/O (VT-d) and AMD I/O Virtualization (AMD-Vi or IOMMU), is enabled. :param pulumi.Input[int] wait_for_guest_ip_timeout: The amount of time, in minutes, to wait for an available IP address on this virtual machine. A value less than 1 @@ -3342,6 +3380,7 @@ def get(resource_name: str, __props__.__dict__["vbs_enabled"] = vbs_enabled __props__.__dict__["vmware_tools_status"] = vmware_tools_status __props__.__dict__["vmx_path"] = vmx_path + __props__.__dict__["vtpm"] = vtpm __props__.__dict__["vvtd_enabled"] = vvtd_enabled __props__.__dict__["wait_for_guest_ip_timeout"] = wait_for_guest_ip_timeout __props__.__dict__["wait_for_guest_net_routable"] = wait_for_guest_net_routable @@ -4003,6 +4042,14 @@ def vmx_path(self) -> pulumi.Output[str]: """ return pulumi.get(self, "vmx_path") + @property + @pulumi.getter + def vtpm(self) -> pulumi.Output[Optional['outputs.VirtualMachineVtpm']]: + """ + A specification for a virtual Trusted Platform Module (TPM) device on the virtual machine. + """ + return pulumi.get(self, "vtpm") + @property @pulumi.getter(name="vvtdEnabled") def vvtd_enabled(self) -> pulumi.Output[Optional[bool]]: