From be9083a48ce950b88eba6d94585cc03d99615034 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Thu, 21 Mar 2024 08:00:15 -0700 Subject: [PATCH] Upgrade pulumi-terraform-bridge to v3.78.0 (#452) This PR was generated via `$ upgrade-provider pulumi/pulumi-vsphere --kind=bridge --pr-reviewers=VenelinMartinov`. --- - Upgrading pulumi-terraform-bridge from v3.77.0 to v3.78.0. --- examples/go.mod | 4 ++-- examples/go.sum | 8 ++++---- .../cmd/pulumi-resource-vsphere/schema.json | 20 +++++++++---------- provider/go.mod | 8 ++++---- provider/go.sum | 16 +++++++-------- sdk/go.mod | 2 +- sdk/go.sum | 4 ++-- .../vsphere/computeClusterVmAffinityRule.go | 12 +++++------ sdk/go/vsphere/getComputeClusterHostGroup.go | 4 ++-- sdk/go/vsphere/getDistributedVirtualSwitch.go | 6 +++--- sdk/go/vsphere/host.go | 8 ++++---- sdk/go/vsphere/hostPortGroup.go | 8 ++++---- sdk/go/vsphere/resourcePool.go | 4 ++-- sdk/go/vsphere/virtualDisk.go | 12 +++++------ sdk/go/vsphere/vnic.go | 12 +++++------ .../java/com/pulumi/vsphere/VirtualDisk.java | 4 ++-- .../com/pulumi/vsphere/VirtualDiskArgs.java | 16 +++++++-------- .../vsphere/inputs/VirtualDiskState.java | 16 +++++++-------- sdk/nodejs/virtualDisk.ts | 6 +++--- sdk/python/pulumi_vsphere/virtual_disk.py | 20 +++++++++---------- 20 files changed, 95 insertions(+), 95 deletions(-) diff --git a/examples/go.mod b/examples/go.mod index 95ae20fb..2b02333d 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-vsphere/examples/v4 go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.108.1 +require github.com/pulumi/pulumi/pkg/v3 v3.111.1 require ( cloud.google.com/go v0.110.10 // indirect @@ -135,7 +135,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.6.2 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.108.1 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.111.1 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index e3010fb1..7aaf2c12 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1467,10 +1467,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/pkg/v3 v3.108.1 h1:K1UK40v5IpEPIaJ2un3WNOTBbLQaKR26HbLLh5EmMHY= -github.com/pulumi/pulumi/pkg/v3 v3.108.1/go.mod h1:48uCfxkPXUq/XTBqei9VuR0CRWObnSVlqcLkD6DhII8= -github.com/pulumi/pulumi/sdk/v3 v3.108.1 h1:5idjc3JmzToYVizRPbFyjJ5UU4AbExd04pcSP9AhPEc= -github.com/pulumi/pulumi/sdk/v3 v3.108.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= +github.com/pulumi/pulumi/pkg/v3 v3.111.1 h1:SrVgQE96T7YlZx/AZoFSlXYwur7ZmQUHyjbPI8sH96Q= +github.com/pulumi/pulumi/pkg/v3 v3.111.1/go.mod h1:ZWsq8Y0EMHZ5E2ju92jC+POz97TEXs3BbQ6r2o0U4SA= +github.com/pulumi/pulumi/sdk/v3 v3.111.1 h1:uOeG/b6YxBuL59xHtmFPspMa8BB6ovjHelL7sVCGJZw= +github.com/pulumi/pulumi/sdk/v3 v3.111.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= diff --git a/provider/cmd/pulumi-resource-vsphere/schema.json b/provider/cmd/pulumi-resource-vsphere/schema.json index 889d61d5..d2fe3ec4 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\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: []*pulumi.String(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\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\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\u003c!--End PulumiCodeChooser --\u003e\n\n", "properties": { "computeClusterId": { "type": "string", @@ -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\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", "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\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", "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 }\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 }\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", "properties": { "cpuExpandable": { "type": "boolean", @@ -8692,7 +8692,7 @@ "adapterType": { "type": "string", "description": "The adapter type for this virtual disk. Can be\none of `ide`, `lsiLogic`, or `busLogic`. Default: `lsiLogic`.\n\n\u003e **NOTE:** `adapter_type` is **deprecated**: it does not dictate the type of\ncontroller that the virtual disk will be attached to on the virtual machine.\nPlease see the `scsi_type` parameter\nin the `vsphere.VirtualMachine` resource for information on how to control\ndisk controller types. This parameter will be removed in future versions of the\nvSphere provider.\n", - "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead" + "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead" }, "createDirectories": { "type": "boolean", @@ -8728,7 +8728,7 @@ "adapterType": { "type": "string", "description": "The adapter type for this virtual disk. Can be\none of `ide`, `lsiLogic`, or `busLogic`. Default: `lsiLogic`.\n\n\u003e **NOTE:** `adapter_type` is **deprecated**: it does not dictate the type of\ncontroller that the virtual disk will be attached to on the virtual machine.\nPlease see the `scsi_type` parameter\nin the `vsphere.VirtualMachine` resource for information on how to control\ndisk controller types. This parameter will be removed in future versions of the\nvSphere provider.\n", - "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead", + "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead", "willReplaceOnChanges": true }, "createDirectories": { @@ -8773,7 +8773,7 @@ "adapterType": { "type": "string", "description": "The adapter type for this virtual disk. Can be\none of `ide`, `lsiLogic`, or `busLogic`. Default: `lsiLogic`.\n\n\u003e **NOTE:** `adapter_type` is **deprecated**: it does not dictate the type of\ncontroller that the virtual disk will be attached to on the virtual machine.\nPlease see the `scsi_type` parameter\nin the `vsphere.VirtualMachine` resource for information on how to control\ndisk controller types. This parameter will be removed in future versions of the\nvSphere provider.\n", - "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead", + "deprecationMessage": "this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead", "willReplaceOnChanges": true }, "createDirectories": { @@ -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\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", "properties": { "distributedPortGroup": { "type": "string", @@ -10512,7 +10512,7 @@ } }, "vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup": { - "description": "The `vsphere.ComputeClusterHostGroup` data source can be used to discover\nthe IDs ESXi hosts in a host group and return host group attributes to other\nresources.\n\n## Example Usage\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: _var.vsphere_datacenter,\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: _var.vsphere_cluster,\n datacenterId: datacenter.id,\n}));\nconst hostGroup1 = cluster.then(cluster =\u003e vsphere.getComputeClusterHostGroup({\n name: \"host_group1\",\n computeClusterId: cluster.id,\n}));\nconst hostRule1 = new vsphere.ComputeClusterVmHostRule(\"hostRule1\", {\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n vmGroupName: \"vm_group1\",\n affinityHostGroupName: hostGroup1.then(hostGroup1 =\u003e hostGroup1.name),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=var[\"vsphere_datacenter\"])\ncluster = vsphere.get_compute_cluster(name=var[\"vsphere_cluster\"],\n datacenter_id=datacenter.id)\nhost_group1 = vsphere.get_compute_cluster_host_group(name=\"host_group1\",\n compute_cluster_id=cluster.id)\nhost_rule1 = vsphere.ComputeClusterVmHostRule(\"hostRule1\",\n compute_cluster_id=cluster.id,\n vm_group_name=\"vm_group1\",\n affinity_host_group_name=host_group1.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 = @var.Vsphere_datacenter,\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = @var.Vsphere_cluster,\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostGroup1 = VSphere.GetComputeClusterHostGroup.Invoke(new()\n {\n Name = \"host_group1\",\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n });\n\n var hostRule1 = new VSphere.ComputeClusterVmHostRule(\"hostRule1\", new()\n {\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VmGroupName = \"vm_group1\",\n AffinityHostGroupName = hostGroup1.Apply(getComputeClusterHostGroupResult =\u003e getComputeClusterHostGroupResult.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(_var.Vsphere_datacenter),\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: _var.Vsphere_cluster,\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\thostGroup1, err := vsphere.LookupComputeClusterHostGroup(ctx, \u0026vsphere.LookupComputeClusterHostGroupArgs{\n\t\t\tName: \"host_group1\",\n\t\t\tComputeClusterId: cluster.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmHostRule(ctx, \"hostRule1\", \u0026vsphere.ComputeClusterVmHostRuleArgs{\n\t\t\tComputeClusterId: *pulumi.String(cluster.Id),\n\t\t\tVmGroupName: pulumi.String(\"vm_group1\"),\n\t\t\tAffinityHostGroupName: *pulumi.String(hostGroup1.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.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterHostGroupArgs;\nimport com.pulumi.vsphere.ComputeClusterVmHostRule;\nimport com.pulumi.vsphere.ComputeClusterVmHostRuleArgs;\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(var_.vsphere_datacenter())\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(var_.vsphere_cluster())\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var hostGroup1 = VsphereFunctions.getComputeClusterHostGroup(GetComputeClusterHostGroupArgs.builder()\n .name(\"host_group1\")\n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .build());\n\n var hostRule1 = new ComputeClusterVmHostRule(\"hostRule1\", ComputeClusterVmHostRuleArgs.builder() \n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .vmGroupName(\"vm_group1\")\n .affinityHostGroupName(hostGroup1.applyValue(getComputeClusterHostGroupResult -\u003e getComputeClusterHostGroupResult.name()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostRule1:\n type: vsphere:ComputeClusterVmHostRule\n properties:\n computeClusterId: ${cluster.id}\n vmGroupName: vm_group1\n affinityHostGroupName: ${hostGroup1.name}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: ${var.vsphere_datacenter}\n cluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: ${var.vsphere_cluster}\n datacenterId: ${datacenter.id}\n hostGroup1:\n fn::invoke:\n Function: vsphere:getComputeClusterHostGroup\n Arguments:\n name: host_group1\n computeClusterId: ${cluster.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The `vsphere.ComputeClusterHostGroup` data source can be used to discover\nthe IDs ESXi hosts in a host group and return host group attributes to other\nresources.\n\n## Example Usage\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: _var.vsphere_datacenter,\n});\nconst cluster = datacenter.then(datacenter =\u003e vsphere.getComputeCluster({\n name: _var.vsphere_cluster,\n datacenterId: datacenter.id,\n}));\nconst hostGroup1 = cluster.then(cluster =\u003e vsphere.getComputeClusterHostGroup({\n name: \"host_group1\",\n computeClusterId: cluster.id,\n}));\nconst hostRule1 = new vsphere.ComputeClusterVmHostRule(\"hostRule1\", {\n computeClusterId: cluster.then(cluster =\u003e cluster.id),\n vmGroupName: \"vm_group1\",\n affinityHostGroupName: hostGroup1.then(hostGroup1 =\u003e hostGroup1.name),\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=var[\"vsphere_datacenter\"])\ncluster = vsphere.get_compute_cluster(name=var[\"vsphere_cluster\"],\n datacenter_id=datacenter.id)\nhost_group1 = vsphere.get_compute_cluster_host_group(name=\"host_group1\",\n compute_cluster_id=cluster.id)\nhost_rule1 = vsphere.ComputeClusterVmHostRule(\"hostRule1\",\n compute_cluster_id=cluster.id,\n vm_group_name=\"vm_group1\",\n affinity_host_group_name=host_group1.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 = @var.Vsphere_datacenter,\n });\n\n var cluster = VSphere.GetComputeCluster.Invoke(new()\n {\n Name = @var.Vsphere_cluster,\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var hostGroup1 = VSphere.GetComputeClusterHostGroup.Invoke(new()\n {\n Name = \"host_group1\",\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n });\n\n var hostRule1 = new VSphere.ComputeClusterVmHostRule(\"hostRule1\", new()\n {\n ComputeClusterId = cluster.Apply(getComputeClusterResult =\u003e getComputeClusterResult.Id),\n VmGroupName = \"vm_group1\",\n AffinityHostGroupName = hostGroup1.Apply(getComputeClusterHostGroupResult =\u003e getComputeClusterHostGroupResult.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(_var.Vsphere_datacenter),\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: _var.Vsphere_cluster,\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\thostGroup1, err := vsphere.LookupComputeClusterHostGroup(ctx, \u0026vsphere.LookupComputeClusterHostGroupArgs{\n\t\t\tName: \"host_group1\",\n\t\t\tComputeClusterId: cluster.Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vsphere.NewComputeClusterVmHostRule(ctx, \"hostRule1\", \u0026vsphere.ComputeClusterVmHostRuleArgs{\n\t\t\tComputeClusterId: pulumi.String(cluster.Id),\n\t\t\tVmGroupName: pulumi.String(\"vm_group1\"),\n\t\t\tAffinityHostGroupName: pulumi.String(hostGroup1.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.GetComputeClusterArgs;\nimport com.pulumi.vsphere.inputs.GetComputeClusterHostGroupArgs;\nimport com.pulumi.vsphere.ComputeClusterVmHostRule;\nimport com.pulumi.vsphere.ComputeClusterVmHostRuleArgs;\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(var_.vsphere_datacenter())\n .build());\n\n final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()\n .name(var_.vsphere_cluster())\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n final var hostGroup1 = VsphereFunctions.getComputeClusterHostGroup(GetComputeClusterHostGroupArgs.builder()\n .name(\"host_group1\")\n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .build());\n\n var hostRule1 = new ComputeClusterVmHostRule(\"hostRule1\", ComputeClusterVmHostRuleArgs.builder() \n .computeClusterId(cluster.applyValue(getComputeClusterResult -\u003e getComputeClusterResult.id()))\n .vmGroupName(\"vm_group1\")\n .affinityHostGroupName(hostGroup1.applyValue(getComputeClusterHostGroupResult -\u003e getComputeClusterHostGroupResult.name()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n hostRule1:\n type: vsphere:ComputeClusterVmHostRule\n properties:\n computeClusterId: ${cluster.id}\n vmGroupName: vm_group1\n affinityHostGroupName: ${hostGroup1.name}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: ${var.vsphere_datacenter}\n cluster:\n fn::invoke:\n Function: vsphere:getComputeCluster\n Arguments:\n name: ${var.vsphere_cluster}\n datacenterId: ${datacenter.id}\n hostGroup1:\n fn::invoke:\n Function: vsphere:getComputeClusterHostGroup\n Arguments:\n name: host_group1\n computeClusterId: ${cluster.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getComputeClusterHostGroup.\n", "properties": { @@ -10871,7 +10871,7 @@ } }, "vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch": { - "description": "The `vsphere.DistributedVirtualSwitch` data source can be used to discover\nthe ID and uplink data of a of a vSphere distributed switch (VDS). This\ncan then be used with resources or data sources that require a VDS, such as the\n`vsphere.DistributedPortGroup` resource, for which\nan example is shown below.\n\n\u003e **NOTE:** This data source requires vCenter Server and is not available on\ndirect ESXi host connections.\n\n## Example Usage\n\nThe following example locates a distributed switch named `vds-01`, in the\ndatacenter `dc-01`. It then uses this distributed switch to set up a\n`vsphere.DistributedPortGroup` resource that uses the first uplink as a\nprimary uplink and the second uplink as a secondary.\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 vds = datacenter.then(datacenter =\u003e vsphere.getDistributedVirtualSwitch({\n name: \"vds-01\",\n datacenterId: datacenter.id,\n}));\nconst dvpg = new vsphere.DistributedPortGroup(\"dvpg\", {\n distributedVirtualSwitchUuid: vds.then(vds =\u003e vds.id),\n activeUplinks: [vds.then(vds =\u003e vds.uplinks?.[0])],\n standbyUplinks: [vds.then(vds =\u003e vds.uplinks?.[1])],\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nvds = vsphere.get_distributed_virtual_switch(name=\"vds-01\",\n datacenter_id=datacenter.id)\ndvpg = vsphere.DistributedPortGroup(\"dvpg\",\n distributed_virtual_switch_uuid=vds.id,\n active_uplinks=[vds.uplinks[0]],\n standby_uplinks=[vds.uplinks[1]])\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 vds = VSphere.GetDistributedVirtualSwitch.Invoke(new()\n {\n Name = \"vds-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var dvpg = new VSphere.DistributedPortGroup(\"dvpg\", new()\n {\n DistributedVirtualSwitchUuid = vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Id),\n ActiveUplinks = new[]\n {\n vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Uplinks[0]),\n },\n StandbyUplinks = new[]\n {\n vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Uplinks[1]),\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\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\tvds, err := vsphere.LookupDistributedVirtualSwitch(ctx, \u0026vsphere.LookupDistributedVirtualSwitchArgs{\n\t\t\tName: \"vds-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.NewDistributedPortGroup(ctx, \"dvpg\", \u0026vsphere.DistributedPortGroupArgs{\n\t\t\tDistributedVirtualSwitchUuid: *pulumi.String(vds.Id),\n\t\t\tActiveUplinks: pulumi.StringArray{\n\t\t\t\t*pulumi.String(vds.Uplinks[0]),\n\t\t\t},\n\t\t\tStandbyUplinks: pulumi.StringArray{\n\t\t\t\t*pulumi.String(vds.Uplinks[1]),\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.GetDistributedVirtualSwitchArgs;\nimport com.pulumi.vsphere.DistributedPortGroup;\nimport com.pulumi.vsphere.DistributedPortGroupArgs;\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 vds = VsphereFunctions.getDistributedVirtualSwitch(GetDistributedVirtualSwitchArgs.builder()\n .name(\"vds-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var dvpg = new DistributedPortGroup(\"dvpg\", DistributedPortGroupArgs.builder() \n .distributedVirtualSwitchUuid(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.id()))\n .activeUplinks(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.uplinks()[0]))\n .standbyUplinks(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.uplinks()[1]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dvpg:\n type: vsphere:DistributedPortGroup\n properties:\n distributedVirtualSwitchUuid: ${vds.id}\n activeUplinks:\n - ${vds.uplinks[0]}\n standbyUplinks:\n - ${vds.uplinks[1]}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n vds:\n fn::invoke:\n Function: vsphere:getDistributedVirtualSwitch\n Arguments:\n name: vds-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The `vsphere.DistributedVirtualSwitch` data source can be used to discover\nthe ID and uplink data of a of a vSphere distributed switch (VDS). This\ncan then be used with resources or data sources that require a VDS, such as the\n`vsphere.DistributedPortGroup` resource, for which\nan example is shown below.\n\n\u003e **NOTE:** This data source requires vCenter Server and is not available on\ndirect ESXi host connections.\n\n## Example Usage\n\nThe following example locates a distributed switch named `vds-01`, in the\ndatacenter `dc-01`. It then uses this distributed switch to set up a\n`vsphere.DistributedPortGroup` resource that uses the first uplink as a\nprimary uplink and the second uplink as a secondary.\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 vds = datacenter.then(datacenter =\u003e vsphere.getDistributedVirtualSwitch({\n name: \"vds-01\",\n datacenterId: datacenter.id,\n}));\nconst dvpg = new vsphere.DistributedPortGroup(\"dvpg\", {\n distributedVirtualSwitchUuid: vds.then(vds =\u003e vds.id),\n activeUplinks: [vds.then(vds =\u003e vds.uplinks?.[0])],\n standbyUplinks: [vds.then(vds =\u003e vds.uplinks?.[1])],\n});\n```\n```python\nimport pulumi\nimport pulumi_vsphere as vsphere\n\ndatacenter = vsphere.get_datacenter(name=\"dc-01\")\nvds = vsphere.get_distributed_virtual_switch(name=\"vds-01\",\n datacenter_id=datacenter.id)\ndvpg = vsphere.DistributedPortGroup(\"dvpg\",\n distributed_virtual_switch_uuid=vds.id,\n active_uplinks=[vds.uplinks[0]],\n standby_uplinks=[vds.uplinks[1]])\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 vds = VSphere.GetDistributedVirtualSwitch.Invoke(new()\n {\n Name = \"vds-01\",\n DatacenterId = datacenter.Apply(getDatacenterResult =\u003e getDatacenterResult.Id),\n });\n\n var dvpg = new VSphere.DistributedPortGroup(\"dvpg\", new()\n {\n DistributedVirtualSwitchUuid = vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Id),\n ActiveUplinks = new[]\n {\n vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Uplinks[0]),\n },\n StandbyUplinks = new[]\n {\n vds.Apply(getDistributedVirtualSwitchResult =\u003e getDistributedVirtualSwitchResult.Uplinks[1]),\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\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\tvds, err := vsphere.LookupDistributedVirtualSwitch(ctx, \u0026vsphere.LookupDistributedVirtualSwitchArgs{\n\t\t\tName: \"vds-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.NewDistributedPortGroup(ctx, \"dvpg\", \u0026vsphere.DistributedPortGroupArgs{\n\t\t\tDistributedVirtualSwitchUuid: pulumi.String(vds.Id),\n\t\t\tActiveUplinks: pulumi.StringArray{\n\t\t\t\tpulumi.String(vds.Uplinks[0]),\n\t\t\t},\n\t\t\tStandbyUplinks: pulumi.StringArray{\n\t\t\t\tpulumi.String(vds.Uplinks[1]),\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.GetDistributedVirtualSwitchArgs;\nimport com.pulumi.vsphere.DistributedPortGroup;\nimport com.pulumi.vsphere.DistributedPortGroupArgs;\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 vds = VsphereFunctions.getDistributedVirtualSwitch(GetDistributedVirtualSwitchArgs.builder()\n .name(\"vds-01\")\n .datacenterId(datacenter.applyValue(getDatacenterResult -\u003e getDatacenterResult.id()))\n .build());\n\n var dvpg = new DistributedPortGroup(\"dvpg\", DistributedPortGroupArgs.builder() \n .distributedVirtualSwitchUuid(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.id()))\n .activeUplinks(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.uplinks()[0]))\n .standbyUplinks(vds.applyValue(getDistributedVirtualSwitchResult -\u003e getDistributedVirtualSwitchResult.uplinks()[1]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dvpg:\n type: vsphere:DistributedPortGroup\n properties:\n distributedVirtualSwitchUuid: ${vds.id}\n activeUplinks:\n - ${vds.uplinks[0]}\n standbyUplinks:\n - ${vds.uplinks[1]}\nvariables:\n datacenter:\n fn::invoke:\n Function: vsphere:getDatacenter\n Arguments:\n name: dc-01\n vds:\n fn::invoke:\n Function: vsphere:getDistributedVirtualSwitch\n Arguments:\n name: vds-01\n datacenterId: ${datacenter.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getDistributedVirtualSwitch.\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index b0fb6606..91ac5091 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -13,8 +13,8 @@ replace ( require ( github.com/hashicorp/terraform-provider-vsphere v2.3.1+incompatible - github.com/pulumi/pulumi-terraform-bridge/v3 v3.77.0 - github.com/pulumi/pulumi/sdk/v3 v3.108.1 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.78.0 + github.com/pulumi/pulumi/sdk/v3 v3.111.1 ) require ( @@ -186,8 +186,8 @@ require ( github.com/pulumi/esc v0.6.2 // indirect github.com/pulumi/pulumi-java/pkg v0.9.9 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.5.0 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.108.1 // indirect + github.com/pulumi/pulumi-yaml v1.6.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.111.1 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/provider/go.sum b/provider/go.sum index 3583b878..d8408976 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2800,16 +2800,16 @@ 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.9.9 h1:F3xJUtMFDVrTGCxb7Rh2Q8s6tj7gMfM5pcoUthz7vFY= github.com/pulumi/pulumi-java/pkg v0.9.9/go.mod h1:LVF1zeg3UkToHWxb67V+zEIxQc3EdMnlot5NWSt+FpA= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.77.0 h1:BZhD7yNZz7O5MWeM4WofY6XBLjtiA3qH2UJJTg8+Nts= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.77.0/go.mod h1:OCfjEGPU2fbBlda8UZhN/N3FljW6R08SK6lXPXzahwA= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.78.0 h1:zl1nXrx02X7u/w5kNjIVGVUzccEILcMWsIpg4QQanCI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.78.0/go.mod h1:WpkN/lgtBrDYGrMyG9cmncy5pN95lnowbmjILHWcm0M= 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.5.0 h1:HfXu+WSFNpycref9CK935cViYJzXwSgHGWM/RepyrW0= -github.com/pulumi/pulumi-yaml v1.5.0/go.mod h1:AvKSmEQv2EkPbpvAQroR1eP1LkJGC8z5NDM34rVWOtg= -github.com/pulumi/pulumi/pkg/v3 v3.108.1 h1:K1UK40v5IpEPIaJ2un3WNOTBbLQaKR26HbLLh5EmMHY= -github.com/pulumi/pulumi/pkg/v3 v3.108.1/go.mod h1:48uCfxkPXUq/XTBqei9VuR0CRWObnSVlqcLkD6DhII8= -github.com/pulumi/pulumi/sdk/v3 v3.108.1 h1:5idjc3JmzToYVizRPbFyjJ5UU4AbExd04pcSP9AhPEc= -github.com/pulumi/pulumi/sdk/v3 v3.108.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= +github.com/pulumi/pulumi-yaml v1.6.0 h1:mb/QkebWXTa1fR+P3ZkCCHGXOYC6iTN8X8By9eNz8xM= +github.com/pulumi/pulumi-yaml v1.6.0/go.mod h1:RyEPo4MhL363sbAiFMVKRsQmXpQPDCY1S8pGv3E6Ij0= +github.com/pulumi/pulumi/pkg/v3 v3.111.1 h1:SrVgQE96T7YlZx/AZoFSlXYwur7ZmQUHyjbPI8sH96Q= +github.com/pulumi/pulumi/pkg/v3 v3.111.1/go.mod h1:ZWsq8Y0EMHZ5E2ju92jC+POz97TEXs3BbQ6r2o0U4SA= +github.com/pulumi/pulumi/sdk/v3 v3.111.1 h1:uOeG/b6YxBuL59xHtmFPspMa8BB6ovjHelL7sVCGJZw= +github.com/pulumi/pulumi/sdk/v3 v3.111.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= diff --git a/sdk/go.mod b/sdk/go.mod index 19029663..4c42930c 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.108.1 + github.com/pulumi/pulumi/sdk/v3 v3.111.1 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index 69dbe19d..2160100e 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/sdk/v3 v3.108.1 h1:5idjc3JmzToYVizRPbFyjJ5UU4AbExd04pcSP9AhPEc= -github.com/pulumi/pulumi/sdk/v3 v3.108.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= +github.com/pulumi/pulumi/sdk/v3 v3.111.1 h1:uOeG/b6YxBuL59xHtmFPspMa8BB6ovjHelL7sVCGJZw= +github.com/pulumi/pulumi/sdk/v3 v3.111.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/go/vsphere/computeClusterVmAffinityRule.go b/sdk/go/vsphere/computeClusterVmAffinityRule.go index 88e17c2b..abc81720 100644 --- a/sdk/go/vsphere/computeClusterVmAffinityRule.go +++ b/sdk/go/vsphere/computeClusterVmAffinityRule.go @@ -88,14 +88,14 @@ import ( // key0 := index // _ := index // __res, err := vsphere.NewVirtualMachine(ctx, fmt.Sprintf("vm-%v", key0), &vsphere.VirtualMachineArgs{ -// ResourcePoolId: *pulumi.String(cluster.ResourcePoolId), -// DatastoreId: *pulumi.String(datastore.Id), +// ResourcePoolId: pulumi.String(cluster.ResourcePoolId), +// DatastoreId: pulumi.String(datastore.Id), // NumCpus: pulumi.Int(1), // Memory: pulumi.Int(1024), // GuestId: pulumi.String("otherLinux64Guest"), // NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{ // &vsphere.VirtualMachineNetworkInterfaceArgs{ -// NetworkId: *pulumi.String(network.Id), +// NetworkId: pulumi.String(network.Id), // }, // }, // Disks: vsphere.VirtualMachineDiskArray{ @@ -111,7 +111,7 @@ import ( // vm = append(vm, __res) // } // _, err = vsphere.NewComputeClusterVmAffinityRule(ctx, "vmAffinityRule", &vsphere.ComputeClusterVmAffinityRuleArgs{ -// ComputeClusterId: *pulumi.String(cluster.Id), +// ComputeClusterId: pulumi.String(cluster.Id), // VirtualMachineIds: "TODO: For expression", // }) // if err != nil { @@ -165,8 +165,8 @@ import ( // } // _, err = vsphere.NewComputeClusterVmAffinityRule(ctx, "vmAffinityRule", &vsphere.ComputeClusterVmAffinityRuleArgs{ // Enabled: pulumi.Bool(true), -// ComputeClusterId: *pulumi.String(cluster.Id), -// VirtualMachineIds: []*pulumi.String(splat0), +// ComputeClusterId: pulumi.String(cluster.Id), +// VirtualMachineIds: splat0, // }) // if err != nil { // return err diff --git a/sdk/go/vsphere/getComputeClusterHostGroup.go b/sdk/go/vsphere/getComputeClusterHostGroup.go index bc81edaa..3b0b7100 100644 --- a/sdk/go/vsphere/getComputeClusterHostGroup.go +++ b/sdk/go/vsphere/getComputeClusterHostGroup.go @@ -51,9 +51,9 @@ import ( // return err // } // _, err = vsphere.NewComputeClusterVmHostRule(ctx, "hostRule1", &vsphere.ComputeClusterVmHostRuleArgs{ -// ComputeClusterId: *pulumi.String(cluster.Id), +// ComputeClusterId: pulumi.String(cluster.Id), // VmGroupName: pulumi.String("vm_group1"), -// AffinityHostGroupName: *pulumi.String(hostGroup1.Name), +// AffinityHostGroupName: pulumi.String(hostGroup1.Name), // }) // if err != nil { // return err diff --git a/sdk/go/vsphere/getDistributedVirtualSwitch.go b/sdk/go/vsphere/getDistributedVirtualSwitch.go index a08550fa..02a3e1ef 100644 --- a/sdk/go/vsphere/getDistributedVirtualSwitch.go +++ b/sdk/go/vsphere/getDistributedVirtualSwitch.go @@ -54,12 +54,12 @@ import ( // return err // } // _, err = vsphere.NewDistributedPortGroup(ctx, "dvpg", &vsphere.DistributedPortGroupArgs{ -// DistributedVirtualSwitchUuid: *pulumi.String(vds.Id), +// DistributedVirtualSwitchUuid: pulumi.String(vds.Id), // ActiveUplinks: pulumi.StringArray{ -// *pulumi.String(vds.Uplinks[0]), +// pulumi.String(vds.Uplinks[0]), // }, // StandbyUplinks: pulumi.StringArray{ -// *pulumi.String(vds.Uplinks[1]), +// pulumi.String(vds.Uplinks[1]), // }, // }) // if err != nil { diff --git a/sdk/go/vsphere/host.go b/sdk/go/vsphere/host.go index a1e2fc00..e4c19d3b 100644 --- a/sdk/go/vsphere/host.go +++ b/sdk/go/vsphere/host.go @@ -50,8 +50,8 @@ import ( // Username: pulumi.String("root"), // Password: pulumi.String("password"), // License: pulumi.String("00000-00000-00000-00000-00000"), -// Thumbprint: *pulumi.String(thumbprint.Id), -// Datacenter: *pulumi.String(datacenter.Id), +// Thumbprint: pulumi.String(thumbprint.Id), +// Datacenter: pulumi.String(datacenter.Id), // }) // if err != nil { // return err @@ -103,8 +103,8 @@ import ( // Username: pulumi.String("root"), // Password: pulumi.String("password"), // License: pulumi.String("00000-00000-00000-00000-00000"), -// Thumbprint: *pulumi.String(thumbprint.Id), -// Cluster: *pulumi.String(cluster.Id), +// Thumbprint: pulumi.String(thumbprint.Id), +// Cluster: pulumi.String(cluster.Id), // }) // if err != nil { // return err diff --git a/sdk/go/vsphere/hostPortGroup.go b/sdk/go/vsphere/hostPortGroup.go index 5878ad58..b8e3856f 100644 --- a/sdk/go/vsphere/hostPortGroup.go +++ b/sdk/go/vsphere/hostPortGroup.go @@ -50,7 +50,7 @@ import ( // return err // } // hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(host.Id), +// HostSystemId: pulumi.String(host.Id), // NetworkAdapters: pulumi.StringArray{ // pulumi.String("vmnic0"), // pulumi.String("vmnic1"), @@ -66,7 +66,7 @@ import ( // return err // } // _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{ -// HostSystemId: *pulumi.String(host.Id), +// HostSystemId: pulumi.String(host.Id), // VirtualSwitchName: hostVirtualSwitch.Name, // }) // if err != nil { @@ -114,7 +114,7 @@ import ( // return err // } // hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(host.Id), +// HostSystemId: pulumi.String(host.Id), // NetworkAdapters: pulumi.StringArray{ // pulumi.String("vmnic0"), // pulumi.String("vmnic1"), @@ -130,7 +130,7 @@ import ( // return err // } // _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{ -// HostSystemId: *pulumi.String(host.Id), +// HostSystemId: pulumi.String(host.Id), // VirtualSwitchName: hostVirtualSwitch.Name, // VlanId: pulumi.Int(4095), // AllowPromiscuous: pulumi.Bool(true), diff --git a/sdk/go/vsphere/resourcePool.go b/sdk/go/vsphere/resourcePool.go index 2109efba..57848b24 100644 --- a/sdk/go/vsphere/resourcePool.go +++ b/sdk/go/vsphere/resourcePool.go @@ -50,7 +50,7 @@ import ( // return err // } // _, err = vsphere.NewResourcePool(ctx, "resourcePool", &vsphere.ResourcePoolArgs{ -// ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId), +// ParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId), // }) // if err != nil { // return err @@ -122,7 +122,7 @@ import ( // return err // } // resourcePoolParent, err := vsphere.NewResourcePool(ctx, "resourcePoolParent", &vsphere.ResourcePoolArgs{ -// ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId), +// ParentResourcePoolId: pulumi.String(computeCluster.ResourcePoolId), // }) // if err != nil { // return err diff --git a/sdk/go/vsphere/virtualDisk.go b/sdk/go/vsphere/virtualDisk.go index 526d1a30..3c43a1a2 100644 --- a/sdk/go/vsphere/virtualDisk.go +++ b/sdk/go/vsphere/virtualDisk.go @@ -25,7 +25,7 @@ type VirtualDisk struct { // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // - // Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + // Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead AdapterType pulumi.StringPtrOutput `pulumi:"adapterType"` // Tells the resource to create any // directories that are a part of the `vmdkPath` parameter if they are missing. @@ -105,7 +105,7 @@ type virtualDiskState struct { // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // - // Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + // Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead AdapterType *string `pulumi:"adapterType"` // Tells the resource to create any // directories that are a part of the `vmdkPath` parameter if they are missing. @@ -147,7 +147,7 @@ type VirtualDiskState struct { // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // - // Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + // Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead AdapterType pulumi.StringPtrInput // Tells the resource to create any // directories that are a part of the `vmdkPath` parameter if they are missing. @@ -193,7 +193,7 @@ type virtualDiskArgs struct { // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // - // Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + // Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead AdapterType *string `pulumi:"adapterType"` // Tells the resource to create any // directories that are a part of the `vmdkPath` parameter if they are missing. @@ -236,7 +236,7 @@ type VirtualDiskArgs struct { // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // - // Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + // Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead AdapterType pulumi.StringPtrInput // Tells the resource to create any // directories that are a part of the `vmdkPath` parameter if they are missing. @@ -364,7 +364,7 @@ func (o VirtualDiskOutput) ToVirtualDiskOutputWithContext(ctx context.Context) V // disk controller types. This parameter will be removed in future versions of the // vSphere provider. // -// Deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead +// Deprecated: this attribute has no effect on controller types - please use scsiType in VirtualMachine instead func (o VirtualDiskOutput) AdapterType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualDisk) pulumi.StringPtrOutput { return v.AdapterType }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/vsphere/vnic.go b/sdk/go/vsphere/vnic.go index e5ff0034..c7685074 100644 --- a/sdk/go/vsphere/vnic.go +++ b/sdk/go/vsphere/vnic.go @@ -47,10 +47,10 @@ import ( // return err // } // d1, err := vsphere.NewDistributedVirtualSwitch(ctx, "d1", &vsphere.DistributedVirtualSwitchArgs{ -// DatacenterId: *pulumi.String(dc.Id), +// DatacenterId: pulumi.String(dc.Id), // Hosts: vsphere.DistributedVirtualSwitchHostArray{ // &vsphere.DistributedVirtualSwitchHostArgs{ -// HostSystemId: *pulumi.String(h1.Id), +// HostSystemId: pulumi.String(h1.Id), // Devices: pulumi.StringArray{ // pulumi.String("vnic3"), // }, @@ -68,7 +68,7 @@ import ( // return err // } // _, err = vsphere.NewVnic(ctx, "v1", &vsphere.VnicArgs{ -// Host: *pulumi.String(h1.Id), +// Host: pulumi.String(h1.Id), // DistributedSwitchPort: d1.ID(), // DistributedPortGroup: p1.ID(), // Ipv4: &vsphere.VnicIpv4Args{ @@ -115,7 +115,7 @@ import ( // return err // } // hvs1, err := vsphere.NewHostVirtualSwitch(ctx, "hvs1", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(h1.Id), +// HostSystemId: pulumi.String(h1.Id), // NetworkAdapters: pulumi.StringArray{ // pulumi.String("vmnic3"), // pulumi.String("vmnic4"), @@ -132,13 +132,13 @@ import ( // } // p1, err := vsphere.NewHostPortGroup(ctx, "p1", &vsphere.HostPortGroupArgs{ // VirtualSwitchName: hvs1.Name, -// HostSystemId: *pulumi.String(h1.Id), +// HostSystemId: pulumi.String(h1.Id), // }) // if err != nil { // return err // } // _, err = vsphere.NewVnic(ctx, "v1", &vsphere.VnicArgs{ -// Host: *pulumi.String(h1.Id), +// Host: pulumi.String(h1.Id), // Portgroup: p1.Name, // Ipv4: &vsphere.VnicIpv4Args{ // Dhcp: pulumi.Bool(true), diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDisk.java b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDisk.java index e9fafa32..db6b9709 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDisk.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDisk.java @@ -30,10 +30,10 @@ public class VirtualDisk extends com.pulumi.resources.CustomResource { * vSphere provider. * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ @Export(name="adapterType", refs={String.class}, tree="[0]") private Output adapterType; diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDiskArgs.java b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDiskArgs.java index 57faf15c..c7d20769 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDiskArgs.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VirtualDiskArgs.java @@ -30,10 +30,10 @@ public final class VirtualDiskArgs extends com.pulumi.resources.ResourceArgs { * vSphere provider. * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ @Import(name="adapterType") private @Nullable Output adapterType; @@ -49,10 +49,10 @@ public final class VirtualDiskArgs extends com.pulumi.resources.ResourceArgs { * vSphere provider. * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Optional> adapterType() { return Optional.ofNullable(this.adapterType); } @@ -221,10 +221,10 @@ public Builder(VirtualDiskArgs defaults) { * @return builder * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Builder adapterType(@Nullable Output adapterType) { $.adapterType = adapterType; return this; @@ -244,10 +244,10 @@ public Builder adapterType(@Nullable Output adapterType) { * @return builder * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Builder adapterType(String adapterType) { return adapterType(Output.of(adapterType)); } diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualDiskState.java b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualDiskState.java index cb5ba3f4..eb07e734 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualDiskState.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/inputs/VirtualDiskState.java @@ -29,10 +29,10 @@ public final class VirtualDiskState extends com.pulumi.resources.ResourceArgs { * vSphere provider. * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ @Import(name="adapterType") private @Nullable Output adapterType; @@ -48,10 +48,10 @@ public final class VirtualDiskState extends com.pulumi.resources.ResourceArgs { * vSphere provider. * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Optional> adapterType() { return Optional.ofNullable(this.adapterType); } @@ -220,10 +220,10 @@ public Builder(VirtualDiskState defaults) { * @return builder * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Builder adapterType(@Nullable Output adapterType) { $.adapterType = adapterType; return this; @@ -243,10 +243,10 @@ public Builder adapterType(@Nullable Output adapterType) { * @return builder * * @deprecated - * this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead * */ - @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead */ + @Deprecated /* this attribute has no effect on controller types - please use scsi_type in vsphere.VirtualMachine instead */ public Builder adapterType(String adapterType) { return adapterType(Output.of(adapterType)); } diff --git a/sdk/nodejs/virtualDisk.ts b/sdk/nodejs/virtualDisk.ts index f73b292f..dfeba11c 100644 --- a/sdk/nodejs/virtualDisk.ts +++ b/sdk/nodejs/virtualDisk.ts @@ -43,7 +43,7 @@ export class VirtualDisk extends pulumi.CustomResource { * disk controller types. This parameter will be removed in future versions of the * vSphere provider. * - * @deprecated this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * @deprecated this attribute has no effect on controller types - please use scsiType in vsphere.VirtualMachine instead */ public readonly adapterType!: pulumi.Output; /** @@ -145,7 +145,7 @@ export interface VirtualDiskState { * disk controller types. This parameter will be removed in future versions of the * vSphere provider. * - * @deprecated this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * @deprecated this attribute has no effect on controller types - please use scsiType in vsphere.VirtualMachine instead */ adapterType?: pulumi.Input; /** @@ -204,7 +204,7 @@ export interface VirtualDiskArgs { * disk controller types. This parameter will be removed in future versions of the * vSphere provider. * - * @deprecated this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead + * @deprecated this attribute has no effect on controller types - please use scsiType in vsphere.VirtualMachine instead */ adapterType?: pulumi.Input; /** diff --git a/sdk/python/pulumi_vsphere/virtual_disk.py b/sdk/python/pulumi_vsphere/virtual_disk.py index 12a98bd2..39e3ad35 100644 --- a/sdk/python/pulumi_vsphere/virtual_disk.py +++ b/sdk/python/pulumi_vsphere/virtual_disk.py @@ -58,8 +58,8 @@ def __init__(__self__, *, pulumi.set(__self__, "size", size) pulumi.set(__self__, "vmdk_path", vmdk_path) if adapter_type is not None: - warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) - pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") + warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning) + pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""") if adapter_type is not None: pulumi.set(__self__, "adapter_type", adapter_type) if create_directories is not None: @@ -121,8 +121,8 @@ def adapter_type(self) -> Optional[pulumi.Input[str]]: disk controller types. This parameter will be removed in future versions of the vSphere provider. """ - warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) - pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") + warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning) + pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""") return pulumi.get(self, "adapter_type") @@ -224,8 +224,8 @@ def __init__(__self__, *, be created. This needs to end in `.vmdk`. """ if adapter_type is not None: - warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) - pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") + warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning) + pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""") if adapter_type is not None: pulumi.set(__self__, "adapter_type", adapter_type) if create_directories is not None: @@ -255,8 +255,8 @@ def adapter_type(self) -> Optional[pulumi.Input[str]]: disk controller types. This parameter will be removed in future versions of the vSphere provider. """ - warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) - pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") + warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning) + pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""") return pulumi.get(self, "adapter_type") @@ -534,8 +534,8 @@ def adapter_type(self) -> pulumi.Output[Optional[str]]: disk controller types. This parameter will be removed in future versions of the vSphere provider. """ - warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) - pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") + warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning) + pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""") return pulumi.get(self, "adapter_type")