1. Packages
  2. Vsphere Provider
  3. API Docs
  4. HostPortGroup
vSphere v4.13.2 published on Wednesday, Apr 9, 2025 by Pulumi

vsphere.HostPortGroup

Explore with Pulumi AI

The vsphere.HostPortGroup resource can be used to manage port groups on ESXi hosts. These port groups are connected to standard switches, which can be managed by the vsphere.HostVirtualSwitch resource.

For an overview on vSphere networking concepts, see the product documentation.

Example Usage

Create a Virtual Switch and Bind a Port Group:

import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = vsphere.getDatacenter({
    name: "dc-01",
});
const host = datacenter.then(datacenter => vsphere.getHost({
    name: "esxi-01.example.com",
    datacenterId: datacenter.id,
}));
const hostVirtualSwitch = new vsphere.HostVirtualSwitch("host_virtual_switch", {
    name: "switch-01",
    hostSystemId: host.then(host => host.id),
    networkAdapters: [
        "vmnic0",
        "vmnic1",
    ],
    activeNics: ["vmnic0"],
    standbyNics: ["vmnic1"],
});
const pg = new vsphere.HostPortGroup("pg", {
    name: "portgroup-01",
    hostSystemId: host.then(host => host.id),
    virtualSwitchName: hostVirtualSwitch.name,
});
Copy
import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc-01")
host = vsphere.get_host(name="esxi-01.example.com",
    datacenter_id=datacenter.id)
host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
    name="switch-01",
    host_system_id=host.id,
    network_adapters=[
        "vmnic0",
        "vmnic1",
    ],
    active_nics=["vmnic0"],
    standby_nics=["vmnic1"])
pg = vsphere.HostPortGroup("pg",
    name="portgroup-01",
    host_system_id=host.id,
    virtual_switch_name=host_virtual_switch.name)
Copy
package main

