From 3448d813f6e7608814c276f3d40bd5eebc7ca98e Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Sat, 6 Apr 2024 04:33:12 -0700 Subject: [PATCH] Upgrade pulumi-terraform-bridge to v3.80.0 (#469) This PR was generated via `$ upgrade-provider pulumi/pulumi-vsphere --kind=bridge --pr-reviewers=iwahbe`. --- - Upgrading pulumi-terraform-bridge from v3.79.0 to v3.80.0. --- .../cmd/pulumi-resource-vsphere/schema.json | 30 +++++++++---------- provider/go.mod | 4 +-- provider/go.sum | 7 +++-- sdk/dotnet/ComputeClusterVmAffinityRule.cs | 7 +++++ sdk/dotnet/Datacenter.cs | 9 ++++++ sdk/dotnet/DatastoreCluster.cs | 6 ++-- sdk/dotnet/DistributedVirtualSwitch.cs | 9 ++---- sdk/dotnet/Host.cs | 12 -------- sdk/dotnet/HostPortGroup.cs | 12 -------- sdk/dotnet/ResourcePool.cs | 14 +++++++++ sdk/dotnet/VirtualMachine.cs | 6 ++-- sdk/dotnet/Vnic.cs | 12 -------- .../vsphere/computeClusterVmAffinityRule.go | 7 +++++ sdk/go/vsphere/datacenter.go | 9 ++++++ sdk/go/vsphere/datastoreCluster.go | 12 ++++---- sdk/go/vsphere/distributedVirtualSwitch.go | 18 ++++------- sdk/go/vsphere/host.go | 19 ------------ sdk/go/vsphere/hostPortGroup.go | 19 ------------ sdk/go/vsphere/resourcePool.go | 14 +++++++++ sdk/go/vsphere/virtualMachine.go | 12 ++++---- sdk/go/vsphere/vnic.go | 19 ------------ .../vsphere/ComputeClusterVmAffinityRule.java | 7 +++++ .../java/com/pulumi/vsphere/Datacenter.java | 9 ++++++ .../com/pulumi/vsphere/DatastoreCluster.java | 4 +-- .../pulumi/vsphere/DatastoreClusterArgs.java | 8 ++--- .../vsphere/DistributedVirtualSwitch.java | 6 ++-- .../vsphere/DistributedVirtualSwitchArgs.java | 12 +++----- .../main/java/com/pulumi/vsphere/Host.java | 25 ---------------- .../com/pulumi/vsphere/HostPortGroup.java | 25 ---------------- .../java/com/pulumi/vsphere/ResourcePool.java | 14 +++++++++ .../com/pulumi/vsphere/VirtualMachine.java | 4 +-- .../pulumi/vsphere/VirtualMachineArgs.java | 8 ++--- .../main/java/com/pulumi/vsphere/Vnic.java | 25 ---------------- .../vsphere/inputs/DatastoreClusterState.java | 8 ++--- .../inputs/DistributedVirtualSwitchState.java | 12 +++----- .../vsphere/inputs/VirtualMachineState.java | 8 ++--- sdk/nodejs/computeClusterVmAffinityRule.ts | 7 +++++ sdk/nodejs/datacenter.ts | 9 ++++++ sdk/nodejs/datastoreCluster.ts | 6 ++-- sdk/nodejs/distributedVirtualSwitch.ts | 9 ++---- sdk/nodejs/host.ts | 6 ---- sdk/nodejs/hostPortGroup.ts | 6 ---- sdk/nodejs/resourcePool.ts | 14 +++++++++ sdk/nodejs/virtualMachine.ts | 6 ++-- sdk/nodejs/vnic.ts | 6 ---- .../compute_cluster_vm_affinity_rule.py | 14 +++++++++ sdk/python/pulumi_vsphere/datacenter.py | 18 +++++++++++ .../pulumi_vsphere/datastore_cluster.py | 14 ++++----- .../distributed_virtual_switch.py | 21 +++++-------- sdk/python/pulumi_vsphere/host.py | 12 -------- sdk/python/pulumi_vsphere/host_port_group.py | 12 -------- sdk/python/pulumi_vsphere/resource_pool.py | 28 +++++++++++++++++ sdk/python/pulumi_vsphere/virtual_machine.py | 14 ++++----- sdk/python/pulumi_vsphere/vnic.py | 12 -------- 54 files changed, 288 insertions(+), 358 deletions(-) diff --git a/provider/cmd/pulumi-resource-vsphere/schema.json b/provider/cmd/pulumi-resource-vsphere/schema.json index 5dadefee..229ced31 100644 --- a/provider/cmd/pulumi-resource-vsphere/schema.json +++ b/provider/cmd/pulumi-resource-vsphere/schema.json @@ -2721,7 +2721,7 @@ } }, "vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule": { - "description": "The `vsphere.ComputeClusterVmAffinityRule` resource can be used to\nmanage virtual machine affinity rules in a cluster, either created by the\n`vsphere.ComputeCluster` resource or looked up\nby the `vsphere.ComputeCluster` data source.\n\nThis rule can be used to tell a set of virtual machines to run together on the\nsame host within a cluster. When configured, DRS will make a best effort to\nensure that the virtual machines run on the same host, or prevent any operation\nthat would keep that from happening, depending on the value of the\n`mandatory` flag.\n\n\u003e An affinity rule can only be used to place virtual machines on the same\n_non-specific_ hosts. It cannot be used to pin virtual machines to a host. \nTo enable this capability, use the\n`vsphere.ComputeClusterVmHostRule`\nresource.\n\n\u003e **NOTE:** This resource requires vCenter Server and is not available on\ndirect ESXi host connections.\n\n\u003e **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license.\n\n## Example Usage\n\nThe following example creates two virtual machines in a cluster using the\n`vsphere.VirtualMachine` resource, creating the\nvirtual machines in the cluster looked up by the\n`vsphere.ComputeCluster` data source. It\nthen creates an affinity rule for these two virtual machines, ensuring they\nwill run on the same host whenever possible.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst datastore = datacenter.then(datacenter =\u003e vsphere.getDatastore({\n name: \"datastore-01\",\n datacenterId: datacenter.id,\n}));\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst network = datacenter.then(datacenter =\u003e vsphere.getNetwork({\n name: \"VM Network\",\n datacenterId: datacenter.id,\n}));\nconst vm: vsphere.VirtualMachine[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n vm.push(new vsphere.VirtualMachine(`vm-${range.value}`, {\n resourcePoolId: cluster.then(cluster =\u003e cluster.resourcePoolId),\n datastoreId: datastore.then(datastore =\u003e datastore.id),\n numCpus: 1,\n memory: 1024,\n guestId: \"otherLinux64Guest\",\n networkInterfaces: [{\n networkId: network.then(network =\u003e network.id),\n }],\n disks: [{\n label: \"disk0\",\n size: 20,\n }],\n }));\n}\nconst vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", {\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n virtualMachineIds: vm.map((v, k) =\u003e [k, v]).map(([, ]) =\u003e (v.id)),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ndatastore = vsphere.get_datastore(name=\"datastore-01\",\n datacenter_id=datacenter.id)\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nnetwork = vsphere.get_network(name=\"VM Network\",\n datacenter_id=datacenter.id)\nvm = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n vm.append(vsphere.VirtualMachine(f\"vm-{range['value']}\",\n resource_pool_id=cluster.resource_pool_id,\n datastore_id=datastore.id,\n num_cpus=1,\n memory=1024,\n guest_id=\"otherLinux64Guest\",\n network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs(\n network_id=network.id,\n )],\n disks=[vsphere.VirtualMachineDiskArgs(\n label=\"disk0\",\n size=20,\n )]))\nvm_affinity_rule = vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\",\n compute_cluster_id=cluster.id,\n virtual_machine_ids=[v.id for k, v in vm])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var datastore = VSphere.GetDatastore.Invoke(new()\n {\n Name = \"datastore-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var network = VSphere.GetNetwork.Invoke(new()\n {\n Name = \"VM Network\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var vm = new List\u003cVSphere.VirtualMachine\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n vm.Add(new VSphere.VirtualMachine($\"vm-{range.Value}\", new()\n {\n ResourcePoolId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n DatastoreId = datastore.Apply(getDatastoreResult =\u003e getDatastoreResult.Id),\n NumCpus = 1,\n Memory = 1024,\n GuestId = \"otherLinux64Guest\",\n NetworkInterfaces = new[]\n {\n new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs\n {\n NetworkId = network.Apply(getNetworkResult =\u003e getNetworkResult.Id),\n },\n },\n Disks = new[]\n {\n new VSphere.Inputs.VirtualMachineDiskArgs\n {\n Label = \"disk0\",\n Size = 20,\n },\n },\n }));\n }\n var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", new()\n {\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VirtualMachineIds = vm.Select((value, i) =\u003e new { Key = i.ToString(), Value = pair.Value }).Select(v =\u003e \n {\n return v.Id;\n }).ToList(),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdatastore, err := vsphere.GetDatastore(ctx, \u0026vsphere.GetDatastoreArgs{\n\t\t\tName: \"datastore-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tnetwork, err := vsphere.GetNetwork(ctx, \u0026vsphere.GetNetworkArgs{\n\t\t\tName: \"VM Network\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvar vm []*vsphere.VirtualMachine\n\t\tfor index := 0; index \u003c 2; index++ {\n\t\t\tkey0 := index\n\t\t\t_ := index\n\t\t\t__res, err := vsphere.NewVirtualMachine(ctx, fmt.Sprintf(\"vm-%v\", key0), \u0026vsphere.VirtualMachineArgs{\n\t\t\t\tResourcePoolId: pulumi.String(cluster.ResourcePoolId),\n\t\t\t\tDatastoreId: pulumi.String(datastore.Id),\n\t\t\t\tNumCpus: pulumi.Int(1),\n\t\t\t\tMemory: pulumi.Int(1024),\n\t\t\t\tGuestId: pulumi.String(\"otherLinux64Guest\"),\n\t\t\t\tNetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{\n\t\t\t\t\t\u0026vsphere.VirtualMachineNetworkInterfaceArgs{\n\t\t\t\t\t\tNetworkId: pulumi.String(network.Id),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDisks: vsphere.VirtualMachineDiskArray{\n\t\t\t\t\t\u0026vsphere.VirtualMachineDiskArgs{\n\t\t\t\t\t\tLabel: pulumi.String(\"disk0\"),\n\t\t\t\t\t\tSize: pulumi.Int(20),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvm = append(vm, __res)\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmAffinityRule(ctx, \"vmAffinityRule\", \u0026vsphere.ComputeClusterVmAffinityRuleArgs{\n\t\t\tComputeClusterId: pulumi.String(cluster.Id),\n\t\t\tVirtualMachineIds: \"TODO: For expression\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetDatastoreArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetNetworkArgs;\nimport com.pulumi.vsphere.VirtualMachine;\nimport com.pulumi.vsphere.VirtualMachineArgs;\nimport com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;\nimport com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRule;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRuleArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()\n .name(\"datastore-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()\n .name(\"VM Network\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new VirtualMachine(\"vm-\" + i, VirtualMachineArgs.builder() \n .resourcePoolId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .datastoreId(datastore.applyValue(getDatastoreResult -\u003e getDatastoreResult.id()))\n .numCpus(1)\n .memory(1024)\n .guestId(\"otherLinux64Guest\")\n .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()\n .networkId(network.applyValue(getNetworkResult -\u003e getNetworkResult.id()))\n .build())\n .disks(VirtualMachineDiskArgs.builder()\n .label(\"disk0\")\n .size(20)\n .build())\n .build());\n\n \n}\n var vmAffinityRule = new ComputeClusterVmAffinityRule(\"vmAffinityRule\", ComputeClusterVmAffinityRuleArgs.builder() \n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .virtualMachineIds(\"TODO: ForExpression\")\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example creates an affinity rule for a set of virtual machines\nin the cluster by looking up the virtual machine UUIDs from the\n`vsphere.VirtualMachine` data source.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst vms = [\n \"foo-0\",\n \"foo-1\",\n];\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst vmsVirtualMachine = (new Array(vms.length)).map((_, i) =\u003e i).map(__index =\u003e (vsphere.getVirtualMachine({\n name: vms[__index],\n datacenterId: _arg0_.id,\n})));\nconst vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", {\n enabled: true,\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n virtualMachineIds: vmsVirtualMachine.map(__item =\u003e __item.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nvms = [\n \"foo-0\",\n \"foo-1\",\n]\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nvms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],\n datacenter_id=datacenter.id) for __index in range(len(vms))]\nvm_affinity_rule = vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\",\n enabled=True,\n compute_cluster_id=cluster.id,\n virtual_machine_ids=[__item.id for __item in vms_virtual_machine])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vms = new[]\n {\n \"foo-0\",\n \"foo-1\",\n };\n\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var vmsVirtualMachine = \"TODO: Range range( length(vms)\n) false\".Select(__index =\u003e \n {\n return VSphere.GetVirtualMachine.Invoke(new()\n {\n Name = vms[__index],\n DatacenterId = _arg0_.Id,\n });\n }).ToList();\n\n var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", new()\n {\n Enabled = true,\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VirtualMachineIds = vmsVirtualMachine.Select(__item =\u003e __item.Id).ToList(),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tvms := []string{\n\t\t\t\"foo-0\",\n\t\t\t\"foo-1\",\n\t\t}\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvmsVirtualMachine := \"TODO: For expression\"\n\t\tvar splat0 []*string\n\t\tfor _, val0 := range vmsVirtualMachine {\n\t\t\tsplat0 = append(splat0, val0.Id)\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmAffinityRule(ctx, \"vmAffinityRule\", \u0026vsphere.ComputeClusterVmAffinityRuleArgs{\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tComputeClusterId: pulumi.String(cluster.Id),\n\t\t\tVirtualMachineIds: splat0,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRule;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var vms = \n \"foo-0\",\n \"foo-1\";\n\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var vmsVirtualMachine = \"TODO: ForExpression\";\n\n var vmAffinityRule = new ComputeClusterVmAffinityRule(\"vmAffinityRule\", ComputeClusterVmAffinityRuleArgs.builder() \n .enabled(true)\n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .virtualMachineIds(vmsVirtualMachine.stream().map(element -\u003e element.id()).collect(toList()))\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n", + "description": "The `vsphere.ComputeClusterVmAffinityRule` resource can be used to\nmanage virtual machine affinity rules in a cluster, either created by the\n`vsphere.ComputeCluster` resource or looked up\nby the `vsphere.ComputeCluster` data source.\n\nThis rule can be used to tell a set of virtual machines to run together on the\nsame host within a cluster. When configured, DRS will make a best effort to\nensure that the virtual machines run on the same host, or prevent any operation\nthat would keep that from happening, depending on the value of the\n`mandatory` flag.\n\n\u003e An affinity rule can only be used to place virtual machines on the same\n_non-specific_ hosts. It cannot be used to pin virtual machines to a host. \nTo enable this capability, use the\n`vsphere.ComputeClusterVmHostRule`\nresource.\n\n\u003e **NOTE:** This resource requires vCenter Server and is not available on\ndirect ESXi host connections.\n\n\u003e **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license.\n\n## Example Usage\n\nThe following example creates two virtual machines in a cluster using the\n`vsphere.VirtualMachine` resource, creating the\nvirtual machines in the cluster looked up by the\n`vsphere.ComputeCluster` data source. It\nthen creates an affinity rule for these two virtual machines, ensuring they\nwill run on the same host whenever possible.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst datastore = datacenter.then(datacenter =\u003e vsphere.getDatastore({\n name: \"datastore-01\",\n datacenterId: datacenter.id,\n}));\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst network = datacenter.then(datacenter =\u003e vsphere.getNetwork({\n name: \"VM Network\",\n datacenterId: datacenter.id,\n}));\nconst vm: vsphere.VirtualMachine[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n vm.push(new vsphere.VirtualMachine(`vm-${range.value}`, {\n resourcePoolId: cluster.then(cluster =\u003e cluster.resourcePoolId),\n datastoreId: datastore.then(datastore =\u003e datastore.id),\n numCpus: 1,\n memory: 1024,\n guestId: \"otherLinux64Guest\",\n networkInterfaces: [{\n networkId: network.then(network =\u003e network.id),\n }],\n disks: [{\n label: \"disk0\",\n size: 20,\n }],\n }));\n}\nconst vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", {\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n virtualMachineIds: vm.map((v, k) =\u003e [k, v]).map(([, ]) =\u003e (v.id)),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ndatastore = vsphere.get_datastore(name=\"datastore-01\",\n datacenter_id=datacenter.id)\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nnetwork = vsphere.get_network(name=\"VM Network\",\n datacenter_id=datacenter.id)\nvm = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n vm.append(vsphere.VirtualMachine(f\"vm-{range['value']}\",\n resource_pool_id=cluster.resource_pool_id,\n datastore_id=datastore.id,\n num_cpus=1,\n memory=1024,\n guest_id=\"otherLinux64Guest\",\n network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs(\n network_id=network.id,\n )],\n disks=[vsphere.VirtualMachineDiskArgs(\n label=\"disk0\",\n size=20,\n )]))\nvm_affinity_rule = vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\",\n compute_cluster_id=cluster.id,\n virtual_machine_ids=[v.id for k, v in vm])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var datastore = VSphere.GetDatastore.Invoke(new()\n {\n Name = \"datastore-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var network = VSphere.GetNetwork.Invoke(new()\n {\n Name = \"VM Network\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var vm = new List\u003cVSphere.VirtualMachine\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n vm.Add(new VSphere.VirtualMachine($\"vm-{range.Value}\", new()\n {\n ResourcePoolId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n DatastoreId = datastore.Apply(getDatastoreResult =\u003e getDatastoreResult.Id),\n NumCpus = 1,\n Memory = 1024,\n GuestId = \"otherLinux64Guest\",\n NetworkInterfaces = new[]\n {\n new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs\n {\n NetworkId = network.Apply(getNetworkResult =\u003e getNetworkResult.Id),\n },\n },\n Disks = new[]\n {\n new VSphere.Inputs.VirtualMachineDiskArgs\n {\n Label = \"disk0\",\n Size = 20,\n },\n },\n }));\n }\n var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", new()\n {\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VirtualMachineIds = vm.Select((value, i) =\u003e new { Key = i.ToString(), Value = pair.Value }).Select(v =\u003e \n {\n return v.Id;\n }).ToList(),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdatastore, err := vsphere.GetDatastore(ctx, \u0026vsphere.GetDatastoreArgs{\n\t\t\tName: \"datastore-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tnetwork, err := vsphere.GetNetwork(ctx, \u0026vsphere.GetNetworkArgs{\n\t\t\tName: \"VM Network\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvar vm []*vsphere.VirtualMachine\n\t\tfor index := 0; index \u003c 2; index++ {\n\t\t\tkey0 := index\n\t\t\t_ := index\n\t\t\t__res, err := vsphere.NewVirtualMachine(ctx, fmt.Sprintf(\"vm-%v\", key0), \u0026vsphere.VirtualMachineArgs{\n\t\t\t\tResourcePoolId: pulumi.String(cluster.ResourcePoolId),\n\t\t\t\tDatastoreId: pulumi.String(datastore.Id),\n\t\t\t\tNumCpus: pulumi.Int(1),\n\t\t\t\tMemory: pulumi.Int(1024),\n\t\t\t\tGuestId: pulumi.String(\"otherLinux64Guest\"),\n\t\t\t\tNetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{\n\t\t\t\t\t\u0026vsphere.VirtualMachineNetworkInterfaceArgs{\n\t\t\t\t\t\tNetworkId: pulumi.String(network.Id),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDisks: vsphere.VirtualMachineDiskArray{\n\t\t\t\t\t\u0026vsphere.VirtualMachineDiskArgs{\n\t\t\t\t\t\tLabel: pulumi.String(\"disk0\"),\n\t\t\t\t\t\tSize: pulumi.Int(20),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tvm = append(vm, __res)\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmAffinityRule(ctx, \"vmAffinityRule\", \u0026vsphere.ComputeClusterVmAffinityRuleArgs{\n\t\t\tComputeClusterId: pulumi.String(cluster.Id),\n\t\t\tVirtualMachineIds: \"TODO: For expression\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetDatastoreArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetNetworkArgs;\nimport com.pulumi.vsphere.VirtualMachine;\nimport com.pulumi.vsphere.VirtualMachineArgs;\nimport com.pulumi.vsphere.inputs.VirtualMachineNetworkInterfaceArgs;\nimport com.pulumi.vsphere.inputs.VirtualMachineDiskArgs;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRule;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRuleArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()\n .name(\"datastore-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()\n .name(\"VM Network\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new VirtualMachine(\"vm-\" + i, VirtualMachineArgs.builder() \n .resourcePoolId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .datastoreId(datastore.applyValue(getDatastoreResult -\u003e getDatastoreResult.id()))\n .numCpus(1)\n .memory(1024)\n .guestId(\"otherLinux64Guest\")\n .networkInterfaces(VirtualMachineNetworkInterfaceArgs.builder()\n .networkId(network.applyValue(getNetworkResult -\u003e getNetworkResult.id()))\n .build())\n .disks(VirtualMachineDiskArgs.builder()\n .label(\"disk0\")\n .size(20)\n .build())\n .build());\n\n \n}\n var vmAffinityRule = new ComputeClusterVmAffinityRule(\"vmAffinityRule\", ComputeClusterVmAffinityRuleArgs.builder() \n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .virtualMachineIds(\"TODO: ForExpression\")\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example creates an affinity rule for a set of virtual machines\nin the cluster by looking up the virtual machine UUIDs from the\n`vsphere.VirtualMachine` data source.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst vms = [\n \"foo-0\",\n \"foo-1\",\n];\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst vmsVirtualMachine = (new Array(vms.length)).map((_, i) =\u003e i).map(__index =\u003e (vsphere.getVirtualMachine({\n name: vms[__index],\n datacenterId: _arg0_.id,\n})));\nconst vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", {\n enabled: true,\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n virtualMachineIds: vmsVirtualMachine.map(__item =\u003e __item.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nvms = [\n \"foo-0\",\n \"foo-1\",\n]\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nvms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],\n datacenter_id=datacenter.id) for __index in range(len(vms))]\nvm_affinity_rule = vsphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\",\n enabled=True,\n compute_cluster_id=cluster.id,\n virtual_machine_ids=[__item.id for __item in vms_virtual_machine])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vms = new[]\n {\n \"foo-0\",\n \"foo-1\",\n };\n\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var vmsVirtualMachine = \"TODO: Range range( length(vms)\n) false\".Select(__index =\u003e \n {\n return VSphere.GetVirtualMachine.Invoke(new()\n {\n Name = vms[__index],\n DatacenterId = _arg0_.Id,\n });\n }).ToList();\n\n var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule(\"vmAffinityRule\", new()\n {\n Enabled = true,\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VirtualMachineIds = vmsVirtualMachine.Select(__item =\u003e __item.Id).ToList(),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tvms := []string{\n\t\t\t\"foo-0\",\n\t\t\t\"foo-1\",\n\t\t}\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tvmsVirtualMachine := \"TODO: For expression\"\n\t\tvar splat0 []*string\n\t\tfor _, val0 := range vmsVirtualMachine {\n\t\t\tsplat0 = append(splat0, val0.Id)\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmAffinityRule(ctx, \"vmAffinityRule\", \u0026vsphere.ComputeClusterVmAffinityRuleArgs{\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tComputeClusterId: pulumi.String(cluster.Id),\n\t\t\tVirtualMachineIds: splat0,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRule;\nimport com.pulumi.vsphere.ComputeClusterVmAffinityRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var vms = \n \"foo-0\",\n \"foo-1\";\n\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var vmsVirtualMachine = \"TODO: ForExpression\";\n\n var vmAffinityRule = new ComputeClusterVmAffinityRule(\"vmAffinityRule\", ComputeClusterVmAffinityRuleArgs.builder() \n .enabled(true)\n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .virtualMachineIds(vmsVirtualMachine.stream().map(element -\u003e element.id()).collect(toList()))\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing rule can be imported into this resource by supplying\nboth the path to the cluster, and the name the rule. If the name or cluster is\nnot found, or if the rule is of a different type, an error will be returned. An\nexample is below:\n\n```\nterraform import vsphere_compute_cluster_vm_affinity_rule.vm_affinity_rule \\\n '{\"compute_cluster_path\": \"/dc-01/host/cluster-01\", \\\n \"name\": \"vm-affinity-rule\"}'\n```\n", "properties": { "computeClusterId": { "type": "string", @@ -3421,7 +3421,7 @@ } }, "vsphere:index/datacenter:Datacenter": { - "description": "Provides a VMware vSphere datacenter resource. This can be used as the primary\ncontainer of inventory objects such as hosts and virtual machines.\n\n## Example Usage\n\n### Create datacenter on the root folder\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst prodDatacenter = new vsphere.Datacenter(\"prodDatacenter\", {});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nprod_datacenter = vsphere.Datacenter(\"prodDatacenter\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var prodDatacenter = new VSphere.Datacenter(\"prodDatacenter\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewDatacenter(ctx, \"prodDatacenter\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.Datacenter;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var prodDatacenter = new Datacenter(\"prodDatacenter\");\n\n }\n}\n```\n```yaml\nresources:\n prodDatacenter:\n type: vsphere:Datacenter\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create datacenter on a subfolder\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst researchDatacenter = new vsphere.Datacenter(\"researchDatacenter\", {folder: \"/research/\"});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nresearch_datacenter = vsphere.Datacenter(\"researchDatacenter\", folder=\"/research/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var researchDatacenter = new VSphere.Datacenter(\"researchDatacenter\", new()\n {\n Folder = \"/research/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewDatacenter(ctx, \"researchDatacenter\", \u0026vsphere.DatacenterArgs{\n\t\t\tFolder: pulumi.String(\"/research/\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.Datacenter;\nimport com.pulumi.vsphere.DatacenterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var researchDatacenter = new Datacenter(\"researchDatacenter\", DatacenterArgs.builder() \n .folder(\"/research/\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n researchDatacenter:\n type: vsphere:Datacenter\n properties:\n folder: /research/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n", + "description": "Provides a VMware vSphere datacenter resource. This can be used as the primary\ncontainer of inventory objects such as hosts and virtual machines.\n\n## Example Usage\n\n### Create datacenter on the root folder\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst prodDatacenter = new vsphere.Datacenter(\"prodDatacenter\", {});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nprod_datacenter = vsphere.Datacenter(\"prodDatacenter\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var prodDatacenter = new VSphere.Datacenter(\"prodDatacenter\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewDatacenter(ctx, \"prodDatacenter\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.Datacenter;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var prodDatacenter = new Datacenter(\"prodDatacenter\");\n\n }\n}\n```\n```yaml\nresources:\n prodDatacenter:\n type: vsphere:Datacenter\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create datacenter on a subfolder\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst researchDatacenter = new vsphere.Datacenter(\"researchDatacenter\", {folder: \"/research/\"});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nresearch_datacenter = vsphere.Datacenter(\"researchDatacenter\", folder=\"/research/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var researchDatacenter = new VSphere.Datacenter(\"researchDatacenter\", new()\n {\n Folder = \"/research/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewDatacenter(ctx, \"researchDatacenter\", \u0026vsphere.DatacenterArgs{\n\t\t\tFolder: pulumi.String(\"/research/\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.Datacenter;\nimport com.pulumi.vsphere.DatacenterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var researchDatacenter = new Datacenter(\"researchDatacenter\", DatacenterArgs.builder() \n .folder(\"/research/\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n researchDatacenter:\n type: vsphere:Datacenter\n properties:\n folder: /research/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing \n\nAn existing datacenter can be [imported][docs-import] into this resource\nvia supplying the full path to the datacenter. An example is below:\n\n[docs-import]: /docs/import/index.html\n\n```\nterraform import vsphere_datacenter.dc /dc1\n```\n\nThe above would import the datacenter named `dc1`.\n", "properties": { "customAttributes": { "type": "object", @@ -3586,7 +3586,7 @@ }, "sdrsIoReservableIopsThreshold": { "type": "integer", - "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs.\n" + "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60% of the worst case peak performance of the backing LUNs.\n" }, "sdrsIoReservablePercentThreshold": { "type": "integer", @@ -3702,7 +3702,7 @@ }, "sdrsIoReservableIopsThreshold": { "type": "integer", - "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs.\n" + "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60% of the worst case peak performance of the backing LUNs.\n" }, "sdrsIoReservablePercentThreshold": { "type": "integer", @@ -3819,7 +3819,7 @@ }, "sdrsIoReservableIopsThreshold": { "type": "integer", - "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs.\n" + "description": "The threshold of reservable\nIOPS of all virtual machines on the datastore before storage DRS makes\nrecommendations to move VMs off of a datastore. Note that this setting should\nonly be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate\nestimate of the capacity of the datastores in your cluster, and should be set\nto roughly 50-60% of the worst case peak performance of the backing LUNs.\n" }, "sdrsIoReservablePercentThreshold": { "type": "integer", @@ -4876,7 +4876,7 @@ }, "netflowSamplingRate": { "type": "integer", - "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%!\n(MISSING)" + "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%.\n" }, "networkResourceControlEnabled": { "type": "boolean", @@ -5357,7 +5357,7 @@ }, "netflowSamplingRate": { "type": "integer", - "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%!\n(MISSING)" + "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%.\n" }, "networkResourceControlEnabled": { "type": "boolean", @@ -5770,7 +5770,7 @@ }, "netflowSamplingRate": { "type": "integer", - "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%!\n(MISSING)" + "description": "The ratio of total number of packets to\nthe number of packets analyzed. The default is `0`, which indicates that the\nVDS should analyze all packets. The maximum value is `1000`, which\nindicates an analysis rate of 0.001%.\n" }, "networkResourceControlEnabled": { "type": "boolean", @@ -6639,7 +6639,7 @@ } }, "vsphere:index/host:Host": { - "description": "Provides a VMware vSphere host resource. This represents an ESXi host that\ncan be used either as a member of a cluster or as a standalone host.\n\n## Example Usage\n\n### Create a standalone host\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst thumbprint = vsphere.getHostThumbprint({\n address: \"esx-01.example.com\",\n insecure: true,\n});\nconst esx_01 = new vsphere.Host(\"esx-01\", {\n hostname: \"esx-01.example.com\",\n username: \"root\",\n password: \"password\",\n license: \"00000-00000-00000-00000-00000\",\n thumbprint: thumbprint.then(thumbprint =\u003e thumbprint.id),\n datacenter: datacenter.then(datacenter =\u003e datacenter.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nthumbprint = vsphere.get_host_thumbprint(address=\"esx-01.example.com\",\n insecure=True)\nesx_01 = vsphere.Host(\"esx-01\",\n hostname=\"esx-01.example.com\",\n username=\"root\",\n password=\"password\",\n license=\"00000-00000-00000-00000-00000\",\n thumbprint=thumbprint.id,\n datacenter=datacenter.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var thumbprint = VSphere.GetHostThumbprint.Invoke(new()\n {\n Address = \"esx-01.example.com\",\n Insecure = true,\n });\n\n var esx_01 = new VSphere.Host(\"esx-01\", new()\n {\n Hostname = \"esx-01.example.com\",\n Username = \"root\",\n Password = \"password\",\n License = \"00000-00000-00000-00000-00000\",\n Thumbprint = thumbprint.Apply(getHostThumbprintResult =\u003e getHostThumbprintResult.Id),\n Datacenter = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthumbprint, err := vsphere.GetHostThumbprint(ctx, \u0026vsphere.GetHostThumbprintArgs{\n\t\t\tAddress: \"esx-01.example.com\",\n\t\t\tInsecure: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHost(ctx, \"esx-01\", \u0026vsphere.HostArgs{\n\t\t\tHostname: pulumi.String(\"esx-01.example.com\"),\n\t\t\tUsername: pulumi.String(\"root\"),\n\t\t\tPassword: pulumi.String(\"password\"),\n\t\t\tLicense: pulumi.String(\"00000-00000-00000-00000-00000\"),\n\t\t\tThumbprint: pulumi.String(thumbprint.Id),\n\t\t\tDatacenter: pulumi.String(datacenter.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostThumbprintArgs;\nimport com.pulumi.vsphere.Host;\nimport com.pulumi.vsphere.HostArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()\n .address(\"esx-01.example.com\")\n .insecure(true)\n .build());\n\n var esx_01 = new Host(\"esx-01\", HostArgs.builder() \n .hostname(\"esx-01.example.com\")\n .username(\"root\")\n .password(\"password\")\n .license(\"00000-00000-00000-00000-00000\")\n .thumbprint(thumbprint.applyValue(getHostThumbprintResult -\u003e getHostThumbprintResult.id()))\n .datacenter(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n esx-01:\n type: vsphere:Host\n properties:\n hostname: esx-01.example.com\n username: root\n password: password\n license: 00000-00000-00000-00000-00000\n thumbprint: ${thumbprint.id}\n datacenter: ${datacenter.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n thumbprint:\n fn::invoke:\n Function: vsphere:getHostThumbprint\n Arguments:\n address: esx-01.example.com\n insecure: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create host in a compute cluster\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst thumbprint = vsphere.getHostThumbprint({\n address: \"esx-01.example.com\",\n insecure: true,\n});\nconst esx_01 = new vsphere.Host(\"esx-01\", {\n hostname: \"esx-01.example.com\",\n username: \"root\",\n password: \"password\",\n license: \"00000-00000-00000-00000-00000\",\n thumbprint: thumbprint.then(thumbprint =\u003e thumbprint.id),\n cluster: cluster.then(cluster =\u003e cluster.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nthumbprint = vsphere.get_host_thumbprint(address=\"esx-01.example.com\",\n insecure=True)\nesx_01 = vsphere.Host(\"esx-01\",\n hostname=\"esx-01.example.com\",\n username=\"root\",\n password=\"password\",\n license=\"00000-00000-00000-00000-00000\",\n thumbprint=thumbprint.id,\n cluster=cluster.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var thumbprint = VSphere.GetHostThumbprint.Invoke(new()\n {\n Address = \"esx-01.example.com\",\n Insecure = true,\n });\n\n var esx_01 = new VSphere.Host(\"esx-01\", new()\n {\n Hostname = \"esx-01.example.com\",\n Username = \"root\",\n Password = \"password\",\n License = \"00000-00000-00000-00000-00000\",\n Thumbprint = thumbprint.Apply(getHostThumbprintResult =\u003e getHostThumbprintResult.Id),\n Cluster = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthumbprint, err := vsphere.GetHostThumbprint(ctx, \u0026vsphere.GetHostThumbprintArgs{\n\t\t\tAddress: \"esx-01.example.com\",\n\t\t\tInsecure: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHost(ctx, \"esx-01\", \u0026vsphere.HostArgs{\n\t\t\tHostname: pulumi.String(\"esx-01.example.com\"),\n\t\t\tUsername: pulumi.String(\"root\"),\n\t\t\tPassword: pulumi.String(\"password\"),\n\t\t\tLicense: pulumi.String(\"00000-00000-00000-00000-00000\"),\n\t\t\tThumbprint: pulumi.String(thumbprint.Id),\n\t\t\tCluster: pulumi.String(cluster.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetHostThumbprintArgs;\nimport com.pulumi.vsphere.Host;\nimport com.pulumi.vsphere.HostArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()\n .address(\"esx-01.example.com\")\n .insecure(true)\n .build());\n\n var esx_01 = new Host(\"esx-01\", HostArgs.builder() \n .hostname(\"esx-01.example.com\")\n .username(\"root\")\n .password(\"password\")\n .license(\"00000-00000-00000-00000-00000\")\n .thumbprint(thumbprint.applyValue(getHostThumbprintResult -\u003e getHostThumbprintResult.id()))\n .cluster(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n esx-01:\n type: vsphere:Host\n properties:\n hostname: esx-01.example.com\n username: root\n password: password\n license: 00000-00000-00000-00000-00000\n thumbprint: ${thumbprint.id}\n cluster: ${cluster.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n cluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n thumbprint:\n fn::invoke:\n Function: vsphere:getHostThumbprint\n Arguments:\n address: esx-01.example.com\n insecure: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing host can be [imported][docs-import] into this resource by supplying\nthe host's ID. An example is below:\n\n[docs-import]: /docs/import/index.html\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\n```\n```python\nimport pulumi\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n }\n}\n```\n```yaml\n{}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe above would import the host with ID `host-123`.\n", + "description": "Provides a VMware vSphere host resource. This represents an ESXi host that\ncan be used either as a member of a cluster or as a standalone host.\n\n## Example Usage\n\n### Create a standalone host\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst thumbprint = vsphere.getHostThumbprint({\n address: \"esx-01.example.com\",\n insecure: true,\n});\nconst esx_01 = new vsphere.Host(\"esx-01\", {\n hostname: \"esx-01.example.com\",\n username: \"root\",\n password: \"password\",\n license: \"00000-00000-00000-00000-00000\",\n thumbprint: thumbprint.then(thumbprint =\u003e thumbprint.id),\n datacenter: datacenter.then(datacenter =\u003e datacenter.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nthumbprint = vsphere.get_host_thumbprint(address=\"esx-01.example.com\",\n insecure=True)\nesx_01 = vsphere.Host(\"esx-01\",\n hostname=\"esx-01.example.com\",\n username=\"root\",\n password=\"password\",\n license=\"00000-00000-00000-00000-00000\",\n thumbprint=thumbprint.id,\n datacenter=datacenter.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var thumbprint = VSphere.GetHostThumbprint.Invoke(new()\n {\n Address = \"esx-01.example.com\",\n Insecure = true,\n });\n\n var esx_01 = new VSphere.Host(\"esx-01\", new()\n {\n Hostname = \"esx-01.example.com\",\n Username = \"root\",\n Password = \"password\",\n License = \"00000-00000-00000-00000-00000\",\n Thumbprint = thumbprint.Apply(getHostThumbprintResult =\u003e getHostThumbprintResult.Id),\n Datacenter = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthumbprint, err := vsphere.GetHostThumbprint(ctx, \u0026vsphere.GetHostThumbprintArgs{\n\t\t\tAddress: \"esx-01.example.com\",\n\t\t\tInsecure: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHost(ctx, \"esx-01\", \u0026vsphere.HostArgs{\n\t\t\tHostname: pulumi.String(\"esx-01.example.com\"),\n\t\t\tUsername: pulumi.String(\"root\"),\n\t\t\tPassword: pulumi.String(\"password\"),\n\t\t\tLicense: pulumi.String(\"00000-00000-00000-00000-00000\"),\n\t\t\tThumbprint: pulumi.String(thumbprint.Id),\n\t\t\tDatacenter: pulumi.String(datacenter.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostThumbprintArgs;\nimport com.pulumi.vsphere.Host;\nimport com.pulumi.vsphere.HostArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()\n .address(\"esx-01.example.com\")\n .insecure(true)\n .build());\n\n var esx_01 = new Host(\"esx-01\", HostArgs.builder() \n .hostname(\"esx-01.example.com\")\n .username(\"root\")\n .password(\"password\")\n .license(\"00000-00000-00000-00000-00000\")\n .thumbprint(thumbprint.applyValue(getHostThumbprintResult -\u003e getHostThumbprintResult.id()))\n .datacenter(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n esx-01:\n type: vsphere:Host\n properties:\n hostname: esx-01.example.com\n username: root\n password: password\n license: 00000-00000-00000-00000-00000\n thumbprint: ${thumbprint.id}\n datacenter: ${datacenter.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n thumbprint:\n fn::invoke:\n Function: vsphere:getHostThumbprint\n Arguments:\n address: esx-01.example.com\n insecure: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create host in a compute cluster\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst thumbprint = vsphere.getHostThumbprint({\n address: \"esx-01.example.com\",\n insecure: true,\n});\nconst esx_01 = new vsphere.Host(\"esx-01\", {\n hostname: \"esx-01.example.com\",\n username: \"root\",\n password: \"password\",\n license: \"00000-00000-00000-00000-00000\",\n thumbprint: thumbprint.then(thumbprint =\u003e thumbprint.id),\n cluster: cluster.then(cluster =\u003e cluster.id),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nthumbprint = vsphere.get_host_thumbprint(address=\"esx-01.example.com\",\n insecure=True)\nesx_01 = vsphere.Host(\"esx-01\",\n hostname=\"esx-01.example.com\",\n username=\"root\",\n password=\"password\",\n license=\"00000-00000-00000-00000-00000\",\n thumbprint=thumbprint.id,\n cluster=cluster.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var thumbprint = VSphere.GetHostThumbprint.Invoke(new()\n {\n Address = \"esx-01.example.com\",\n Insecure = true,\n });\n\n var esx_01 = new VSphere.Host(\"esx-01\", new()\n {\n Hostname = \"esx-01.example.com\",\n Username = \"root\",\n Password = \"password\",\n License = \"00000-00000-00000-00000-00000\",\n Thumbprint = thumbprint.Apply(getHostThumbprintResult =\u003e getHostThumbprintResult.Id),\n Cluster = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthumbprint, err := vsphere.GetHostThumbprint(ctx, \u0026vsphere.GetHostThumbprintArgs{\n\t\t\tAddress: \"esx-01.example.com\",\n\t\t\tInsecure: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHost(ctx, \"esx-01\", \u0026vsphere.HostArgs{\n\t\t\tHostname: pulumi.String(\"esx-01.example.com\"),\n\t\t\tUsername: pulumi.String(\"root\"),\n\t\t\tPassword: pulumi.String(\"password\"),\n\t\t\tLicense: pulumi.String(\"00000-00000-00000-00000-00000\"),\n\t\t\tThumbprint: pulumi.String(thumbprint.Id),\n\t\t\tCluster: pulumi.String(cluster.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetHostThumbprintArgs;\nimport com.pulumi.vsphere.Host;\nimport com.pulumi.vsphere.HostArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()\n .address(\"esx-01.example.com\")\n .insecure(true)\n .build());\n\n var esx_01 = new Host(\"esx-01\", HostArgs.builder() \n .hostname(\"esx-01.example.com\")\n .username(\"root\")\n .password(\"password\")\n .license(\"00000-00000-00000-00000-00000\")\n .thumbprint(thumbprint.applyValue(getHostThumbprintResult -\u003e getHostThumbprintResult.id()))\n .cluster(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n esx-01:\n type: vsphere:Host\n properties:\n hostname: esx-01.example.com\n username: root\n password: password\n license: 00000-00000-00000-00000-00000\n thumbprint: ${thumbprint.id}\n cluster: ${cluster.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n cluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n thumbprint:\n fn::invoke:\n Function: vsphere:getHostThumbprint\n Arguments:\n address: esx-01.example.com\n insecure: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing host can be [imported][docs-import] into this resource by supplying\nthe host's ID. An example is below:\n\n[docs-import]: /docs/import/index.html\n\n```\nterraform import vsphere_host.esx-01 host-123\n```\n\nThe above would import the host with ID `host-123`.\n", "properties": { "cluster": { "type": "string", @@ -6851,7 +6851,7 @@ } }, "vsphere:index/hostPortGroup:HostPortGroup": { - "description": "The `vsphere.HostPortGroup` resource can be used to manage port groups on\nESXi hosts. These port groups are connected to standard switches, which\ncan be managed by the `vsphere.HostVirtualSwitch`\nresource.\n\nFor an overview on vSphere networking concepts, see [the product documentation][ref-vsphere-net-concepts].\n\n[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html\n\n## Example Usage\n\n**Create a Virtual Switch and Bind a Port Group:**\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst host = datacenter.then(datacenter =\u003e vsphere.getHost({\n name: \"esxi-01.example.com\",\n datacenterId: datacenter.id,\n}));\nconst hostVirtualSwitch = new vsphere.HostVirtualSwitch(\"hostVirtualSwitch\", {\n hostSystemId: host.then(host =\u003e host.id),\n networkAdapters: [\n \"vmnic0\",\n \"vmnic1\",\n ],\n activeNics: [\"vmnic0\"],\n standbyNics: [\"vmnic1\"],\n});\nconst pg = new vsphere.HostPortGroup(\"pg\", {\n hostSystemId: host.then(host =\u003e host.id),\n virtualSwitchName: hostVirtualSwitch.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nhost = vsphere.get_host(name=\"esxi-01.example.com\",\n datacenter_id=datacenter.id)\nhost_virtual_switch = vsphere.HostVirtualSwitch(\"hostVirtualSwitch\",\n host_system_id=host.id,\n network_adapters=[\n \"vmnic0\",\n \"vmnic1\",\n ],\n active_nics=[\"vmnic0\"],\n standby_nics=[\"vmnic1\"])\npg = vsphere.HostPortGroup(\"pg\",\n host_system_id=host.id,\n virtual_switch_name=host_virtual_switch.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var host = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi-01.example.com\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostVirtualSwitch = new VSphere.HostVirtualSwitch(\"hostVirtualSwitch\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic0\",\n \"vmnic1\",\n },\n ActiveNics = new[]\n {\n \"vmnic0\",\n },\n StandbyNics = new[]\n {\n \"vmnic1\",\n },\n });\n\n var pg = new VSphere.HostPortGroup(\"pg\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n VirtualSwitchName = hostVirtualSwitch.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thost, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi-01.example.com\"),\n\t\t\tDatacenterId: datacenter.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, \"hostVirtualSwitch\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHostPortGroup(ctx, \"pg\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tVirtualSwitchName: hostVirtualSwitch.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var host = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi-01.example.com\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hostVirtualSwitch = new HostVirtualSwitch(\"hostVirtualSwitch\", HostVirtualSwitchArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic0\",\n \"vmnic1\")\n .activeNics(\"vmnic0\")\n .standbyNics(\"vmnic1\")\n .build());\n\n var pg = new HostPortGroup(\"pg\", HostPortGroupArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .virtualSwitchName(hostVirtualSwitch.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostVirtualSwitch:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${host.id}\n networkAdapters:\n - vmnic0\n - vmnic1\n activeNics:\n - vmnic0\n standbyNics:\n - vmnic1\n pg:\n type: vsphere:HostPortGroup\n properties:\n hostSystemId: ${host.id}\n virtualSwitchName: ${hostVirtualSwitch.name}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n host:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi-01.example.com\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n**Create a Port Group with a VLAN and ab Override:**\n\nThis example sets the trunk mode VLAN (`4095`, which passes through all tags)\nand sets\n`allow_promiscuous`\nto ensure that all traffic is seen on the port. The setting overrides\nthe implicit default of `false` set on the standard switch.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst host = datacenter.then(datacenter =\u003e vsphere.getHost({\n name: \"esxi-01.example.com\",\n datacenterId: datacenter.id,\n}));\nconst hostVirtualSwitch = new vsphere.HostVirtualSwitch(\"hostVirtualSwitch\", {\n hostSystemId: host.then(host =\u003e host.id),\n networkAdapters: [\n \"vmnic0\",\n \"vmnic1\",\n ],\n activeNics: [\"vmnic0\"],\n standbyNics: [\"vmnic1\"],\n});\nconst pg = new vsphere.HostPortGroup(\"pg\", {\n hostSystemId: host.then(host =\u003e host.id),\n virtualSwitchName: hostVirtualSwitch.name,\n vlanId: 4095,\n allowPromiscuous: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nhost = vsphere.get_host(name=\"esxi-01.example.com\",\n datacenter_id=datacenter.id)\nhost_virtual_switch = vsphere.HostVirtualSwitch(\"hostVirtualSwitch\",\n host_system_id=host.id,\n network_adapters=[\n \"vmnic0\",\n \"vmnic1\",\n ],\n active_nics=[\"vmnic0\"],\n standby_nics=[\"vmnic1\"])\npg = vsphere.HostPortGroup(\"pg\",\n host_system_id=host.id,\n virtual_switch_name=host_virtual_switch.name,\n vlan_id=4095,\n allow_promiscuous=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var host = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi-01.example.com\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostVirtualSwitch = new VSphere.HostVirtualSwitch(\"hostVirtualSwitch\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic0\",\n \"vmnic1\",\n },\n ActiveNics = new[]\n {\n \"vmnic0\",\n },\n StandbyNics = new[]\n {\n \"vmnic1\",\n },\n });\n\n var pg = new VSphere.HostPortGroup(\"pg\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n VirtualSwitchName = hostVirtualSwitch.Name,\n VlanId = 4095,\n AllowPromiscuous = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thost, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi-01.example.com\"),\n\t\t\tDatacenterId: datacenter.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, \"hostVirtualSwitch\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHostPortGroup(ctx, \"pg\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tVirtualSwitchName: hostVirtualSwitch.Name,\n\t\t\tVlanId: pulumi.Int(4095),\n\t\t\tAllowPromiscuous: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var host = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi-01.example.com\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hostVirtualSwitch = new HostVirtualSwitch(\"hostVirtualSwitch\", HostVirtualSwitchArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic0\",\n \"vmnic1\")\n .activeNics(\"vmnic0\")\n .standbyNics(\"vmnic1\")\n .build());\n\n var pg = new HostPortGroup(\"pg\", HostPortGroupArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .virtualSwitchName(hostVirtualSwitch.name())\n .vlanId(4095)\n .allowPromiscuous(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostVirtualSwitch:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${host.id}\n networkAdapters:\n - vmnic0\n - vmnic1\n activeNics:\n - vmnic0\n standbyNics:\n - vmnic1\n pg:\n type: vsphere:HostPortGroup\n properties:\n hostSystemId: ${host.id}\n virtualSwitchName: ${hostVirtualSwitch.name}\n vlanId: 4095\n allowPromiscuous: true\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n host:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi-01.example.com\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing host port group can be imported into this resource\nusing the host port group's ID. An example is below:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\n```\n```python\nimport pulumi\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n }\n}\n```\n```yaml\n{}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe above would import the `management` host port group from host with ID `host-123`.\n", + "description": "The `vsphere.HostPortGroup` resource can be used to manage port groups on\nESXi hosts. These port groups are connected to standard switches, which\ncan be managed by the `vsphere.HostVirtualSwitch`\nresource.\n\nFor an overview on vSphere networking concepts, see [the product documentation][ref-vsphere-net-concepts].\n\n[ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html\n\n## Example Usage\n\n**Create a Virtual Switch and Bind a Port Group:**\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst host = datacenter.then(datacenter =\u003e vsphere.getHost({\n name: \"esxi-01.example.com\",\n datacenterId: datacenter.id,\n}));\nconst hostVirtualSwitch = new vsphere.HostVirtualSwitch(\"hostVirtualSwitch\", {\n hostSystemId: host.then(host =\u003e host.id),\n networkAdapters: [\n \"vmnic0\",\n \"vmnic1\",\n ],\n activeNics: [\"vmnic0\"],\n standbyNics: [\"vmnic1\"],\n});\nconst pg = new vsphere.HostPortGroup(\"pg\", {\n hostSystemId: host.then(host =\u003e host.id),\n virtualSwitchName: hostVirtualSwitch.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nhost = vsphere.get_host(name=\"esxi-01.example.com\",\n datacenter_id=datacenter.id)\nhost_virtual_switch = vsphere.HostVirtualSwitch(\"hostVirtualSwitch\",\n host_system_id=host.id,\n network_adapters=[\n \"vmnic0\",\n \"vmnic1\",\n ],\n active_nics=[\"vmnic0\"],\n standby_nics=[\"vmnic1\"])\npg = vsphere.HostPortGroup(\"pg\",\n host_system_id=host.id,\n virtual_switch_name=host_virtual_switch.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var host = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi-01.example.com\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostVirtualSwitch = new VSphere.HostVirtualSwitch(\"hostVirtualSwitch\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic0\",\n \"vmnic1\",\n },\n ActiveNics = new[]\n {\n \"vmnic0\",\n },\n StandbyNics = new[]\n {\n \"vmnic1\",\n },\n });\n\n var pg = new VSphere.HostPortGroup(\"pg\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n VirtualSwitchName = hostVirtualSwitch.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thost, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi-01.example.com\"),\n\t\t\tDatacenterId: datacenter.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, \"hostVirtualSwitch\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHostPortGroup(ctx, \"pg\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tVirtualSwitchName: hostVirtualSwitch.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var host = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi-01.example.com\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hostVirtualSwitch = new HostVirtualSwitch(\"hostVirtualSwitch\", HostVirtualSwitchArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic0\",\n \"vmnic1\")\n .activeNics(\"vmnic0\")\n .standbyNics(\"vmnic1\")\n .build());\n\n var pg = new HostPortGroup(\"pg\", HostPortGroupArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .virtualSwitchName(hostVirtualSwitch.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostVirtualSwitch:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${host.id}\n networkAdapters:\n - vmnic0\n - vmnic1\n activeNics:\n - vmnic0\n standbyNics:\n - vmnic1\n pg:\n type: vsphere:HostPortGroup\n properties:\n hostSystemId: ${host.id}\n virtualSwitchName: ${hostVirtualSwitch.name}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n host:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi-01.example.com\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n**Create a Port Group with a VLAN and ab Override:**\n\nThis example sets the trunk mode VLAN (`4095`, which passes through all tags)\nand sets\n`allow_promiscuous`\nto ensure that all traffic is seen on the port. The setting overrides\nthe implicit default of `false` set on the standard switch.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst host = datacenter.then(datacenter =\u003e vsphere.getHost({\n name: \"esxi-01.example.com\",\n datacenterId: datacenter.id,\n}));\nconst hostVirtualSwitch = new vsphere.HostVirtualSwitch(\"hostVirtualSwitch\", {\n hostSystemId: host.then(host =\u003e host.id),\n networkAdapters: [\n \"vmnic0\",\n \"vmnic1\",\n ],\n activeNics: [\"vmnic0\"],\n standbyNics: [\"vmnic1\"],\n});\nconst pg = new vsphere.HostPortGroup(\"pg\", {\n hostSystemId: host.then(host =\u003e host.id),\n virtualSwitchName: hostVirtualSwitch.name,\n vlanId: 4095,\n allowPromiscuous: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nhost = vsphere.get_host(name=\"esxi-01.example.com\",\n datacenter_id=datacenter.id)\nhost_virtual_switch = vsphere.HostVirtualSwitch(\"hostVirtualSwitch\",\n host_system_id=host.id,\n network_adapters=[\n \"vmnic0\",\n \"vmnic1\",\n ],\n active_nics=[\"vmnic0\"],\n standby_nics=[\"vmnic1\"])\npg = vsphere.HostPortGroup(\"pg\",\n host_system_id=host.id,\n virtual_switch_name=host_virtual_switch.name,\n vlan_id=4095,\n allow_promiscuous=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var host = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi-01.example.com\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostVirtualSwitch = new VSphere.HostVirtualSwitch(\"hostVirtualSwitch\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic0\",\n \"vmnic1\",\n },\n ActiveNics = new[]\n {\n \"vmnic0\",\n },\n StandbyNics = new[]\n {\n \"vmnic1\",\n },\n });\n\n var pg = new VSphere.HostPortGroup(\"pg\", new()\n {\n HostSystemId = host.Apply(getHostResult =\u003e getHostResult.Id),\n VirtualSwitchName = hostVirtualSwitch.Name,\n VlanId = 4095,\n AllowPromiscuous = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thost, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi-01.example.com\"),\n\t\t\tDatacenterId: datacenter.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, \"hostVirtualSwitch\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic0\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewHostPortGroup(ctx, \"pg\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tHostSystemId: pulumi.String(host.Id),\n\t\t\tVirtualSwitchName: hostVirtualSwitch.Name,\n\t\t\tVlanId: pulumi.Int(4095),\n\t\t\tAllowPromiscuous: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var host = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi-01.example.com\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hostVirtualSwitch = new HostVirtualSwitch(\"hostVirtualSwitch\", HostVirtualSwitchArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic0\",\n \"vmnic1\")\n .activeNics(\"vmnic0\")\n .standbyNics(\"vmnic1\")\n .build());\n\n var pg = new HostPortGroup(\"pg\", HostPortGroupArgs.builder() \n .hostSystemId(host.applyValue(getHostResult -\u003e getHostResult.id()))\n .virtualSwitchName(hostVirtualSwitch.name())\n .vlanId(4095)\n .allowPromiscuous(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostVirtualSwitch:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${host.id}\n networkAdapters:\n - vmnic0\n - vmnic1\n activeNics:\n - vmnic0\n standbyNics:\n - vmnic1\n pg:\n type: vsphere:HostPortGroup\n properties:\n hostSystemId: ${host.id}\n virtualSwitchName: ${hostVirtualSwitch.name}\n vlanId: 4095\n allowPromiscuous: true\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n host:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi-01.example.com\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing host port group can be imported into this resource\nusing the host port group's ID. An example is below:\n\n```\nterraform import vsphere_host_port_group.management tf-HostPortGroup:host-123:management\n```\n\nThe above would import the `management` host port group from host with ID `host-123`.\n", "properties": { "activeNics": { "type": "array", @@ -7809,7 +7809,7 @@ } }, "vsphere:index/resourcePool:ResourcePool": { - "description": "The `vsphere.ResourcePool` resource can be used to create and manage\nresource pools on DRS-enabled vSphere clusters or standalone ESXi hosts.\n\nFor more information on vSphere resource pools, please refer to the\n[product documentation][ref-vsphere-resource_pools].\n\n[ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html\n\n## Example Usage\n\nThe following example sets up a resource pool in an existing compute cluster\nwith the default settings for CPU and memory reservations, shares, and limits.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst computeCluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst resourcePool = new vsphere.ResourcePool(\"resourcePool\", {parentResourcePoolId: computeCluster.then(computeCluster =\u003e computeCluster.resourcePoolId)});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncompute_cluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nresource_pool = vsphere.ResourcePool(\"resourcePool\", parent_resource_pool_id=compute_cluster.resource_pool_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var computeCluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var resourcePool = new VSphere.ResourcePool(\"resourcePool\", new()\n {\n ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcomputeCluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewResourcePool(ctx, \"resourcePool\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ResourcePool;\nimport com.pulumi.vsphere.ResourcePoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var resourcePool = new ResourcePool(\"resourcePool\", ResourcePoolArgs.builder() \n .parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n resourcePool:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${computeCluster.resourcePoolId}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n computeCluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nA virtual machine resource could be targeted to use the default resource pool\nof the cluster using the following:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst vm = new vsphere.VirtualMachine(\"vm\", {resourcePoolId: data.vsphere_compute_cluster.cluster.resource_pool_id});\n// ... other configuration ...\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nvm = vsphere.VirtualMachine(\"vm\", resource_pool_id=data[\"vsphere_compute_cluster\"][\"cluster\"][\"resource_pool_id\"])\n# ... other configuration ...\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vm = new VSphere.VirtualMachine(\"vm\", new()\n {\n ResourcePoolId = data.Vsphere_compute_cluster.Cluster.Resource_pool_id,\n });\n\n // ... other configuration ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewVirtualMachine(ctx, \"vm\", \u0026vsphere.VirtualMachineArgs{\n\t\t\tResourcePoolId: pulumi.Any(data.Vsphere_compute_cluster.Cluster.Resource_pool_id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VirtualMachine;\nimport com.pulumi.vsphere.VirtualMachineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vm = new VirtualMachine(\"vm\", VirtualMachineArgs.builder() \n .resourcePoolId(data.vsphere_compute_cluster().cluster().resource_pool_id())\n .build());\n\n // ... other configuration ...\n }\n}\n```\n```yaml\nresources:\n vm:\n type: vsphere:VirtualMachine\n properties:\n # ... other configuration ...\n resourcePoolId: ${data.vsphere_compute_cluster.cluster.resource_pool_id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example sets up a parent resource pool in an existing compute cluster\nwith a child resource pool nested below. Each resource pool is configured with\nthe default settings for CPU and memory reservations, shares, and limits.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst computeCluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst resourcePoolParent = new vsphere.ResourcePool(\"resourcePoolParent\", {parentResourcePoolId: computeCluster.then(computeCluster =\u003e computeCluster.resourcePoolId)});\nconst resourcePoolChild = new vsphere.ResourcePool(\"resourcePoolChild\", {parentResourcePoolId: resourcePoolParent.id});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncompute_cluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nresource_pool_parent = vsphere.ResourcePool(\"resourcePoolParent\", parent_resource_pool_id=compute_cluster.resource_pool_id)\nresource_pool_child = vsphere.ResourcePool(\"resourcePoolChild\", parent_resource_pool_id=resource_pool_parent.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var computeCluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var resourcePoolParent = new VSphere.ResourcePool(\"resourcePoolParent\", new()\n {\n ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n });\n\n var resourcePoolChild = new VSphere.ResourcePool(\"resourcePoolChild\", new()\n {\n ParentResourcePoolId = resourcePoolParent.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcomputeCluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tresourcePoolParent, err := vsphere.NewResourcePool(ctx, \"resourcePoolParent\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewResourcePool(ctx, \"resourcePoolChild\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: resourcePoolParent.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ResourcePool;\nimport com.pulumi.vsphere.ResourcePoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var resourcePoolParent = new ResourcePool(\"resourcePoolParent\", ResourcePoolArgs.builder() \n .parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .build());\n\n var resourcePoolChild = new ResourcePool(\"resourcePoolChild\", ResourcePoolArgs.builder() \n .parentResourcePoolId(resourcePoolParent.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n resourcePoolParent:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${computeCluster.resourcePoolId}\n resourcePoolChild:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${resourcePoolParent.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n computeCluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n", + "description": "The `vsphere.ResourcePool` resource can be used to create and manage\nresource pools on DRS-enabled vSphere clusters or standalone ESXi hosts.\n\nFor more information on vSphere resource pools, please refer to the\n[product documentation][ref-vsphere-resource_pools].\n\n[ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html\n\n## Example Usage\n\nThe following example sets up a resource pool in an existing compute cluster\nwith the default settings for CPU and memory reservations, shares, and limits.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst computeCluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst resourcePool = new vsphere.ResourcePool(\"resourcePool\", {parentResourcePoolId: computeCluster.then(computeCluster =\u003e computeCluster.resourcePoolId)});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncompute_cluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nresource_pool = vsphere.ResourcePool(\"resourcePool\", parent_resource_pool_id=compute_cluster.resource_pool_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var computeCluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var resourcePool = new VSphere.ResourcePool(\"resourcePool\", new()\n {\n ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcomputeCluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewResourcePool(ctx, \"resourcePool\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ResourcePool;\nimport com.pulumi.vsphere.ResourcePoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var resourcePool = new ResourcePool(\"resourcePool\", ResourcePoolArgs.builder() \n .parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n resourcePool:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${computeCluster.resourcePoolId}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n computeCluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nA virtual machine resource could be targeted to use the default resource pool\nof the cluster using the following:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst vm = new vsphere.VirtualMachine(\"vm\", {resourcePoolId: data.vsphere_compute_cluster.cluster.resource_pool_id});\n// ... other configuration ...\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\nvm = vsphere.VirtualMachine(\"vm\", resource_pool_id=data[\"vsphere_compute_cluster\"][\"cluster\"][\"resource_pool_id\"])\n# ... other configuration ...\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vm = new VSphere.VirtualMachine(\"vm\", new()\n {\n ResourcePoolId = data.Vsphere_compute_cluster.Cluster.Resource_pool_id,\n });\n\n // ... other configuration ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vsphere.NewVirtualMachine(ctx, \"vm\", \u0026vsphere.VirtualMachineArgs{\n\t\t\tResourcePoolId: pulumi.Any(data.Vsphere_compute_cluster.Cluster.Resource_pool_id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VirtualMachine;\nimport com.pulumi.vsphere.VirtualMachineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var vm = new VirtualMachine(\"vm\", VirtualMachineArgs.builder() \n .resourcePoolId(data.vsphere_compute_cluster().cluster().resource_pool_id())\n .build());\n\n // ... other configuration ...\n }\n}\n```\n```yaml\nresources:\n vm:\n type: vsphere:VirtualMachine\n properties:\n # ... other configuration ...\n resourcePoolId: ${data.vsphere_compute_cluster.cluster.resource_pool_id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example sets up a parent resource pool in an existing compute cluster\nwith a child resource pool nested below. Each resource pool is configured with\nthe default settings for CPU and memory reservations, shares, and limits.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst datacenter = vsphere.getDatacenter({\n name: \"dc-01\",\n});\nconst computeCluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: \"cluster-01\",\n datacenterId: datacenter.id,\n}));\nconst resourcePoolParent = new vsphere.ResourcePool(\"resourcePoolParent\", {parentResourcePoolId: computeCluster.then(computeCluster =\u003e computeCluster.resourcePoolId)});\nconst resourcePoolChild = new vsphere.ResourcePool(\"resourcePoolChild\", {parentResourcePoolId: resourcePoolParent.id});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\ncompute_cluster = vsphere.get_compute_cluster(name=\"cluster-01\",\n datacenter_id=datacenter.id)\nresource_pool_parent = vsphere.ResourcePool(\"resourcePoolParent\", parent_resource_pool_id=compute_cluster.resource_pool_id)\nresource_pool_child = vsphere.ResourcePool(\"resourcePoolChild\", parent_resource_pool_id=resource_pool_parent.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var datacenter = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"dc-01\",\n });\n\n var computeCluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = \"cluster-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var resourcePoolParent = new VSphere.ResourcePool(\"resourcePoolParent\", new()\n {\n ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.ResourcePoolId),\n });\n\n var resourcePoolChild = new VSphere.ResourcePool(\"resourcePoolChild\", new()\n {\n ParentResourcePoolId = resourcePoolParent.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdatacenter, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"dc-01\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcomputeCluster, err := vsphere.LookupComputeCluster(ctx, \u0026vsphere.LookupComputeClusterArgs{\n\t\t\tName: \"cluster-01\",\n\t\t\tDatacenterId: pulumi.StringRef(datacenter.Id),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tresourcePoolParent, err := vsphere.NewResourcePool(ctx, \"resourcePoolParent\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewResourcePool(ctx, \"resourcePoolChild\", \u0026vsphere.ResourcePoolArgs{\n\t\t\tParentResourcePoolId: resourcePoolParent.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterArgs;\nimport com.pulumi.vsphere.ResourcePool;\nimport com.pulumi.vsphere.ResourcePoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"dc-01\")\n .build());\n\n final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(\"cluster-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var resourcePoolParent = new ResourcePool(\"resourcePoolParent\", ResourcePoolArgs.builder() \n .parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.resourcePoolId()))\n .build());\n\n var resourcePoolChild = new ResourcePool(\"resourcePoolChild\", ResourcePoolArgs.builder() \n .parentResourcePoolId(resourcePoolParent.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n resourcePoolParent:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${computeCluster.resourcePoolId}\n resourcePoolChild:\n type: vsphere:ResourcePool\n properties:\n parentResourcePoolId: ${resourcePoolParent.id}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n computeCluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: cluster-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing resource pool can be imported into this resource via\nthe path to the resource pool, using the following command:\n\n```\nterraform import vsphere_resource_pool.resource_pool /dc-01/host/cluster-01/Resources/resource-pool-01\n```\n\nThe above would import the resource pool named `resource-pool-01` that is located\nin the compute cluster `cluster-01` in the `dc-01` datacenter.\n\n### Settings that Require vSphere 7.0 or higher\n\nThese settings require vSphere 7.0 or higher:\n\n* `scale_descendants_shares`\n", "properties": { "cpuExpandable": { "type": "boolean", @@ -9070,7 +9070,7 @@ }, "replaceTrigger": { "type": "string", - "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%!s(MISSING)-%!s(MISSING)\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n" + "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%s-%s\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n" }, "resourcePoolId": { "type": "string", @@ -9439,7 +9439,7 @@ }, "replaceTrigger": { "type": "string", - "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%!s(MISSING)-%!s(MISSING)\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n", + "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%s-%s\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n", "willReplaceOnChanges": true }, "resourcePoolId": { @@ -9802,7 +9802,7 @@ }, "replaceTrigger": { "type": "string", - "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%!s(MISSING)-%!s(MISSING)\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n", + "description": "Triggers replacement of resource whenever it changes.\n\nFor example, `replace_trigger = sha256(format(\"%s-%s\",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.)\n", "willReplaceOnChanges": true }, "resourcePoolId": { @@ -10311,7 +10311,7 @@ } }, "vsphere:index/vnic:Vnic": { - "description": "Provides a VMware vSphere vnic resource.\n\n## Example Usage\n\n### S\n\n### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst dc = vsphere.getDatacenter({\n name: \"mydc\",\n});\nconst h1 = dc.then(dc =\u003e vsphere.getHost({\n name: \"esxi1.host.test\",\n datacenterId: dc.id,\n}));\nconst d1 = new vsphere.DistributedVirtualSwitch(\"d1\", {\n datacenterId: dc.then(dc =\u003e dc.id),\n hosts: [{\n hostSystemId: h1.then(h1 =\u003e h1.id),\n devices: [\"vnic3\"],\n }],\n});\nconst p1 = new vsphere.DistributedPortGroup(\"p1\", {\n vlanId: 1234,\n distributedVirtualSwitchUuid: d1.id,\n});\nconst v1 = new vsphere.Vnic(\"v1\", {\n host: h1.then(h1 =\u003e h1.id),\n distributedSwitchPort: d1.id,\n distributedPortGroup: p1.id,\n ipv4: {\n dhcp: true,\n },\n netstack: \"vmotion\",\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndc = vsphere.get_datacenter(name=\"mydc\")\nh1 = vsphere.get_host(name=\"esxi1.host.test\",\n datacenter_id=dc.id)\nd1 = vsphere.DistributedVirtualSwitch(\"d1\",\n datacenter_id=dc.id,\n hosts=[vsphere.DistributedVirtualSwitchHostArgs(\n host_system_id=h1.id,\n devices=[\"vnic3\"],\n )])\np1 = vsphere.DistributedPortGroup(\"p1\",\n vlan_id=1234,\n distributed_virtual_switch_uuid=d1.id)\nv1 = vsphere.Vnic(\"v1\",\n host=h1.id,\n distributed_switch_port=d1.id,\n distributed_port_group=p1.id,\n ipv4=vsphere.VnicIpv4Args(\n dhcp=True,\n ),\n netstack=\"vmotion\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dc = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"mydc\",\n });\n\n var h1 = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi1.host.test\",\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var d1 = new VSphere.DistributedVirtualSwitch(\"d1\", new()\n {\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n Hosts = new[]\n {\n new VSphere.Inputs.DistributedVirtualSwitchHostArgs\n {\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n Devices = new[]\n {\n \"vnic3\",\n },\n },\n },\n });\n\n var p1 = new VSphere.DistributedPortGroup(\"p1\", new()\n {\n VlanId = 1234,\n DistributedVirtualSwitchUuid = d1.Id,\n });\n\n var v1 = new VSphere.Vnic(\"v1\", new()\n {\n Host = h1.Apply(getHostResult =\u003e getHostResult.Id),\n DistributedSwitchPort = d1.Id,\n DistributedPortGroup = p1.Id,\n Ipv4 = new VSphere.Inputs.VnicIpv4Args\n {\n Dhcp = true,\n },\n Netstack = \"vmotion\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdc, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"mydc\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th1, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi1.host.test\"),\n\t\t\tDatacenterId: dc.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\td1, err := vsphere.NewDistributedVirtualSwitch(ctx, \"d1\", \u0026vsphere.DistributedVirtualSwitchArgs{\n\t\t\tDatacenterId: pulumi.String(dc.Id),\n\t\t\tHosts: vsphere.DistributedVirtualSwitchHostArray{\n\t\t\t\t\u0026vsphere.DistributedVirtualSwitchHostArgs{\n\t\t\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t\t\t\tDevices: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"vnic3\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := vsphere.NewDistributedPortGroup(ctx, \"p1\", \u0026vsphere.DistributedPortGroupArgs{\n\t\t\tVlanId: pulumi.Int(1234),\n\t\t\tDistributedVirtualSwitchUuid: d1.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewVnic(ctx, \"v1\", \u0026vsphere.VnicArgs{\n\t\t\tHost: pulumi.String(h1.Id),\n\t\t\tDistributedSwitchPort: d1.ID(),\n\t\t\tDistributedPortGroup: p1.ID(),\n\t\t\tIpv4: \u0026vsphere.VnicIpv4Args{\n\t\t\t\tDhcp: pulumi.Bool(true),\n\t\t\t},\n\t\t\tNetstack: pulumi.String(\"vmotion\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.DistributedVirtualSwitch;\nimport com.pulumi.vsphere.DistributedVirtualSwitchArgs;\nimport com.pulumi.vsphere.inputs.DistributedVirtualSwitchHostArgs;\nimport com.pulumi.vsphere.DistributedPortGroup;\nimport com.pulumi.vsphere.DistributedPortGroupArgs;\nimport com.pulumi.vsphere.Vnic;\nimport com.pulumi.vsphere.VnicArgs;\nimport com.pulumi.vsphere.inputs.VnicIpv4Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var dc = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"mydc\")\n .build());\n\n final var h1 = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi1.host.test\")\n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var d1 = new DistributedVirtualSwitch(\"d1\", DistributedVirtualSwitchArgs.builder() \n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .hosts(DistributedVirtualSwitchHostArgs.builder()\n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .devices(\"vnic3\")\n .build())\n .build());\n\n var p1 = new DistributedPortGroup(\"p1\", DistributedPortGroupArgs.builder() \n .vlanId(1234)\n .distributedVirtualSwitchUuid(d1.id())\n .build());\n\n var v1 = new Vnic(\"v1\", VnicArgs.builder() \n .host(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .distributedSwitchPort(d1.id())\n .distributedPortGroup(p1.id())\n .ipv4(VnicIpv4Args.builder()\n .dhcp(true)\n .build())\n .netstack(\"vmotion\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: vsphere:DistributedVirtualSwitch\n properties:\n datacenterId: ${dc.id}\n hosts:\n - hostSystemId: ${h1.id}\n devices:\n - vnic3\n p1:\n type: vsphere:DistributedPortGroup\n properties:\n vlanId: 1234\n distributedVirtualSwitchUuid: ${d1.id}\n v1:\n type: vsphere:Vnic\n properties:\n host: ${h1.id}\n distributedSwitchPort: ${d1.id}\n distributedPortGroup: ${p1.id}\n ipv4:\n dhcp: true\n netstack: vmotion\nvariables:\n dc:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: mydc\n h1:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi1.host.test\n datacenterId: ${dc.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a vnic attached to a portgroup using the default TCP/IP stack\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst dc = vsphere.getDatacenter({\n name: \"mydc\",\n});\nconst h1 = dc.then(dc =\u003e vsphere.getHost({\n name: \"esxi1.host.test\",\n datacenterId: dc.id,\n}));\nconst hvs1 = new vsphere.HostVirtualSwitch(\"hvs1\", {\n hostSystemId: h1.then(h1 =\u003e h1.id),\n networkAdapters: [\n \"vmnic3\",\n \"vmnic4\",\n ],\n activeNics: [\"vmnic3\"],\n standbyNics: [\"vmnic4\"],\n});\nconst p1 = new vsphere.HostPortGroup(\"p1\", {\n virtualSwitchName: hvs1.name,\n hostSystemId: h1.then(h1 =\u003e h1.id),\n});\nconst v1 = new vsphere.Vnic(\"v1\", {\n host: h1.then(h1 =\u003e h1.id),\n portgroup: p1.name,\n ipv4: {\n dhcp: true,\n },\n services: [\n \"vsan\",\n \"management\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndc = vsphere.get_datacenter(name=\"mydc\")\nh1 = vsphere.get_host(name=\"esxi1.host.test\",\n datacenter_id=dc.id)\nhvs1 = vsphere.HostVirtualSwitch(\"hvs1\",\n host_system_id=h1.id,\n network_adapters=[\n \"vmnic3\",\n \"vmnic4\",\n ],\n active_nics=[\"vmnic3\"],\n standby_nics=[\"vmnic4\"])\np1 = vsphere.HostPortGroup(\"p1\",\n virtual_switch_name=hvs1.name,\n host_system_id=h1.id)\nv1 = vsphere.Vnic(\"v1\",\n host=h1.id,\n portgroup=p1.name,\n ipv4=vsphere.VnicIpv4Args(\n dhcp=True,\n ),\n services=[\n \"vsan\",\n \"management\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dc = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"mydc\",\n });\n\n var h1 = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi1.host.test\",\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hvs1 = new VSphere.HostVirtualSwitch(\"hvs1\", new()\n {\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic3\",\n \"vmnic4\",\n },\n ActiveNics = new[]\n {\n \"vmnic3\",\n },\n StandbyNics = new[]\n {\n \"vmnic4\",\n },\n });\n\n var p1 = new VSphere.HostPortGroup(\"p1\", new()\n {\n VirtualSwitchName = hvs1.Name,\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n });\n\n var v1 = new VSphere.Vnic(\"v1\", new()\n {\n Host = h1.Apply(getHostResult =\u003e getHostResult.Id),\n Portgroup = p1.Name,\n Ipv4 = new VSphere.Inputs.VnicIpv4Args\n {\n Dhcp = true,\n },\n Services = new[]\n {\n \"vsan\",\n \"management\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdc, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"mydc\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th1, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi1.host.test\"),\n\t\t\tDatacenterId: dc.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thvs1, err := vsphere.NewHostVirtualSwitch(ctx, \"hvs1\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic3\"),\n\t\t\t\tpulumi.String(\"vmnic4\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic3\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic4\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := vsphere.NewHostPortGroup(ctx, \"p1\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tVirtualSwitchName: hvs1.Name,\n\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewVnic(ctx, \"v1\", \u0026vsphere.VnicArgs{\n\t\t\tHost: pulumi.String(h1.Id),\n\t\t\tPortgroup: p1.Name,\n\t\t\tIpv4: \u0026vsphere.VnicIpv4Args{\n\t\t\t\tDhcp: pulumi.Bool(true),\n\t\t\t},\n\t\t\tServices: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vsan\"),\n\t\t\t\tpulumi.String(\"management\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport com.pulumi.vsphere.Vnic;\nimport com.pulumi.vsphere.VnicArgs;\nimport com.pulumi.vsphere.inputs.VnicIpv4Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var dc = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"mydc\")\n .build());\n\n final var h1 = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi1.host.test\")\n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hvs1 = new HostVirtualSwitch(\"hvs1\", HostVirtualSwitchArgs.builder() \n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic3\",\n \"vmnic4\")\n .activeNics(\"vmnic3\")\n .standbyNics(\"vmnic4\")\n .build());\n\n var p1 = new HostPortGroup(\"p1\", HostPortGroupArgs.builder() \n .virtualSwitchName(hvs1.name())\n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .build());\n\n var v1 = new Vnic(\"v1\", VnicArgs.builder() \n .host(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .portgroup(p1.name())\n .ipv4(VnicIpv4Args.builder()\n .dhcp(true)\n .build())\n .services( \n \"vsan\",\n \"management\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hvs1:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${h1.id}\n networkAdapters:\n - vmnic3\n - vmnic4\n activeNics:\n - vmnic3\n standbyNics:\n - vmnic4\n p1:\n type: vsphere:HostPortGroup\n properties:\n virtualSwitchName: ${hvs1.name}\n hostSystemId: ${h1.id}\n v1:\n type: vsphere:Vnic\n properties:\n host: ${h1.id}\n portgroup: ${p1.name}\n ipv4:\n dhcp: true\n services:\n - vsan\n - management\nvariables:\n dc:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: mydc\n h1:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi1.host.test\n datacenterId: ${dc.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing vNic can be [imported][docs-import] into this resource\nvia supplying the vNic's ID. An example is below:\n\n[docs-import]: /docs/import/index.html\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\n```\n```python\nimport pulumi\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n }\n}\n```\n```yaml\n{}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe above would import the vnic `vmk2` from host with ID `host-123`.\n", + "description": "Provides a VMware vSphere vnic resource.\n\n## Example Usage\n\n### S\n\n### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst dc = vsphere.getDatacenter({\n name: \"mydc\",\n});\nconst h1 = dc.then(dc =\u003e vsphere.getHost({\n name: \"esxi1.host.test\",\n datacenterId: dc.id,\n}));\nconst d1 = new vsphere.DistributedVirtualSwitch(\"d1\", {\n datacenterId: dc.then(dc =\u003e dc.id),\n hosts: [{\n hostSystemId: h1.then(h1 =\u003e h1.id),\n devices: [\"vnic3\"],\n }],\n});\nconst p1 = new vsphere.DistributedPortGroup(\"p1\", {\n vlanId: 1234,\n distributedVirtualSwitchUuid: d1.id,\n});\nconst v1 = new vsphere.Vnic(\"v1\", {\n host: h1.then(h1 =\u003e h1.id),\n distributedSwitchPort: d1.id,\n distributedPortGroup: p1.id,\n ipv4: {\n dhcp: true,\n },\n netstack: \"vmotion\",\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndc = vsphere.get_datacenter(name=\"mydc\")\nh1 = vsphere.get_host(name=\"esxi1.host.test\",\n datacenter_id=dc.id)\nd1 = vsphere.DistributedVirtualSwitch(\"d1\",\n datacenter_id=dc.id,\n hosts=[vsphere.DistributedVirtualSwitchHostArgs(\n host_system_id=h1.id,\n devices=[\"vnic3\"],\n )])\np1 = vsphere.DistributedPortGroup(\"p1\",\n vlan_id=1234,\n distributed_virtual_switch_uuid=d1.id)\nv1 = vsphere.Vnic(\"v1\",\n host=h1.id,\n distributed_switch_port=d1.id,\n distributed_port_group=p1.id,\n ipv4=vsphere.VnicIpv4Args(\n dhcp=True,\n ),\n netstack=\"vmotion\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dc = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"mydc\",\n });\n\n var h1 = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi1.host.test\",\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var d1 = new VSphere.DistributedVirtualSwitch(\"d1\", new()\n {\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n Hosts = new[]\n {\n new VSphere.Inputs.DistributedVirtualSwitchHostArgs\n {\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n Devices = new[]\n {\n \"vnic3\",\n },\n },\n },\n });\n\n var p1 = new VSphere.DistributedPortGroup(\"p1\", new()\n {\n VlanId = 1234,\n DistributedVirtualSwitchUuid = d1.Id,\n });\n\n var v1 = new VSphere.Vnic(\"v1\", new()\n {\n Host = h1.Apply(getHostResult =\u003e getHostResult.Id),\n DistributedSwitchPort = d1.Id,\n DistributedPortGroup = p1.Id,\n Ipv4 = new VSphere.Inputs.VnicIpv4Args\n {\n Dhcp = true,\n },\n Netstack = \"vmotion\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdc, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"mydc\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th1, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi1.host.test\"),\n\t\t\tDatacenterId: dc.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\td1, err := vsphere.NewDistributedVirtualSwitch(ctx, \"d1\", \u0026vsphere.DistributedVirtualSwitchArgs{\n\t\t\tDatacenterId: pulumi.String(dc.Id),\n\t\t\tHosts: vsphere.DistributedVirtualSwitchHostArray{\n\t\t\t\t\u0026vsphere.DistributedVirtualSwitchHostArgs{\n\t\t\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t\t\t\tDevices: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"vnic3\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := vsphere.NewDistributedPortGroup(ctx, \"p1\", \u0026vsphere.DistributedPortGroupArgs{\n\t\t\tVlanId: pulumi.Int(1234),\n\t\t\tDistributedVirtualSwitchUuid: d1.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewVnic(ctx, \"v1\", \u0026vsphere.VnicArgs{\n\t\t\tHost: pulumi.String(h1.Id),\n\t\t\tDistributedSwitchPort: d1.ID(),\n\t\t\tDistributedPortGroup: p1.ID(),\n\t\t\tIpv4: \u0026vsphere.VnicIpv4Args{\n\t\t\t\tDhcp: pulumi.Bool(true),\n\t\t\t},\n\t\t\tNetstack: pulumi.String(\"vmotion\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.DistributedVirtualSwitch;\nimport com.pulumi.vsphere.DistributedVirtualSwitchArgs;\nimport com.pulumi.vsphere.inputs.DistributedVirtualSwitchHostArgs;\nimport com.pulumi.vsphere.DistributedPortGroup;\nimport com.pulumi.vsphere.DistributedPortGroupArgs;\nimport com.pulumi.vsphere.Vnic;\nimport com.pulumi.vsphere.VnicArgs;\nimport com.pulumi.vsphere.inputs.VnicIpv4Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var dc = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"mydc\")\n .build());\n\n final var h1 = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi1.host.test\")\n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var d1 = new DistributedVirtualSwitch(\"d1\", DistributedVirtualSwitchArgs.builder() \n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .hosts(DistributedVirtualSwitchHostArgs.builder()\n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .devices(\"vnic3\")\n .build())\n .build());\n\n var p1 = new DistributedPortGroup(\"p1\", DistributedPortGroupArgs.builder() \n .vlanId(1234)\n .distributedVirtualSwitchUuid(d1.id())\n .build());\n\n var v1 = new Vnic(\"v1\", VnicArgs.builder() \n .host(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .distributedSwitchPort(d1.id())\n .distributedPortGroup(p1.id())\n .ipv4(VnicIpv4Args.builder()\n .dhcp(true)\n .build())\n .netstack(\"vmotion\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n d1:\n type: vsphere:DistributedVirtualSwitch\n properties:\n datacenterId: ${dc.id}\n hosts:\n - hostSystemId: ${h1.id}\n devices:\n - vnic3\n p1:\n type: vsphere:DistributedPortGroup\n properties:\n vlanId: 1234\n distributedVirtualSwitchUuid: ${d1.id}\n v1:\n type: vsphere:Vnic\n properties:\n host: ${h1.id}\n distributedSwitchPort: ${d1.id}\n distributedPortGroup: ${p1.id}\n ipv4:\n dhcp: true\n netstack: vmotion\nvariables:\n dc:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: mydc\n h1:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi1.host.test\n datacenterId: ${dc.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a vnic attached to a portgroup using the default TCP/IP stack\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as vsphere from \"@pulumi/vsphere\";\n\nconst dc = vsphere.getDatacenter({\n name: \"mydc\",\n});\nconst h1 = dc.then(dc =\u003e vsphere.getHost({\n name: \"esxi1.host.test\",\n datacenterId: dc.id,\n}));\nconst hvs1 = new vsphere.HostVirtualSwitch(\"hvs1\", {\n hostSystemId: h1.then(h1 =\u003e h1.id),\n networkAdapters: [\n \"vmnic3\",\n \"vmnic4\",\n ],\n activeNics: [\"vmnic3\"],\n standbyNics: [\"vmnic4\"],\n});\nconst p1 = new vsphere.HostPortGroup(\"p1\", {\n virtualSwitchName: hvs1.name,\n hostSystemId: h1.then(h1 =\u003e h1.id),\n});\nconst v1 = new vsphere.Vnic(\"v1\", {\n host: h1.then(h1 =\u003e h1.id),\n portgroup: p1.name,\n ipv4: {\n dhcp: true,\n },\n services: [\n \"vsan\",\n \"management\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndc = vsphere.get_datacenter(name=\"mydc\")\nh1 = vsphere.get_host(name=\"esxi1.host.test\",\n datacenter_id=dc.id)\nhvs1 = vsphere.HostVirtualSwitch(\"hvs1\",\n host_system_id=h1.id,\n network_adapters=[\n \"vmnic3\",\n \"vmnic4\",\n ],\n active_nics=[\"vmnic3\"],\n standby_nics=[\"vmnic4\"])\np1 = vsphere.HostPortGroup(\"p1\",\n virtual_switch_name=hvs1.name,\n host_system_id=h1.id)\nv1 = vsphere.Vnic(\"v1\",\n host=h1.id,\n portgroup=p1.name,\n ipv4=vsphere.VnicIpv4Args(\n dhcp=True,\n ),\n services=[\n \"vsan\",\n \"management\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing VSphere = Pulumi.VSphere;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dc = VSphere.GetDatacenter.Invoke(new()\n {\n Name = \"mydc\",\n });\n\n var h1 = VSphere.GetHost.Invoke(new()\n {\n Name = \"esxi1.host.test\",\n DatacenterId = dc.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hvs1 = new VSphere.HostVirtualSwitch(\"hvs1\", new()\n {\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n NetworkAdapters = new[]\n {\n \"vmnic3\",\n \"vmnic4\",\n },\n ActiveNics = new[]\n {\n \"vmnic3\",\n },\n StandbyNics = new[]\n {\n \"vmnic4\",\n },\n });\n\n var p1 = new VSphere.HostPortGroup(\"p1\", new()\n {\n VirtualSwitchName = hvs1.Name,\n HostSystemId = h1.Apply(getHostResult =\u003e getHostResult.Id),\n });\n\n var v1 = new VSphere.Vnic(\"v1\", new()\n {\n Host = h1.Apply(getHostResult =\u003e getHostResult.Id),\n Portgroup = p1.Name,\n Ipv4 = new VSphere.Inputs.VnicIpv4Args\n {\n Dhcp = true,\n },\n Services = new[]\n {\n \"vsan\",\n \"management\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdc, err := vsphere.LookupDatacenter(ctx, \u0026vsphere.LookupDatacenterArgs{\n\t\t\tName: pulumi.StringRef(\"mydc\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\th1, err := vsphere.LookupHost(ctx, \u0026vsphere.LookupHostArgs{\n\t\t\tName: pulumi.StringRef(\"esxi1.host.test\"),\n\t\t\tDatacenterId: dc.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\thvs1, err := vsphere.NewHostVirtualSwitch(ctx, \"hvs1\", \u0026vsphere.HostVirtualSwitchArgs{\n\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t\tNetworkAdapters: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic3\"),\n\t\t\t\tpulumi.String(\"vmnic4\"),\n\t\t\t},\n\t\t\tActiveNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic3\"),\n\t\t\t},\n\t\t\tStandbyNics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vmnic4\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp1, err := vsphere.NewHostPortGroup(ctx, \"p1\", \u0026vsphere.HostPortGroupArgs{\n\t\t\tVirtualSwitchName: hvs1.Name,\n\t\t\tHostSystemId: pulumi.String(h1.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewVnic(ctx, \"v1\", \u0026vsphere.VnicArgs{\n\t\t\tHost: pulumi.String(h1.Id),\n\t\t\tPortgroup: p1.Name,\n\t\t\tIpv4: \u0026vsphere.VnicIpv4Args{\n\t\t\t\tDhcp: pulumi.Bool(true),\n\t\t\t},\n\t\t\tServices: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"vsan\"),\n\t\t\t\tpulumi.String(\"management\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.vsphere.VsphereFunctions;\nimport com.pulumi.vsphere.inputs.GetDatacenterArgs;\nimport com.pulumi.vsphere.inputs.GetHostArgs;\nimport com.pulumi.vsphere.HostVirtualSwitch;\nimport com.pulumi.vsphere.HostVirtualSwitchArgs;\nimport com.pulumi.vsphere.HostPortGroup;\nimport com.pulumi.vsphere.HostPortGroupArgs;\nimport com.pulumi.vsphere.Vnic;\nimport com.pulumi.vsphere.VnicArgs;\nimport com.pulumi.vsphere.inputs.VnicIpv4Args;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var dc = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()\n .name(\"mydc\")\n .build());\n\n final var h1 = VsphereFunctions.getHost(GetHostArgs.builder()\n .name(\"esxi1.host.test\")\n .datacenterId(dc.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var hvs1 = new HostVirtualSwitch(\"hvs1\", HostVirtualSwitchArgs.builder() \n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .networkAdapters( \n \"vmnic3\",\n \"vmnic4\")\n .activeNics(\"vmnic3\")\n .standbyNics(\"vmnic4\")\n .build());\n\n var p1 = new HostPortGroup(\"p1\", HostPortGroupArgs.builder() \n .virtualSwitchName(hvs1.name())\n .hostSystemId(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .build());\n\n var v1 = new Vnic(\"v1\", VnicArgs.builder() \n .host(h1.applyValue(getHostResult -\u003e getHostResult.id()))\n .portgroup(p1.name())\n .ipv4(VnicIpv4Args.builder()\n .dhcp(true)\n .build())\n .services( \n \"vsan\",\n \"management\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hvs1:\n type: vsphere:HostVirtualSwitch\n properties:\n hostSystemId: ${h1.id}\n networkAdapters:\n - vmnic3\n - vmnic4\n activeNics:\n - vmnic3\n standbyNics:\n - vmnic4\n p1:\n type: vsphere:HostPortGroup\n properties:\n virtualSwitchName: ${hvs1.name}\n hostSystemId: ${h1.id}\n v1:\n type: vsphere:Vnic\n properties:\n host: ${h1.id}\n portgroup: ${p1.name}\n ipv4:\n dhcp: true\n services:\n - vsan\n - management\nvariables:\n dc:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: mydc\n h1:\n fn::invoke:\n Function: vsphere:getHost\n Arguments:\n name: esxi1.host.test\n datacenterId: ${dc.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Importing\n\nAn existing vNic can be [imported][docs-import] into this resource\nvia supplying the vNic's ID. An example is below:\n\n[docs-import]: /docs/import/index.html\n\n```\nterraform import vsphere_vnic.v1 host-123_vmk2\n```\n\nThe above would import the vnic `vmk2` from host with ID `host-123`.\n", "properties": { "distributedPortGroup": { "type": "string", diff --git a/provider/go.mod b/provider/go.mod index d572e41d..d7d203c7 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -13,7 +13,7 @@ replace ( require ( github.com/hashicorp/terraform-provider-vsphere v2.3.1+incompatible - github.com/pulumi/pulumi-terraform-bridge/v3 v3.79.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.80.0 github.com/pulumi/pulumi/sdk/v3 v3.112.0 ) @@ -93,7 +93,7 @@ require ( github.com/golang-jwt/jwt/v5 v5.1.0 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 7bfadd60..a84ff692 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1976,8 +1976,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -2801,8 +2802,8 @@ github.com/pulumi/providertest v0.0.11 h1:mg8MQ7Cq7+9XlHIkBD+aCqQO4mwAJEISngZgVd github.com/pulumi/providertest v0.0.11/go.mod h1:HsxjVsytcMIuNj19w1lT2W0QXY0oReXl1+h6eD2JXP8= github.com/pulumi/pulumi-java/pkg v0.10.0 h1:D1i5MiiNrxYr2uJ1szcj1aQwF9DYv7TTsPmajB9dKSw= github.com/pulumi/pulumi-java/pkg v0.10.0/go.mod h1:xu6UgYtQm+xXOo1/DZNa2CWVPytu+RMkZVTtI7w7ffY= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.79.0 h1:h0HlgUsqaQAe57/+AP9kbhHo5SLI0uwl8lstjVG+I9U= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.79.0/go.mod h1:U5CqG4BJmdzCd4ALO2cx/dEP0yTHfIS2sk2ah1ngZq4= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.80.0 h1:A+LvNkIIPYokCyGJG6eO+rlZge1my/Bj7ouZbiwC7AM= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.80.0/go.mod h1:VzIl/lDqPfHpYq2UQQvY6YHeSXwt0+riqc8eNpK+ElA= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= github.com/pulumi/pulumi-yaml v1.6.0 h1:mb/QkebWXTa1fR+P3ZkCCHGXOYC6iTN8X8By9eNz8xM= diff --git a/sdk/dotnet/ComputeClusterVmAffinityRule.cs b/sdk/dotnet/ComputeClusterVmAffinityRule.cs index 2998fe46..75c6fd7b 100644 --- a/sdk/dotnet/ComputeClusterVmAffinityRule.cs +++ b/sdk/dotnet/ComputeClusterVmAffinityRule.cs @@ -164,6 +164,13 @@ namespace Pulumi.VSphere /// }); /// ``` /// <!--End PulumiCodeChooser --> + /// + /// ## Importing + /// + /// An existing rule can be imported into this resource by supplying + /// both the path to the cluster, and the name the rule. If the name or cluster is + /// not found, or if the rule is of a different type, an error will be returned. An + /// example is below: /// [VSphereResourceType("vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule")] public partial class ComputeClusterVmAffinityRule : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Datacenter.cs b/sdk/dotnet/Datacenter.cs index 9a216d54..8ff42e2b 100644 --- a/sdk/dotnet/Datacenter.cs +++ b/sdk/dotnet/Datacenter.cs @@ -51,6 +51,15 @@ namespace Pulumi.VSphere /// }); /// ``` /// <!--End PulumiCodeChooser --> + /// + /// ## Importing + /// + /// An existing datacenter can be [imported][docs-import] into this resource + /// via supplying the full path to the datacenter. An example is below: + /// + /// [docs-import]: /docs/import/index.html + /// + /// The above would import the datacenter named `dc1`. /// [VSphereResourceType("vsphere:index/datacenter:Datacenter")] public partial class Datacenter : global::Pulumi.CustomResource diff --git a/sdk/dotnet/DatastoreCluster.cs b/sdk/dotnet/DatastoreCluster.cs index 0c22b050..5286484c 100644 --- a/sdk/dotnet/DatastoreCluster.cs +++ b/sdk/dotnet/DatastoreCluster.cs @@ -140,7 +140,7 @@ public partial class DatastoreCluster : global::Pulumi.CustomResource /// recommendations to move VMs off of a datastore. Note that this setting should /// only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate /// estimate of the capacity of the datastores in your cluster, and should be set - /// to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + /// to roughly 50-60% of the worst case peak performance of the backing LUNs. /// [Output("sdrsIoReservableIopsThreshold")] public Output SdrsIoReservableIopsThreshold { get; private set; } = null!; @@ -400,7 +400,7 @@ public InputMap SdrsAdvancedOptions /// recommendations to move VMs off of a datastore. Note that this setting should /// only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate /// estimate of the capacity of the datastores in your cluster, and should be set - /// to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + /// to roughly 50-60% of the worst case peak performance of the backing LUNs. /// [Input("sdrsIoReservableIopsThreshold")] public Input? SdrsIoReservableIopsThreshold { get; set; } @@ -628,7 +628,7 @@ public InputMap SdrsAdvancedOptions /// recommendations to move VMs off of a datastore. Note that this setting should /// only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate /// estimate of the capacity of the datastores in your cluster, and should be set - /// to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + /// to roughly 50-60% of the worst case peak performance of the backing LUNs. /// [Input("sdrsIoReservableIopsThreshold")] public Input? SdrsIoReservableIopsThreshold { get; set; } diff --git a/sdk/dotnet/DistributedVirtualSwitch.cs b/sdk/dotnet/DistributedVirtualSwitch.cs index a178613b..5f094f3d 100644 --- a/sdk/dotnet/DistributedVirtualSwitch.cs +++ b/sdk/dotnet/DistributedVirtualSwitch.cs @@ -434,8 +434,7 @@ public partial class DistributedVirtualSwitch : global::Pulumi.CustomResource /// The ratio of total number of packets to /// the number of packets analyzed. The default is `0`, which indicates that the /// VDS should analyze all packets. The maximum value is `1000`, which - /// indicates an analysis rate of 0.001%! - /// (MISSING) + /// indicates an analysis rate of 0.001%. /// [Output("netflowSamplingRate")] public Output NetflowSamplingRate { get; private set; } = null!; @@ -1169,8 +1168,7 @@ public InputList Hosts /// The ratio of total number of packets to /// the number of packets analyzed. The default is `0`, which indicates that the /// VDS should analyze all packets. The maximum value is `1000`, which - /// indicates an analysis rate of 0.001%! - /// (MISSING) + /// indicates an analysis rate of 0.001%. /// [Input("netflowSamplingRate")] public Input? NetflowSamplingRate { get; set; } @@ -1903,8 +1901,7 @@ public InputList Hosts /// The ratio of total number of packets to /// the number of packets analyzed. The default is `0`, which indicates that the /// VDS should analyze all packets. The maximum value is `1000`, which - /// indicates an analysis rate of 0.001%! - /// (MISSING) + /// indicates an analysis rate of 0.001%. /// [Input("netflowSamplingRate")] public Input? NetflowSamplingRate { get; set; } diff --git a/sdk/dotnet/Host.cs b/sdk/dotnet/Host.cs index a5641d4d..10d71932 100644 --- a/sdk/dotnet/Host.cs +++ b/sdk/dotnet/Host.cs @@ -100,18 +100,6 @@ namespace Pulumi.VSphere /// /// [docs-import]: /docs/import/index.html /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// The above would import the host with ID `host-123`. /// [VSphereResourceType("vsphere:index/host:Host")] diff --git a/sdk/dotnet/HostPortGroup.cs b/sdk/dotnet/HostPortGroup.cs index accf671c..c46b6150 100644 --- a/sdk/dotnet/HostPortGroup.cs +++ b/sdk/dotnet/HostPortGroup.cs @@ -134,18 +134,6 @@ namespace Pulumi.VSphere /// An existing host port group can be imported into this resource /// using the host port group's ID. An example is below: /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// The above would import the `management` host port group from host with ID `host-123`. /// [VSphereResourceType("vsphere:index/hostPortGroup:HostPortGroup")] diff --git a/sdk/dotnet/ResourcePool.cs b/sdk/dotnet/ResourcePool.cs index 68f03e27..9983372b 100644 --- a/sdk/dotnet/ResourcePool.cs +++ b/sdk/dotnet/ResourcePool.cs @@ -111,6 +111,20 @@ namespace Pulumi.VSphere /// }); /// ``` /// <!--End PulumiCodeChooser --> + /// + /// ## Importing + /// + /// An existing resource pool can be imported into this resource via + /// the path to the resource pool, using the following command: + /// + /// The above would import the resource pool named `resource-pool-01` that is located + /// in the compute cluster `cluster-01` in the `dc-01` datacenter. + /// + /// ### Settings that Require vSphere 7.0 or higher + /// + /// These settings require vSphere 7.0 or higher: + /// + /// * `scale_descendants_shares` /// [VSphereResourceType("vsphere:index/resourcePool:ResourcePool")] public partial class ResourcePool : global::Pulumi.CustomResource diff --git a/sdk/dotnet/VirtualMachine.cs b/sdk/dotnet/VirtualMachine.cs index f48826e0..36b1106c 100644 --- a/sdk/dotnet/VirtualMachine.cs +++ b/sdk/dotnet/VirtualMachine.cs @@ -394,7 +394,7 @@ public partial class VirtualMachine : global::Pulumi.CustomResource /// /// Triggers replacement of resource whenever it changes. /// - /// For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + /// For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) /// [Output("replaceTrigger")] public Output ReplaceTrigger { get; private set; } = null!; @@ -997,7 +997,7 @@ public InputList PciDeviceIds /// /// Triggers replacement of resource whenever it changes. /// - /// For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + /// For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) /// [Input("replaceTrigger")] public Input? ReplaceTrigger { get; set; } @@ -1592,7 +1592,7 @@ public InputList PciDeviceIds /// /// Triggers replacement of resource whenever it changes. /// - /// For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + /// For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) /// [Input("replaceTrigger")] public Input? ReplaceTrigger { get; set; } diff --git a/sdk/dotnet/Vnic.cs b/sdk/dotnet/Vnic.cs index 20fc0b41..485f725d 100644 --- a/sdk/dotnet/Vnic.cs +++ b/sdk/dotnet/Vnic.cs @@ -148,18 +148,6 @@ namespace Pulumi.VSphere /// /// [docs-import]: /docs/import/index.html /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// The above would import the vnic `vmk2` from host with ID `host-123`. /// [VSphereResourceType("vsphere:index/vnic:Vnic")] diff --git a/sdk/go/vsphere/computeClusterVmAffinityRule.go b/sdk/go/vsphere/computeClusterVmAffinityRule.go index abc81720..9677d426 100644 --- a/sdk/go/vsphere/computeClusterVmAffinityRule.go +++ b/sdk/go/vsphere/computeClusterVmAffinityRule.go @@ -177,6 +177,13 @@ import ( // // ``` // +// +// ## Importing +// +// An existing rule can be imported into this resource by supplying +// both the path to the cluster, and the name the rule. If the name or cluster is +// not found, or if the rule is of a different type, an error will be returned. An +// example is below: type ComputeClusterVmAffinityRule struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/datacenter.go b/sdk/go/vsphere/datacenter.go index 248afe58..432b5dad 100644 --- a/sdk/go/vsphere/datacenter.go +++ b/sdk/go/vsphere/datacenter.go @@ -69,6 +69,15 @@ import ( // // ``` // +// +// ## Importing +// +// An existing datacenter can be [imported][docs-import] into this resource +// via supplying the full path to the datacenter. An example is below: +// +// [docs-import]: /docs/import/index.html +// +// The above would import the datacenter named `dc1`. type Datacenter struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/datastoreCluster.go b/sdk/go/vsphere/datastoreCluster.go index b66b3797..49e0fbdf 100644 --- a/sdk/go/vsphere/datastoreCluster.go +++ b/sdk/go/vsphere/datastoreCluster.go @@ -82,7 +82,7 @@ type DatastoreCluster struct { // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set - // to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + // to roughly 50-60% of the worst case peak performance of the backing LUNs. SdrsIoReservableIopsThreshold pulumi.IntPtrOutput `pulumi:"sdrsIoReservableIopsThreshold"` // The threshold, in // percent, of actual estimated performance of the datastore (in IOPS) that @@ -219,7 +219,7 @@ type datastoreClusterState struct { // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set - // to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + // to roughly 50-60% of the worst case peak performance of the backing LUNs. SdrsIoReservableIopsThreshold *int `pulumi:"sdrsIoReservableIopsThreshold"` // The threshold, in // percent, of actual estimated performance of the datastore (in IOPS) that @@ -324,7 +324,7 @@ type DatastoreClusterState struct { // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set - // to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + // to roughly 50-60% of the worst case peak performance of the backing LUNs. SdrsIoReservableIopsThreshold pulumi.IntPtrInput // The threshold, in // percent, of actual estimated performance of the datastore (in IOPS) that @@ -433,7 +433,7 @@ type datastoreClusterArgs struct { // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set - // to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + // to roughly 50-60% of the worst case peak performance of the backing LUNs. SdrsIoReservableIopsThreshold *int `pulumi:"sdrsIoReservableIopsThreshold"` // The threshold, in // percent, of actual estimated performance of the datastore (in IOPS) that @@ -539,7 +539,7 @@ type DatastoreClusterArgs struct { // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set - // to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + // to roughly 50-60% of the worst case peak performance of the backing LUNs. SdrsIoReservableIopsThreshold pulumi.IntPtrInput // The threshold, in // percent, of actual estimated performance of the datastore (in IOPS) that @@ -775,7 +775,7 @@ func (o DatastoreClusterOutput) SdrsIoLoadImbalanceThreshold() pulumi.IntPtrOutp // recommendations to move VMs off of a datastore. Note that this setting should // only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate // estimate of the capacity of the datastores in your cluster, and should be set -// to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. +// to roughly 50-60% of the worst case peak performance of the backing LUNs. func (o DatastoreClusterOutput) SdrsIoReservableIopsThreshold() pulumi.IntPtrOutput { return o.ApplyT(func(v *DatastoreCluster) pulumi.IntPtrOutput { return v.SdrsIoReservableIopsThreshold }).(pulumi.IntPtrOutput) } diff --git a/sdk/go/vsphere/distributedVirtualSwitch.go b/sdk/go/vsphere/distributedVirtualSwitch.go index 87852556..bd8aeff7 100644 --- a/sdk/go/vsphere/distributedVirtualSwitch.go +++ b/sdk/go/vsphere/distributedVirtualSwitch.go @@ -192,8 +192,7 @@ type DistributedVirtualSwitch struct { // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which - // indicates an analysis rate of 0.001%! - // (MISSING) + // indicates an analysis rate of 0.001%. NetflowSamplingRate pulumi.IntPtrOutput `pulumi:"netflowSamplingRate"` // Set to `true` to enable // network I/O control. Default: `false`. @@ -527,8 +526,7 @@ type distributedVirtualSwitchState struct { // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which - // indicates an analysis rate of 0.001%! - // (MISSING) + // indicates an analysis rate of 0.001%. NetflowSamplingRate *int `pulumi:"netflowSamplingRate"` // Set to `true` to enable // network I/O control. Default: `false`. @@ -830,8 +828,7 @@ type DistributedVirtualSwitchState struct { // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which - // indicates an analysis rate of 0.001%! - // (MISSING) + // indicates an analysis rate of 0.001%. NetflowSamplingRate pulumi.IntPtrInput // Set to `true` to enable // network I/O control. Default: `false`. @@ -1134,8 +1131,7 @@ type distributedVirtualSwitchArgs struct { // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which - // indicates an analysis rate of 0.001%! - // (MISSING) + // indicates an analysis rate of 0.001%. NetflowSamplingRate *int `pulumi:"netflowSamplingRate"` // Set to `true` to enable // network I/O control. Default: `false`. @@ -1435,8 +1431,7 @@ type DistributedVirtualSwitchArgs struct { // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which - // indicates an analysis rate of 0.001%! - // (MISSING) + // indicates an analysis rate of 0.001%. NetflowSamplingRate pulumi.IntPtrInput // Set to `true` to enable // network I/O control. Default: `false`. @@ -2007,8 +2002,7 @@ func (o DistributedVirtualSwitchOutput) NetflowObservationDomainId() pulumi.IntP // The ratio of total number of packets to // the number of packets analyzed. The default is `0`, which indicates that the // VDS should analyze all packets. The maximum value is `1000`, which -// indicates an analysis rate of 0.001%! -// (MISSING) +// indicates an analysis rate of 0.001%. func (o DistributedVirtualSwitchOutput) NetflowSamplingRate() pulumi.IntPtrOutput { return o.ApplyT(func(v *DistributedVirtualSwitch) pulumi.IntPtrOutput { return v.NetflowSamplingRate }).(pulumi.IntPtrOutput) } diff --git a/sdk/go/vsphere/host.go b/sdk/go/vsphere/host.go index e4c19d3b..db95b0df 100644 --- a/sdk/go/vsphere/host.go +++ b/sdk/go/vsphere/host.go @@ -123,25 +123,6 @@ import ( // // [docs-import]: /docs/import/index.html // -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// // The above would import the host with ID `host-123`. type Host struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/hostPortGroup.go b/sdk/go/vsphere/hostPortGroup.go index b8e3856f..2d9d7053 100644 --- a/sdk/go/vsphere/hostPortGroup.go +++ b/sdk/go/vsphere/hostPortGroup.go @@ -150,25 +150,6 @@ import ( // An existing host port group can be imported into this resource // using the host port group's ID. An example is below: // -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// // The above would import the `management` host port group from host with ID `host-123`. // // [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html diff --git a/sdk/go/vsphere/resourcePool.go b/sdk/go/vsphere/resourcePool.go index 57848b24..33ecc836 100644 --- a/sdk/go/vsphere/resourcePool.go +++ b/sdk/go/vsphere/resourcePool.go @@ -140,6 +140,20 @@ import ( // ``` // // +// ## Importing +// +// An existing resource pool can be imported into this resource via +// the path to the resource pool, using the following command: +// +// The above would import the resource pool named `resource-pool-01` that is located +// in the compute cluster `cluster-01` in the `dc-01` datacenter. +// +// ### Settings that Require vSphere 7.0 or higher +// +// These settings require vSphere 7.0 or higher: +// +// * `scaleDescendantsShares` +// // [ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html type ResourcePool struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/virtualMachine.go b/sdk/go/vsphere/virtualMachine.go index deaa0205..40ec3090 100644 --- a/sdk/go/vsphere/virtualMachine.go +++ b/sdk/go/vsphere/virtualMachine.go @@ -164,7 +164,7 @@ type VirtualMachine struct { RebootRequired pulumi.BoolOutput `pulumi:"rebootRequired"` // Triggers replacement of resource whenever it changes. // - // For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + // For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) ReplaceTrigger pulumi.StringPtrOutput `pulumi:"replaceTrigger"` // The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. // @@ -412,7 +412,7 @@ type virtualMachineState struct { RebootRequired *bool `pulumi:"rebootRequired"` // Triggers replacement of resource whenever it changes. // - // For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + // For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) ReplaceTrigger *string `pulumi:"replaceTrigger"` // The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. // @@ -628,7 +628,7 @@ type VirtualMachineState struct { RebootRequired pulumi.BoolPtrInput // Triggers replacement of resource whenever it changes. // - // For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + // For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) ReplaceTrigger pulumi.StringPtrInput // The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. // @@ -834,7 +834,7 @@ type virtualMachineArgs struct { PoweronTimeout *int `pulumi:"poweronTimeout"` // Triggers replacement of resource whenever it changes. // - // For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + // For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) ReplaceTrigger *string `pulumi:"replaceTrigger"` // The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. // @@ -1029,7 +1029,7 @@ type VirtualMachineArgs struct { PoweronTimeout pulumi.IntPtrInput // Triggers replacement of resource whenever it changes. // - // For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + // For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) ReplaceTrigger pulumi.StringPtrInput // The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. // @@ -1496,7 +1496,7 @@ func (o VirtualMachineOutput) RebootRequired() pulumi.BoolOutput { // Triggers replacement of resource whenever it changes. // -// For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) +// For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) func (o VirtualMachineOutput) ReplaceTrigger() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.ReplaceTrigger }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/vsphere/vnic.go b/sdk/go/vsphere/vnic.go index c7685074..eb1d0d2d 100644 --- a/sdk/go/vsphere/vnic.go +++ b/sdk/go/vsphere/vnic.go @@ -165,25 +165,6 @@ import ( // // [docs-import]: /docs/import/index.html // -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// // The above would import the vnic `vmk2` from host with ID `host-123`. type Vnic struct { pulumi.CustomResourceState diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/ComputeClusterVmAffinityRule.java b/sdk/java/src/main/java/com/pulumi/vsphere/ComputeClusterVmAffinityRule.java index 44927df5..8394f0ad 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/ComputeClusterVmAffinityRule.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/ComputeClusterVmAffinityRule.java @@ -182,6 +182,13 @@ * ``` * <!--End PulumiCodeChooser --> * + * ## Importing + * + * An existing rule can be imported into this resource by supplying + * both the path to the cluster, and the name the rule. If the name or cluster is + * not found, or if the rule is of a different type, an error will be returned. An + * example is below: + * */ @ResourceType(type="vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule") public class ComputeClusterVmAffinityRule extends com.pulumi.resources.CustomResource { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/Datacenter.java b/sdk/java/src/main/java/com/pulumi/vsphere/Datacenter.java index 757433e1..597a7c99 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/Datacenter.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/Datacenter.java @@ -85,6 +85,15 @@ * ``` * <!--End PulumiCodeChooser --> * + * ## Importing + * + * An existing datacenter can be [imported][docs-import] into this resource + * via supplying the full path to the datacenter. An example is below: + * + * [docs-import]: /docs/import/index.html + * + * The above would import the datacenter named `dc1`. + * */ @ResourceType(type="vsphere:index/datacenter:Datacenter") public class Datacenter extends com.pulumi.resources.CustomResource { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreCluster.java b/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreCluster.java index 9e74b110..d8964bba 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreCluster.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreCluster.java @@ -300,7 +300,7 @@ public Output> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ @Export(name="sdrsIoReservableIopsThreshold", refs={Integer.class}, tree="[0]") @@ -312,7 +312,7 @@ public Output> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ public Output> sdrsIoReservableIopsThreshold() { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreClusterArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreClusterArgs.java index 0654313c..ae878520 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreClusterArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/DatastoreClusterArgs.java @@ -315,7 +315,7 @@ public Optional> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ @Import(name="sdrsIoReservableIopsThreshold") @@ -327,7 +327,7 @@ public Optional> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ public Optional> sdrsIoReservableIopsThreshold() { @@ -932,7 +932,7 @@ public Builder sdrsIoLoadImbalanceThreshold(Integer sdrsIoLoadImbalanceThreshold * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * * @return builder * @@ -948,7 +948,7 @@ public Builder sdrsIoReservableIopsThreshold(@Nullable Output sdrsIoRes * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitch.java b/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitch.java index 44ad787e..3098afd4 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitch.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitch.java @@ -985,8 +985,7 @@ public Output> netflowObservationDomainId() { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ @Export(name="netflowSamplingRate", refs={Integer.class}, tree="[0]") @@ -996,8 +995,7 @@ public Output> netflowObservationDomainId() { * @return The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ public Output> netflowSamplingRate() { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitchArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitchArgs.java index a1081738..a82ec6a1 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitchArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/DistributedVirtualSwitchArgs.java @@ -1029,8 +1029,7 @@ public Optional> netflowObservationDomainId() { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ @Import(name="netflowSamplingRate") @@ -1040,8 +1039,7 @@ public Optional> netflowObservationDomainId() { * @return The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ public Optional> netflowSamplingRate() { @@ -3174,8 +3172,7 @@ public Builder netflowObservationDomainId(Integer netflowObservationDomainId) { * @param netflowSamplingRate The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * * @return builder * @@ -3189,8 +3186,7 @@ public Builder netflowSamplingRate(@Nullable Output netflowSamplingRate * @param netflowSamplingRate The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/Host.java b/sdk/java/src/main/java/com/pulumi/vsphere/Host.java index 8c506447..a1dfbdf0 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/Host.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/Host.java @@ -136,31 +136,6 @@ * * [docs-import]: /docs/import/index.html * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * 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) { - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * The above would import the host with ID `host-123`. * */ diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/HostPortGroup.java b/sdk/java/src/main/java/com/pulumi/vsphere/HostPortGroup.java index c555869e..3a6c1a34 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/HostPortGroup.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/HostPortGroup.java @@ -158,31 +158,6 @@ * An existing host port group can be imported into this resource * using the host port group's ID. An example is below: * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * 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) { - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * The above would import the `management` host port group from host with ID `host-123`. * */ diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/ResourcePool.java b/sdk/java/src/main/java/com/pulumi/vsphere/ResourcePool.java index 5d9e43ec..4c74e060 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/ResourcePool.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/ResourcePool.java @@ -161,6 +161,20 @@ * ``` * <!--End PulumiCodeChooser --> * + * ## Importing + * + * An existing resource pool can be imported into this resource via + * the path to the resource pool, using the following command: + * + * The above would import the resource pool named `resource-pool-01` that is located + * in the compute cluster `cluster-01` in the `dc-01` datacenter. + * + * ### Settings that Require vSphere 7.0 or higher + * + * These settings require vSphere 7.0 or higher: + * + * * `scale_descendants_shares` + * */ @ResourceType(type="vsphere:index/resourcePool:ResourcePool") public class ResourcePool extends com.pulumi.resources.CustomResource { 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 1798abc5..4775e9a6 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachine.java @@ -903,7 +903,7 @@ public Output rebootRequired() { /** * Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ @Export(name="replaceTrigger", refs={String.class}, tree="[0]") @@ -912,7 +912,7 @@ public Output rebootRequired() { /** * @return Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ public Output> replaceTrigger() { 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 b1da820b..52016d50 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualMachineArgs.java @@ -856,7 +856,7 @@ public Optional> poweronTimeout() { /** * Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ @Import(name="replaceTrigger") @@ -865,7 +865,7 @@ public Optional> poweronTimeout() { /** * @return Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ public Optional> replaceTrigger() { @@ -2519,7 +2519,7 @@ public Builder poweronTimeout(Integer poweronTimeout) { /** * @param replaceTrigger Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * * @return builder * @@ -2532,7 +2532,7 @@ public Builder replaceTrigger(@Nullable Output replaceTrigger) { /** * @param replaceTrigger Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/Vnic.java b/sdk/java/src/main/java/com/pulumi/vsphere/Vnic.java index 7436992d..cbbf0069 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/Vnic.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/Vnic.java @@ -173,31 +173,6 @@ * * [docs-import]: /docs/import/index.html * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * 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) { - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * The above would import the vnic `vmk2` from host with ID `host-123`. * */ diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DatastoreClusterState.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DatastoreClusterState.java index e508d65e..957801dd 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DatastoreClusterState.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DatastoreClusterState.java @@ -314,7 +314,7 @@ public Optional> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ @Import(name="sdrsIoReservableIopsThreshold") @@ -326,7 +326,7 @@ public Optional> sdrsIoLoadImbalanceThreshold() { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * */ public Optional> sdrsIoReservableIopsThreshold() { @@ -931,7 +931,7 @@ public Builder sdrsIoLoadImbalanceThreshold(Integer sdrsIoLoadImbalanceThreshold * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * * @return builder * @@ -947,7 +947,7 @@ public Builder sdrsIoReservableIopsThreshold(@Nullable Output sdrsIoRes * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DistributedVirtualSwitchState.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DistributedVirtualSwitchState.java index ce6cbfec..2139e4a4 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DistributedVirtualSwitchState.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/DistributedVirtualSwitchState.java @@ -1045,8 +1045,7 @@ public Optional> netflowObservationDomainId() { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ @Import(name="netflowSamplingRate") @@ -1056,8 +1055,7 @@ public Optional> netflowObservationDomainId() { * @return The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * */ public Optional> netflowSamplingRate() { @@ -3214,8 +3212,7 @@ public Builder netflowObservationDomainId(Integer netflowObservationDomainId) { * @param netflowSamplingRate The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * * @return builder * @@ -3229,8 +3226,7 @@ public Builder netflowSamplingRate(@Nullable Output netflowSamplingRate * @param netflowSamplingRate The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. * * @return builder * 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 7e4cb03e..ec50b116 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 @@ -960,7 +960,7 @@ public Optional> rebootRequired() { /** * Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ @Import(name="replaceTrigger") @@ -969,7 +969,7 @@ public Optional> rebootRequired() { /** * @return Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * */ public Optional> replaceTrigger() { @@ -2851,7 +2851,7 @@ public Builder rebootRequired(Boolean rebootRequired) { /** * @param replaceTrigger Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * * @return builder * @@ -2864,7 +2864,7 @@ public Builder replaceTrigger(@Nullable Output replaceTrigger) { /** * @param replaceTrigger Triggers replacement of resource whenever it changes. * - * For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) * * @return builder * diff --git a/sdk/nodejs/computeClusterVmAffinityRule.ts b/sdk/nodejs/computeClusterVmAffinityRule.ts index 7944a423..6ac72d8a 100644 --- a/sdk/nodejs/computeClusterVmAffinityRule.ts +++ b/sdk/nodejs/computeClusterVmAffinityRule.ts @@ -111,6 +111,13 @@ import * as utilities from "./utilities"; * }); * ``` * + * + * ## Importing + * + * An existing rule can be imported into this resource by supplying + * both the path to the cluster, and the name the rule. If the name or cluster is + * not found, or if the rule is of a different type, an error will be returned. An + * example is below: */ export class ComputeClusterVmAffinityRule extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/datacenter.ts b/sdk/nodejs/datacenter.ts index 4ff9225e..871ecb00 100644 --- a/sdk/nodejs/datacenter.ts +++ b/sdk/nodejs/datacenter.ts @@ -31,6 +31,15 @@ import * as utilities from "./utilities"; * const researchDatacenter = new vsphere.Datacenter("researchDatacenter", {folder: "/research/"}); * ``` * + * + * ## Importing + * + * An existing datacenter can be [imported][docs-import] into this resource + * via supplying the full path to the datacenter. An example is below: + * + * [docs-import]: /docs/import/index.html + * + * The above would import the datacenter named `dc1`. */ export class Datacenter extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/datastoreCluster.ts b/sdk/nodejs/datastoreCluster.ts index 531cb05a..1bd8eabe 100644 --- a/sdk/nodejs/datastoreCluster.ts +++ b/sdk/nodejs/datastoreCluster.ts @@ -130,7 +130,7 @@ export class DatastoreCluster extends pulumi.CustomResource { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. */ public readonly sdrsIoReservableIopsThreshold!: pulumi.Output; /** @@ -361,7 +361,7 @@ export interface DatastoreClusterState { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. */ sdrsIoReservableIopsThreshold?: pulumi.Input; /** @@ -519,7 +519,7 @@ export interface DatastoreClusterArgs { * recommendations to move VMs off of a datastore. Note that this setting should * only be set if `sdrsIoReservablePercentThreshold` cannot make an accurate * estimate of the capacity of the datastores in your cluster, and should be set - * to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + * to roughly 50-60% of the worst case peak performance of the backing LUNs. */ sdrsIoReservableIopsThreshold?: pulumi.Input; /** diff --git a/sdk/nodejs/distributedVirtualSwitch.ts b/sdk/nodejs/distributedVirtualSwitch.ts index 7e659d52..42966324 100644 --- a/sdk/nodejs/distributedVirtualSwitch.ts +++ b/sdk/nodejs/distributedVirtualSwitch.ts @@ -334,8 +334,7 @@ export class DistributedVirtualSwitch extends pulumi.CustomResource { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. */ public readonly netflowSamplingRate!: pulumi.Output; /** @@ -1029,8 +1028,7 @@ export interface DistributedVirtualSwitchState { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. */ netflowSamplingRate?: pulumi.Input; /** @@ -1506,8 +1504,7 @@ export interface DistributedVirtualSwitchArgs { * The ratio of total number of packets to * the number of packets analyzed. The default is `0`, which indicates that the * VDS should analyze all packets. The maximum value is `1000`, which - * indicates an analysis rate of 0.001%! - * (MISSING) + * indicates an analysis rate of 0.001%. */ netflowSamplingRate?: pulumi.Input; /** diff --git a/sdk/nodejs/host.ts b/sdk/nodejs/host.ts index e6b93005..0f9d25c3 100644 --- a/sdk/nodejs/host.ts +++ b/sdk/nodejs/host.ts @@ -71,12 +71,6 @@ import * as utilities from "./utilities"; * * [docs-import]: /docs/import/index.html * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * * The above would import the host with ID `host-123`. */ export class Host extends pulumi.CustomResource { diff --git a/sdk/nodejs/hostPortGroup.ts b/sdk/nodejs/hostPortGroup.ts index ff3c4533..c5a784f8 100644 --- a/sdk/nodejs/hostPortGroup.ts +++ b/sdk/nodejs/hostPortGroup.ts @@ -91,12 +91,6 @@ import * as utilities from "./utilities"; * An existing host port group can be imported into this resource * using the host port group's ID. An example is below: * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * * The above would import the `management` host port group from host with ID `host-123`. */ export class HostPortGroup extends pulumi.CustomResource { diff --git a/sdk/nodejs/resourcePool.ts b/sdk/nodejs/resourcePool.ts index b5aa04f3..9adab074 100644 --- a/sdk/nodejs/resourcePool.ts +++ b/sdk/nodejs/resourcePool.ts @@ -67,6 +67,20 @@ import * as utilities from "./utilities"; * const resourcePoolChild = new vsphere.ResourcePool("resourcePoolChild", {parentResourcePoolId: resourcePoolParent.id}); * ``` * + * + * ## Importing + * + * An existing resource pool can be imported into this resource via + * the path to the resource pool, using the following command: + * + * The above would import the resource pool named `resource-pool-01` that is located + * in the compute cluster `cluster-01` in the `dc-01` datacenter. + * + * ### Settings that Require vSphere 7.0 or higher + * + * These settings require vSphere 7.0 or higher: + * + * * `scaleDescendantsShares` */ export class ResourcePool extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/virtualMachine.ts b/sdk/nodejs/virtualMachine.ts index f741dc60..42266c7a 100644 --- a/sdk/nodejs/virtualMachine.ts +++ b/sdk/nodejs/virtualMachine.ts @@ -300,7 +300,7 @@ export class VirtualMachine extends pulumi.CustomResource { /** * Triggers replacement of resource whenever it changes. * - * For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) */ public readonly replaceTrigger!: pulumi.Output; /** @@ -886,7 +886,7 @@ export interface VirtualMachineState { /** * Triggers replacement of resource whenever it changes. * - * For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) */ replaceTrigger?: pulumi.Input; /** @@ -1249,7 +1249,7 @@ export interface VirtualMachineArgs { /** * Triggers replacement of resource whenever it changes. * - * For example, `replaceTrigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + * For example, `replaceTrigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) */ replaceTrigger?: pulumi.Input; /** diff --git a/sdk/nodejs/vnic.ts b/sdk/nodejs/vnic.ts index 4a180418..d7c4dc64 100644 --- a/sdk/nodejs/vnic.ts +++ b/sdk/nodejs/vnic.ts @@ -98,12 +98,6 @@ import * as utilities from "./utilities"; * * [docs-import]: /docs/import/index.html * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * * The above would import the vnic `vmk2` from host with ID `host-123`. */ export class Vnic extends pulumi.CustomResource { diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py index b0666044..ab4584bc 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py @@ -318,6 +318,13 @@ def __init__(__self__, ``` + ## Importing + + An existing rule can be imported into this resource by supplying + both the path to the cluster, and the name the rule. If the name or cluster is + not found, or if the rule is of a different type, an error will be returned. An + example is below: + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] compute_cluster_id: The managed object reference @@ -430,6 +437,13 @@ def __init__(__self__, ``` + ## Importing + + An existing rule can be imported into this resource by supplying + both the path to the cluster, and the name the rule. If the name or cluster is + not found, or if the rule is of a different type, an error will be returned. An + example is below: + :param str resource_name: The name of the resource. :param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/datacenter.py b/sdk/python/pulumi_vsphere/datacenter.py index 938b96ef..cd2d9285 100644 --- a/sdk/python/pulumi_vsphere/datacenter.py +++ b/sdk/python/pulumi_vsphere/datacenter.py @@ -261,6 +261,15 @@ def __init__(__self__, ``` + ## Importing + + An existing datacenter can be [imported][docs-import] into this resource + via supplying the full path to the datacenter. An example is below: + + [docs-import]: /docs/import/index.html + + The above would import the datacenter named `dc1`. + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value @@ -315,6 +324,15 @@ def __init__(__self__, ``` + ## Importing + + An existing datacenter can be [imported][docs-import] into this resource + via supplying the full path to the datacenter. An example is below: + + [docs-import]: /docs/import/index.html + + The above would import the datacenter named `dc1`. + :param str resource_name: The name of the resource. :param DatacenterArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/datastore_cluster.py b/sdk/python/pulumi_vsphere/datastore_cluster.py index 04f0dcca..9dc37aaf 100644 --- a/sdk/python/pulumi_vsphere/datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/datastore_cluster.py @@ -93,7 +93,7 @@ def __init__(__self__, *, recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. :param pulumi.Input[int] sdrs_io_reservable_percent_threshold: The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when @@ -390,7 +390,7 @@ def sdrs_io_reservable_iops_threshold(self) -> Optional[pulumi.Input[int]]: recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. """ return pulumi.get(self, "sdrs_io_reservable_iops_threshold") @@ -604,7 +604,7 @@ def __init__(__self__, *, recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. :param pulumi.Input[int] sdrs_io_reservable_percent_threshold: The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when @@ -902,7 +902,7 @@ def sdrs_io_reservable_iops_threshold(self) -> Optional[pulumi.Input[int]]: recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. """ return pulumi.get(self, "sdrs_io_reservable_iops_threshold") @@ -1121,7 +1121,7 @@ def __init__(__self__, recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. :param pulumi.Input[int] sdrs_io_reservable_percent_threshold: The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when @@ -1325,7 +1325,7 @@ def get(resource_name: str, recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. :param pulumi.Input[int] sdrs_io_reservable_percent_threshold: The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make recommendations to move VMs off of a datastore when @@ -1543,7 +1543,7 @@ def sdrs_io_reservable_iops_threshold(self) -> pulumi.Output[Optional[int]]: recommendations to move VMs off of a datastore. Note that this setting should only be set if `sdrs_io_reservable_percent_threshold` cannot make an accurate estimate of the capacity of the datastores in your cluster, and should be set - to roughly 50-60%!o(MISSING)f the worst case peak performance of the backing LUNs. + to roughly 50-60% of the worst case peak performance of the backing LUNs. """ return pulumi.get(self, "sdrs_io_reservable_iops_threshold") diff --git a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py index 32dacfc8..f5f28af4 100644 --- a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py @@ -226,8 +226,7 @@ def __init__(__self__, *, :param pulumi.Input[int] netflow_sampling_rate: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. :param pulumi.Input[bool] network_resource_control_enabled: Set to `true` to enable network I/O control. Default: `false`. :param pulumi.Input[str] network_resource_control_version: The version of network I/O @@ -1268,8 +1267,7 @@ def netflow_sampling_rate(self) -> Optional[pulumi.Input[int]]: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. """ return pulumi.get(self, "netflow_sampling_rate") @@ -1930,8 +1928,7 @@ def __init__(__self__, *, :param pulumi.Input[int] netflow_sampling_rate: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. :param pulumi.Input[bool] network_resource_control_enabled: Set to `true` to enable network I/O control. Default: `false`. :param pulumi.Input[str] network_resource_control_version: The version of network I/O @@ -2988,8 +2985,7 @@ def netflow_sampling_rate(self) -> Optional[pulumi.Input[int]]: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. """ return pulumi.get(self, "netflow_sampling_rate") @@ -3652,8 +3648,7 @@ def __init__(__self__, :param pulumi.Input[int] netflow_sampling_rate: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. :param pulumi.Input[bool] network_resource_control_enabled: Set to `true` to enable network I/O control. Default: `false`. :param pulumi.Input[str] network_resource_control_version: The version of network I/O @@ -4179,8 +4174,7 @@ def get(resource_name: str, :param pulumi.Input[int] netflow_sampling_rate: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. :param pulumi.Input[bool] network_resource_control_enabled: Set to `true` to enable network I/O control. Default: `false`. :param pulumi.Input[str] network_resource_control_version: The version of network I/O @@ -4903,8 +4897,7 @@ def netflow_sampling_rate(self) -> pulumi.Output[Optional[int]]: The ratio of total number of packets to the number of packets analyzed. The default is `0`, which indicates that the VDS should analyze all packets. The maximum value is `1000`, which - indicates an analysis rate of 0.001%! - (MISSING) + indicates an analysis rate of 0.001%. """ return pulumi.get(self, "netflow_sampling_rate") diff --git a/sdk/python/pulumi_vsphere/host.py b/sdk/python/pulumi_vsphere/host.py index ca4345f6..799b6428 100644 --- a/sdk/python/pulumi_vsphere/host.py +++ b/sdk/python/pulumi_vsphere/host.py @@ -663,12 +663,6 @@ def __init__(__self__, [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the host with ID `host-123`. :param str resource_name: The name of the resource. @@ -778,12 +772,6 @@ def __init__(__self__, [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the host with ID `host-123`. :param str resource_name: The name of the resource. diff --git a/sdk/python/pulumi_vsphere/host_port_group.py b/sdk/python/pulumi_vsphere/host_port_group.py index 142952fa..e1d04850 100644 --- a/sdk/python/pulumi_vsphere/host_port_group.py +++ b/sdk/python/pulumi_vsphere/host_port_group.py @@ -755,12 +755,6 @@ def __init__(__self__, An existing host port group can be imported into this resource using the host port group's ID. An example is below: - - ```python - import pulumi - ``` - - The above would import the `management` host port group from host with ID `host-123`. :param str resource_name: The name of the resource. @@ -871,12 +865,6 @@ def __init__(__self__, An existing host port group can be imported into this resource using the host port group's ID. An example is below: - - ```python - import pulumi - ``` - - The above would import the `management` host port group from host with ID `host-123`. :param str resource_name: The name of the resource. diff --git a/sdk/python/pulumi_vsphere/resource_pool.py b/sdk/python/pulumi_vsphere/resource_pool.py index 34f2538b..816105f9 100644 --- a/sdk/python/pulumi_vsphere/resource_pool.py +++ b/sdk/python/pulumi_vsphere/resource_pool.py @@ -699,6 +699,20 @@ def __init__(__self__, ``` + ## Importing + + An existing resource pool can be imported into this resource via + the path to the resource pool, using the following command: + + The above would import the resource pool named `resource-pool-01` that is located + in the compute cluster `cluster-01` in the `dc-01` datacenter. + + ### Settings that Require vSphere 7.0 or higher + + These settings require vSphere 7.0 or higher: + + * `scale_descendants_shares` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] cpu_expandable: Determines if the reservation on a resource @@ -808,6 +822,20 @@ def __init__(__self__, ``` + ## Importing + + An existing resource pool can be imported into this resource via + the path to the resource pool, using the following command: + + The above would import the resource pool named `resource-pool-01` that is located + in the compute cluster `cluster-01` in the `dc-01` datacenter. + + ### Settings that Require vSphere 7.0 or higher + + These settings require vSphere 7.0 or higher: + + * `scale_descendants_shares` + :param str resource_name: The name of the resource. :param ResourcePoolArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/virtual_machine.py b/sdk/python/pulumi_vsphere/virtual_machine.py index 88edbfbe..9928300b 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine.py +++ b/sdk/python/pulumi_vsphere/virtual_machine.py @@ -180,7 +180,7 @@ def __init__(__self__, *, :param pulumi.Input[int] poweron_timeout: The amount of time, in seconds, that we will be trying to power on a VM :param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) :param pulumi.Input[bool] run_tools_scripts_after_power_on: Enable post-power-on scripts to run when VMware Tools is installed. Default: `true`. :param pulumi.Input[bool] run_tools_scripts_after_resume: Enable ost-resume scripts to run when VMware Tools is installed. Default: `true`. :param pulumi.Input[bool] run_tools_scripts_before_guest_reboot: Enable pre-reboot scripts to run when VMware Tools is installed. Default: `false`. @@ -1023,7 +1023,7 @@ def replace_trigger(self) -> Optional[pulumi.Input[str]]: """ Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) """ return pulumi.get(self, "replace_trigger") @@ -1484,7 +1484,7 @@ def __init__(__self__, *, :param pulumi.Input[bool] reboot_required: Value internal to Terraform used to determine if a configuration set change requires a reboot. :param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) :param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. > **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool. @@ -2427,7 +2427,7 @@ def replace_trigger(self) -> Optional[pulumi.Input[str]]: """ Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) """ return pulumi.get(self, "replace_trigger") @@ -2937,7 +2937,7 @@ def __init__(__self__, :param pulumi.Input[int] poweron_timeout: The amount of time, in seconds, that we will be trying to power on a VM :param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) :param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. > **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool. @@ -3359,7 +3359,7 @@ def get(resource_name: str, :param pulumi.Input[bool] reboot_required: Value internal to Terraform used to determine if a configuration set change requires a reboot. :param pulumi.Input[str] replace_trigger: Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) :param pulumi.Input[str] resource_pool_id: The managed object reference ID of the resource pool in which to place the virtual machine. See the Virtual Machine Migration section for more information on modifying this value. > **NOTE:** All clusters and standalone hosts have a default root resource pool. This resource argument does not directly accept the cluster or standalone host resource. For more information, see the section on specifying the Root Resource Pool in the `ResourcePool` data source documentation on using the root resource pool. @@ -3989,7 +3989,7 @@ def replace_trigger(self) -> pulumi.Output[Optional[str]]: """ Triggers replacement of resource whenever it changes. - For example, `replace_trigger = sha256(format("%!s(MISSING)-%!s(MISSING)",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) + For example, `replace_trigger = sha256(format("%s-%s",data.template_file.cloud_init_metadata.rendered,data.template_file.cloud_init_userdata.rendered))` will fingerprint the changes in cloud-init metadata and userdata templates. This will enable a replacement of the resource whenever the dependant template renders a new configuration. (Forces a replacement.) """ return pulumi.get(self, "replace_trigger") diff --git a/sdk/python/pulumi_vsphere/vnic.py b/sdk/python/pulumi_vsphere/vnic.py index 34ff9e23..80c2cf49 100644 --- a/sdk/python/pulumi_vsphere/vnic.py +++ b/sdk/python/pulumi_vsphere/vnic.py @@ -442,12 +442,6 @@ def __init__(__self__, [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the vnic `vmk2` from host with ID `host-123`. :param str resource_name: The name of the resource. @@ -547,12 +541,6 @@ def __init__(__self__, [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the vnic `vmk2` from host with ID `host-123`. :param str resource_name: The name of the resource.