import (
	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
			Name: pulumi.StringRef("dc-01"),
		}, nil)
		if err != nil {
			return err
		}
		host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
			Name:         pulumi.StringRef("esxi-01.example.com"),
			DatacenterId: datacenter.Id,
		}, nil)
		if err != nil {
			return err
		}
		hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "host_virtual_switch", &vsphere.HostVirtualSwitchArgs{
			Name:         pulumi.String("switch-01"),
			HostSystemId: pulumi.String(host.Id),
			NetworkAdapters: pulumi.StringArray{
				pulumi.String("vmnic0"),
				pulumi.String("vmnic1"),
			},
			ActiveNics: pulumi.StringArray{
				pulumi.String("vmnic0"),
			},
			StandbyNics: pulumi.StringArray{
				pulumi.String("vmnic1"),
			},
		})
		if err != nil {
			return err
		}
		_, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{
			Name:              pulumi.String("portgroup-01"),
			HostSystemId:      pulumi.String(host.Id),
			VirtualSwitchName: hostVirtualSwitch.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;

return await Deployment.RunAsync(() => 
{
    var datacenter = VSphere.GetDatacenter.Invoke(new()
    {
        Name = "dc-01",
    });

    var host = VSphere.GetHost.Invoke(new()
    {
        Name = "esxi-01.example.com",
        DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
    });

    var hostVirtualSwitch = new VSphere.HostVirtualSwitch("host_virtual_switch", new()
    {
        Name = "switch-01",
        HostSystemId = host.Apply(getHostResult => getHostResult.Id),
        NetworkAdapters = new[]
        {
            "vmnic0",
            "vmnic1",
        },
        ActiveNics = new[]
        {
            "vmnic0",
        },
        StandbyNics = new[]
        {
            "vmnic1",
        },
    });

    var pg = new VSphere.HostPortGroup("pg", new()
    {
        Name = "portgroup-01",
        HostSystemId = host.Apply(getHostResult => getHostResult.Id),
        VirtualSwitchName = hostVirtualSwitch.Name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetDatacenterArgs;
import com.pulumi.vsphere.inputs.GetHostArgs;
import com.pulumi.vsphere.HostVirtualSwitch;
import com.pulumi.vsphere.HostVirtualSwitchArgs;
import com.pulumi.vsphere.HostPortGroup;
import com.pulumi.vsphere.HostPortGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
            .name("dc-01")
            .build());

        final var host = VsphereFunctions.getHost(GetHostArgs.builder()
            .name("esxi-01.example.com")
            .datacenterId(datacenter.id())
            .build());

        var hostVirtualSwitch = new HostVirtualSwitch("hostVirtualSwitch", HostVirtualSwitchArgs.builder()
            .name("switch-01")
            .hostSystemId(host.id())
            .networkAdapters(            
                "vmnic0",
                "vmnic1")
            .activeNics("vmnic0")
            .standbyNics("vmnic1")
            .build());

        var pg = new HostPortGroup("pg", HostPortGroupArgs.builder()
            .name("portgroup-01")
            .hostSystemId(host.id())
            .virtualSwitchName(hostVirtualSwitch.name())
            .build());

    }
}
Copy
resources:
  hostVirtualSwitch:
    type: vsphere:HostVirtualSwitch
    name: host_virtual_switch
    properties:
      name: switch-01
      hostSystemId: ${host.id}
      networkAdapters:
        - vmnic0
        - vmnic1
      activeNics:
        - vmnic0
      standbyNics:
        - vmnic1
  pg:
    type: vsphere:HostPortGroup
    properties:
      name: portgroup-01
      hostSystemId: ${host.id}
      virtualSwitchName: ${hostVirtualSwitch.name}
variables:
  datacenter:
    fn::invoke:
      function: vsphere:getDatacenter
      arguments:
        name: dc-01
  host:
    fn::invoke:
      function: vsphere:getHost
      arguments:
        name: esxi-01.example.com
        datacenterId: ${datacenter.id}
Copy

Create a Port Group with a VLAN and ab Override:

This example sets the trunk mode VLAN (4095, which passes through all tags) and sets allow_promiscuous to ensure that all traffic is seen on the port. The setting overrides the implicit default of false set on the standard switch.

import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = vsphere.getDatacenter({
    name: "dc-01",
});
const host = datacenter.then(datacenter => vsphere.getHost({
    name: "esxi-01.example.com",
    datacenterId: datacenter.id,
}));
const hostVirtualSwitch = new vsphere.HostVirtualSwitch("host_virtual_switch", {
    name: "switch-01",
    hostSystemId: host.then(host => host.id),
    networkAdapters: [
        "vmnic0",
        "vmnic1",
    ],
    activeNics: ["vmnic0"],
    standbyNics: ["vmnic1"],
});
const pg = new vsphere.HostPortGroup("pg", {
    name: "portgroup-01",
    hostSystemId: host.then(host => host.id),
    virtualSwitchName: hostVirtualSwitch.name,
    vlanId: 4095,
    allowPromiscuous: true,
});
Copy
import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc-01")
host = vsphere.get_host(name="esxi-01.example.com",
    datacenter_id=datacenter.id)
host_virtual_switch = vsphere.HostVirtualSwitch("host_virtual_switch",
    name="switch-01",
    host_system_id=host.id,
    network_adapters=[
        "vmnic0",
        "vmnic1",
    ],
    active_nics=["vmnic0"],
    standby_nics=["vmnic1"])
pg = vsphere.HostPortGroup("pg",
    name="portgroup-01",
    host_system_id=host.id,
    virtual_switch_name=host_virtual_switch.name,
    vlan_id=4095,
    allow_promiscuous=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
			Name: pulumi.StringRef("dc-01"),
		}, nil)
		if err != nil {
			return err
		}
		host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
			Name:         pulumi.StringRef("esxi-01.example.com"),
			DatacenterId: datacenter.Id,
		}, nil)
		if err != nil {
			return err
		}
		hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "host_virtual_switch", &vsphere.HostVirtualSwitchArgs{
			Name:         pulumi.String("switch-01"),
			HostSystemId: pulumi.String(host.Id),
			NetworkAdapters: pulumi.StringArray{
				pulumi.String("vmnic0"),
				pulumi.String("vmnic1"),
			},
			ActiveNics: pulumi.StringArray{
				pulumi.String("vmnic0"),
			},
			StandbyNics: pulumi.StringArray{
				pulumi.String("vmnic1"),
			},
		})
		if err != nil {
			return err
		}
		_, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{
			Name:              pulumi.String("portgroup-01"),
			HostSystemId:      pulumi.String(host.Id),
			VirtualSwitchName: hostVirtualSwitch.Name,
			VlanId:            pulumi.Int(4095),
			AllowPromiscuous:  pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;

return await Deployment.RunAsync(() => 
{
    var datacenter = VSphere.GetDatacenter.Invoke(new()
    {
        Name = "dc-01",
    });

    var host = VSphere.GetHost.Invoke(new()
    {
        Name = "esxi-01.example.com",
        DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
    });

    var hostVirtualSwitch = new VSphere.HostVirtualSwitch("host_virtual_switch", new()
    {
        Name = "switch-01",
        HostSystemId = host.Apply(getHostResult => getHostResult.Id),
        NetworkAdapters = new[]
        {
            "vmnic0",
            "vmnic1",
        },
        ActiveNics = new[]
        {
            "vmnic0",
        },
        StandbyNics = new[]
        {
            "vmnic1",
        },
    });

    var pg = new VSphere.HostPortGroup("pg", new()
    {
        Name = "portgroup-01",
        HostSystemId = host.Apply(getHostResult => getHostResult.Id),
        VirtualSwitchName = hostVirtualSwitch.Name,
        VlanId = 4095,
        AllowPromiscuous = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetDatacenterArgs;
import com.pulumi.vsphere.inputs.GetHostArgs;
import com.pulumi.vsphere.HostVirtualSwitch;
import com.pulumi.vsphere.HostVirtualSwitchArgs;
import com.pulumi.vsphere.HostPortGroup;
import com.pulumi.vsphere.HostPortGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
            .name("dc-01")
            .build());

        final var host = VsphereFunctions.getHost(GetHostArgs.builder()
            .name("esxi-01.example.com")
            .datacenterId(datacenter.id())
            .build());

        var hostVirtualSwitch = new HostVirtualSwitch("hostVirtualSwitch", HostVirtualSwitchArgs.builder()
            .name("switch-01")
            .hostSystemId(host.id())
            .networkAdapters(            
                "vmnic0",
                "vmnic1")
            .activeNics("vmnic0")
            .standbyNics("vmnic1")
            .build());

        var pg = new HostPortGroup("pg", HostPortGroupArgs.builder()
            .name("portgroup-01")
            .hostSystemId(host.id())
            .virtualSwitchName(hostVirtualSwitch.name())
            .vlanId(4095)
            .allowPromiscuous(true)
            .build());

    }
}
Copy
resources:
  hostVirtualSwitch:
    type: vsphere:HostVirtualSwitch
    name: host_virtual_switch
    properties:
      name: switch-01
      hostSystemId: ${host.id}
      networkAdapters:
        - vmnic0
        - vmnic1
      activeNics:
        - vmnic0
      standbyNics:
        - vmnic1
  pg:
    type: vsphere:HostPortGroup
    properties:
      name: portgroup-01
      hostSystemId: ${host.id}
      virtualSwitchName: ${hostVirtualSwitch.name}
      vlanId: 4095
      allowPromiscuous: true
variables:
  datacenter:
    fn::invoke:
      function: vsphere:getDatacenter
      arguments:
        name: dc-01
  host:
    fn::invoke:
      function: vsphere:getHost
      arguments:
        name: esxi-01.example.com
        datacenterId: ${datacenter.id}
Copy

Create HostPortGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new HostPortGroup(name: string, args: HostPortGroupArgs, opts?: CustomResourceOptions);
@overload
def HostPortGroup(resource_name: str,
                  args: HostPortGroupArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def HostPortGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  host_system_id: Optional[str] = None,
                  virtual_switch_name: Optional[str] = None,
                  notify_switches: Optional[bool] = None,
                  shaping_average_bandwidth: Optional[int] = None,
                  check_beacon: Optional[bool] = None,
                  failback: Optional[bool] = None,
                  allow_mac_changes: Optional[bool] = None,
                  name: Optional[str] = None,
                  active_nics: Optional[Sequence[str]] = None,
                  allow_promiscuous: Optional[bool] = None,
                  shaping_burst_size: Optional[int] = None,
                  shaping_enabled: Optional[bool] = None,
                  shaping_peak_bandwidth: Optional[int] = None,
                  standby_nics: Optional[Sequence[str]] = None,
                  teaming_policy: Optional[str] = None,
                  allow_forged_transmits: Optional[bool] = None,
                  vlan_id: Optional[int] = None)
func NewHostPortGroup(ctx *Context, name string, args HostPortGroupArgs, opts ...ResourceOption) (*HostPortGroup, error)
public HostPortGroup(string name, HostPortGroupArgs args, CustomResourceOptions? opts = null)
public HostPortGroup(String name, HostPortGroupArgs args)
public HostPortGroup(String name, HostPortGroupArgs args, CustomResourceOptions options)
type: vsphere:HostPortGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HostPortGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HostPortGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HostPortGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HostPortGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HostPortGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var hostPortGroupResource = new VSphere.HostPortGroup("hostPortGroupResource", new()
{
    HostSystemId = "string",
    VirtualSwitchName = "string",
    NotifySwitches = false,
    ShapingAverageBandwidth = 0,
    CheckBeacon = false,
    Failback = false,
    AllowMacChanges = false,
    Name = "string",
    ActiveNics = new[]
    {
        "string",
    },
    AllowPromiscuous = false,
    ShapingBurstSize = 0,
    ShapingEnabled = false,
    ShapingPeakBandwidth = 0,
    StandbyNics = new[]
    {
        "string",
    },
    TeamingPolicy = "string",
    AllowForgedTransmits = false,
    VlanId = 0,
});
Copy
example, err := vsphere.NewHostPortGroup(ctx, "hostPortGroupResource", &vsphere.HostPortGroupArgs{
	HostSystemId:            pulumi.String("string"),
	VirtualSwitchName:       pulumi.String("string"),
	NotifySwitches:          pulumi.Bool(false),
	ShapingAverageBandwidth: pulumi.Int(0),
	CheckBeacon:             pulumi.Bool(false),
	Failback:                pulumi.Bool(false),
	AllowMacChanges:         pulumi.Bool(false),
	Name:                    pulumi.String("string"),
	ActiveNics: pulumi.StringArray{
		pulumi.String("string"),
	},
	AllowPromiscuous:     pulumi.Bool(false),
	ShapingBurstSize:     pulumi.Int(0),
	ShapingEnabled:       pulumi.Bool(false),
	ShapingPeakBandwidth: pulumi.Int(0),
	StandbyNics: pulumi.StringArray{
		pulumi.String("string"),
	},
	TeamingPolicy:        pulumi.String("string"),
	AllowForgedTransmits: pulumi.Bool(false),
	VlanId:               pulumi.Int(0),
})
Copy
var hostPortGroupResource = new HostPortGroup("hostPortGroupResource", HostPortGroupArgs.builder()
    .hostSystemId("string")
    .virtualSwitchName("string")
    .notifySwitches(false)
    .shapingAverageBandwidth(0)
    .checkBeacon(false)
    .failback(false)
    .allowMacChanges(false)
    .name("string")
    .activeNics("string")
    .allowPromiscuous(false)
    .shapingBurstSize(0)
    .shapingEnabled(false)
    .shapingPeakBandwidth(0)
    .standbyNics("string")
    .teamingPolicy("string")
    .allowForgedTransmits(false)
    .vlanId(0)
    .build());
Copy
host_port_group_resource = vsphere.HostPortGroup("hostPortGroupResource",
    host_system_id="string",
    virtual_switch_name="string",
    notify_switches=False,
    shaping_average_bandwidth=0,
    check_beacon=False,
    failback=False,
    allow_mac_changes=False,
    name="string",
    active_nics=["string"],
    allow_promiscuous=False,
    shaping_burst_size=0,
    shaping_enabled=False,
    shaping_peak_bandwidth=0,
    standby_nics=["string"],
    teaming_policy="string",
    allow_forged_transmits=False,
    vlan_id=0)
Copy
const hostPortGroupResource = new vsphere.HostPortGroup("hostPortGroupResource", {
    hostSystemId: "string",
    virtualSwitchName: "string",
    notifySwitches: false,
    shapingAverageBandwidth: 0,
    checkBeacon: false,
    failback: false,
    allowMacChanges: false,
    name: "string",
    activeNics: ["string"],
    allowPromiscuous: false,
    shapingBurstSize: 0,
    shapingEnabled: false,
    shapingPeakBandwidth: 0,
    standbyNics: ["string"],
    teamingPolicy: "string",
    allowForgedTransmits: false,
    vlanId: 0,
});
Copy
type: vsphere:HostPortGroup
properties:
    activeNics:
        - string
    allowForgedTransmits: false
    allowMacChanges: false
    allowPromiscuous: false
    checkBeacon: false
    failback: false
    hostSystemId: string
    name: string
    notifySwitches: false
    shapingAverageBandwidth: 0
    shapingBurstSize: 0
    shapingEnabled: false
    shapingPeakBandwidth: 0
    standbyNics:
        - string
    teamingPolicy: string
    virtualSwitchName: string
    vlanId: 0
Copy

HostPortGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The HostPortGroup resource accepts the following input properties:

HostSystemId
This property is required.
Changes to this property will trigger replacement.
string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
VirtualSwitchName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
ActiveNics List<string>
List of active network adapters used for load balancing.
AllowForgedTransmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
AllowMacChanges bool
Controls whether or not the Media Access Control (MAC) address can be changed.
AllowPromiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
CheckBeacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
Failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
Name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
NotifySwitches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ShapingAverageBandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
ShapingBurstSize int
The maximum burst size allowed in bytes if traffic shaping is enabled.
ShapingEnabled bool
Enable traffic shaping on this virtual switch or port group.
ShapingPeakBandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
StandbyNics List<string>
List of standby network adapters used for failover.
TeamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
VlanId int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
HostSystemId
This property is required.
Changes to this property will trigger replacement.
string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
VirtualSwitchName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
ActiveNics []string
List of active network adapters used for load balancing.
AllowForgedTransmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
AllowMacChanges bool
Controls whether or not the Media Access Control (MAC) address can be changed.
AllowPromiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
CheckBeacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
Failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
Name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
NotifySwitches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ShapingAverageBandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
ShapingBurstSize int
The maximum burst size allowed in bytes if traffic shaping is enabled.
ShapingEnabled bool
Enable traffic shaping on this virtual switch or port group.
ShapingPeakBandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
StandbyNics []string
List of standby network adapters used for failover.
TeamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
VlanId int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
hostSystemId
This property is required.
Changes to this property will trigger replacement.
String
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
virtualSwitchName
This property is required.
Changes to this property will trigger replacement.
String
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
activeNics List<String>
List of active network adapters used for load balancing.
allowForgedTransmits Boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges Boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous Boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon Boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
failback Boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
name Changes to this property will trigger replacement. String
The name of the port group. Forces a new resource if changed.
notifySwitches Boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
shapingAverageBandwidth Integer
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize Integer
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled Boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth Integer
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics List<String>
List of standby network adapters used for failover.
teamingPolicy String
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
vlanId Integer
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
hostSystemId
This property is required.
Changes to this property will trigger replacement.
string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
virtualSwitchName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
activeNics string[]
List of active network adapters used for load balancing.
allowForgedTransmits boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
failback boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
notifySwitches boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
shapingAverageBandwidth number
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize number
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth number
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics string[]
List of standby network adapters used for failover.
teamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
vlanId number
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
host_system_id
This property is required.
Changes to this property will trigger replacement.
str
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
virtual_switch_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
active_nics Sequence[str]
List of active network adapters used for load balancing.
allow_forged_transmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allow_mac_changes bool
Controls whether or not the Media Access Control (MAC) address can be changed.
allow_promiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
check_beacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
name Changes to this property will trigger replacement. str
The name of the port group. Forces a new resource if changed.
notify_switches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
shaping_average_bandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
shaping_burst_size int
The maximum burst size allowed in bytes if traffic shaping is enabled.
shaping_enabled bool
Enable traffic shaping on this virtual switch or port group.
shaping_peak_bandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standby_nics Sequence[str]
List of standby network adapters used for failover.
teaming_policy str
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
vlan_id int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
hostSystemId
This property is required.
Changes to this property will trigger replacement.
String
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
virtualSwitchName
This property is required.
Changes to this property will trigger replacement.
String
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
activeNics List<String>
List of active network adapters used for load balancing.
allowForgedTransmits Boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges Boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous Boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon Boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
failback Boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
name Changes to this property will trigger replacement. String
The name of the port group. Forces a new resource if changed.
notifySwitches Boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
shapingAverageBandwidth Number
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize Number
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled Boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth Number
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics List<String>
List of standby network adapters used for failover.
teamingPolicy String
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
vlanId Number
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.

Outputs

All input properties are implicitly available as output properties. Additionally, the HostPortGroup resource produces the following output properties:

ComputedPolicy Dictionary<string, string>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
Id string
The provider-assigned unique ID for this managed resource.
Key string
The key for this port group as returned from the vSphere API.
Ports List<Pulumi.VSphere.Outputs.HostPortGroupPort>
A list of ports that currently exist and are used on this port group.
ComputedPolicy map[string]string
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
Id string
The provider-assigned unique ID for this managed resource.
Key string
The key for this port group as returned from the vSphere API.
Ports []HostPortGroupPort
A list of ports that currently exist and are used on this port group.
computedPolicy Map<String,String>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
id String
The provider-assigned unique ID for this managed resource.
key String
The key for this port group as returned from the vSphere API.
ports List<HostPortGroupPort>
A list of ports that currently exist and are used on this port group.
computedPolicy {[key: string]: string}
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
id string
The provider-assigned unique ID for this managed resource.
key string
The key for this port group as returned from the vSphere API.
ports HostPortGroupPort[]
A list of ports that currently exist and are used on this port group.
computed_policy Mapping[str, str]
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
id str
The provider-assigned unique ID for this managed resource.
key str
The key for this port group as returned from the vSphere API.
ports Sequence[HostPortGroupPort]
A list of ports that currently exist and are used on this port group.
computedPolicy Map<String>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
id String
The provider-assigned unique ID for this managed resource.
key String
The key for this port group as returned from the vSphere API.
ports List<Property Map>
A list of ports that currently exist and are used on this port group.

Look up Existing HostPortGroup Resource

Get an existing HostPortGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HostPortGroupState, opts?: CustomResourceOptions): HostPortGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active_nics: Optional[Sequence[str]] = None,
        allow_forged_transmits: Optional[bool] = None,
        allow_mac_changes: Optional[bool] = None,
        allow_promiscuous: Optional[bool] = None,
        check_beacon: Optional[bool] = None,
        computed_policy: Optional[Mapping[str, str]] = None,
        failback: Optional[bool] = None,
        host_system_id: Optional[str] = None,
        key: Optional[str] = None,
        name: Optional[str] = None,
        notify_switches: Optional[bool] = None,
        ports: Optional[Sequence[HostPortGroupPortArgs]] = None,
        shaping_average_bandwidth: Optional[int] = None,
        shaping_burst_size: Optional[int] = None,
        shaping_enabled: Optional[bool] = None,
        shaping_peak_bandwidth: Optional[int] = None,
        standby_nics: Optional[Sequence[str]] = None,
        teaming_policy: Optional[str] = None,
        virtual_switch_name: Optional[str] = None,
        vlan_id: Optional[int] = None) -> HostPortGroup
func GetHostPortGroup(ctx *Context, name string, id IDInput, state *HostPortGroupState, opts ...ResourceOption) (*HostPortGroup, error)
public static HostPortGroup Get(string name, Input<string> id, HostPortGroupState? state, CustomResourceOptions? opts = null)
public static HostPortGroup get(String name, Output<String> id, HostPortGroupState state, CustomResourceOptions options)
resources:  _:    type: vsphere:HostPortGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ActiveNics List<string>
List of active network adapters used for load balancing.
AllowForgedTransmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
AllowMacChanges bool
Controls whether or not the Media Access Control (MAC) address can be changed.
AllowPromiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
CheckBeacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
ComputedPolicy Dictionary<string, string>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
Failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
HostSystemId Changes to this property will trigger replacement. string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
Key string
The key for this port group as returned from the vSphere API.
Name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
NotifySwitches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
Ports List<Pulumi.VSphere.Inputs.HostPortGroupPort>
A list of ports that currently exist and are used on this port group.
ShapingAverageBandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
ShapingBurstSize int
The maximum burst size allowed in bytes if traffic shaping is enabled.
ShapingEnabled bool
Enable traffic shaping on this virtual switch or port group.
ShapingPeakBandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
StandbyNics List<string>
List of standby network adapters used for failover.
TeamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
VirtualSwitchName Changes to this property will trigger replacement. string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
VlanId int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
ActiveNics []string
List of active network adapters used for load balancing.
AllowForgedTransmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
AllowMacChanges bool
Controls whether or not the Media Access Control (MAC) address can be changed.
AllowPromiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
CheckBeacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
ComputedPolicy map[string]string
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
Failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
HostSystemId Changes to this property will trigger replacement. string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
Key string
The key for this port group as returned from the vSphere API.
Name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
NotifySwitches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
Ports []HostPortGroupPortArgs
A list of ports that currently exist and are used on this port group.
ShapingAverageBandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
ShapingBurstSize int
The maximum burst size allowed in bytes if traffic shaping is enabled.
ShapingEnabled bool
Enable traffic shaping on this virtual switch or port group.
ShapingPeakBandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
StandbyNics []string
List of standby network adapters used for failover.
TeamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
VirtualSwitchName Changes to this property will trigger replacement. string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
VlanId int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
activeNics List<String>
List of active network adapters used for load balancing.
allowForgedTransmits Boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges Boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous Boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon Boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computedPolicy Map<String,String>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback Boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
hostSystemId Changes to this property will trigger replacement. String
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key String
The key for this port group as returned from the vSphere API.
name Changes to this property will trigger replacement. String
The name of the port group. Forces a new resource if changed.
notifySwitches Boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports List<HostPortGroupPort>
A list of ports that currently exist and are used on this port group.
shapingAverageBandwidth Integer
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize Integer
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled Boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth Integer
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics List<String>
List of standby network adapters used for failover.
teamingPolicy String
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
virtualSwitchName Changes to this property will trigger replacement. String
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlanId Integer
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
activeNics string[]
List of active network adapters used for load balancing.
allowForgedTransmits boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computedPolicy {[key: string]: string}
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
hostSystemId Changes to this property will trigger replacement. string
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key string
The key for this port group as returned from the vSphere API.
name Changes to this property will trigger replacement. string
The name of the port group. Forces a new resource if changed.
notifySwitches boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports HostPortGroupPort[]
A list of ports that currently exist and are used on this port group.
shapingAverageBandwidth number
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize number
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth number
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics string[]
List of standby network adapters used for failover.
teamingPolicy string
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
virtualSwitchName Changes to this property will trigger replacement. string
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlanId number
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
active_nics Sequence[str]
List of active network adapters used for load balancing.
allow_forged_transmits bool
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allow_mac_changes bool
Controls whether or not the Media Access Control (MAC) address can be changed.
allow_promiscuous bool
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
check_beacon bool
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computed_policy Mapping[str, str]
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback bool
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
host_system_id Changes to this property will trigger replacement. str
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key str
The key for this port group as returned from the vSphere API.
name Changes to this property will trigger replacement. str
The name of the port group. Forces a new resource if changed.
notify_switches bool
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports Sequence[HostPortGroupPortArgs]
A list of ports that currently exist and are used on this port group.
shaping_average_bandwidth int
The average bandwidth in bits per second if traffic shaping is enabled.
shaping_burst_size int
The maximum burst size allowed in bytes if traffic shaping is enabled.
shaping_enabled bool
Enable traffic shaping on this virtual switch or port group.
shaping_peak_bandwidth int
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standby_nics Sequence[str]
List of standby network adapters used for failover.
teaming_policy str
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
virtual_switch_name Changes to this property will trigger replacement. str
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlan_id int
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.
activeNics List<String>
List of active network adapters used for load balancing.
allowForgedTransmits Boolean
Controls whether or not the virtual network adapter is allowed to send network traffic with a different MAC address than that of its own.
allowMacChanges Boolean
Controls whether or not the Media Access Control (MAC) address can be changed.
allowPromiscuous Boolean
Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
checkBeacon Boolean
Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
computedPolicy Map<String>
A map with a full set of the policy options computed from defaults and overrides, explaining the effective policy for this port group.
failback Boolean
If true, the teaming policy will re-activate failed interfaces higher in precedence when they come back up.
hostSystemId Changes to this property will trigger replacement. String
The managed object ID of the host to set the port group up on. Forces a new resource if changed.
key String
The key for this port group as returned from the vSphere API.
name Changes to this property will trigger replacement. String
The name of the port group. Forces a new resource if changed.
notifySwitches Boolean
If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
ports List<Property Map>
A list of ports that currently exist and are used on this port group.
shapingAverageBandwidth Number
The average bandwidth in bits per second if traffic shaping is enabled.
shapingBurstSize Number
The maximum burst size allowed in bytes if traffic shaping is enabled.
shapingEnabled Boolean
Enable traffic shaping on this virtual switch or port group.
shapingPeakBandwidth Number
The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
standbyNics List<String>
List of standby network adapters used for failover.
teamingPolicy String
The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
virtualSwitchName Changes to this property will trigger replacement. String
The name of the virtual switch to bind this port group to. Forces a new resource if changed.
vlanId Number
The VLAN ID/trunk mode for this port group. An ID of 0 denotes no tagging, an ID of 1-4094 tags with the specific ID, and an ID of 4095 enables trunk mode, allowing the guest to manage its own tagging. Default: 0.

Supporting Types

HostPortGroupPort
, HostPortGroupPortArgs

Key string
The key for this port group as returned from the vSphere API.
MacAddresses List<string>
The MAC addresses of the network service of the virtual machine connected on this port.
Type string
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.
Key string
The key for this port group as returned from the vSphere API.
MacAddresses []string
The MAC addresses of the network service of the virtual machine connected on this port.
Type string
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.
key String
The key for this port group as returned from the vSphere API.
macAddresses List<String>
The MAC addresses of the network service of the virtual machine connected on this port.
type String
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.
key string
The key for this port group as returned from the vSphere API.
macAddresses string[]
The MAC addresses of the network service of the virtual machine connected on this port.
type string
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.
key str
The key for this port group as returned from the vSphere API.
mac_addresses Sequence[str]
The MAC addresses of the network service of the virtual machine connected on this port.
type str
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.
key String
The key for this port group as returned from the vSphere API.
macAddresses List<String>
The MAC addresses of the network service of the virtual machine connected on this port.
type String
Type type of the entity connected on this port. Possible values are host (VMKkernel), systemManagement (service console), virtualMachine, or unknown.

Import

An existing host port group can be imported into this resource

using the host port group’s ID. An example is below:

$ pulumi import vsphere:index/hostPortGroup:HostPortGroup management tf-HostPortGroup:host-123:management
Copy

The above would import the management host port group from host with ID host-123.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vSphere pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.