Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

HostPortGroup

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

For an overview on vSphere networking concepts, see this page.

Importing

An existing host port group can be imported into this resource using the host port group’s ID. An example is below:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}

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

Example Usage

Create a virtual switch and bind a port group to it

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
    public MyStack()
    {
        var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
        {
            Name = "dc1",
        }));
        var esxiHost = datacenter.Apply(datacenter => Output.Create(VSphere.GetHost.InvokeAsync(new VSphere.GetHostArgs
        {
            DatacenterId = datacenter.Id,
            Name = "esxi1",
        })));
        var @switch = new VSphere.HostVirtualSwitch("switch", new VSphere.HostVirtualSwitchArgs
        {
            ActiveNics = 
            {
                "vmnic0",
            },
            HostSystemId = esxiHost.Apply(esxiHost => esxiHost.Id),
            NetworkAdapters = 
            {
                "vmnic0",
                "vmnic1",
            },
            StandbyNics = 
            {
                "vmnic1",
            },
        });
        var pg = new VSphere.HostPortGroup("pg", new VSphere.HostPortGroupArgs
        {
            HostSystemId = esxiHost.Apply(esxiHost => esxiHost.Id),
            VirtualSwitchName = @switch.Name,
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "dc1"
        datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
            Name: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        opt1 := "esxi1"
        esxiHost, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
            DatacenterId: datacenter.Id,
            Name:         &opt1,
        }, nil)
        if err != nil {
            return err
        }
        _, err = vsphere.NewHostVirtualSwitch(ctx, "_switch", &vsphere.HostVirtualSwitchArgs{
            ActiveNics: pulumi.StringArray{
                pulumi.String("vmnic0"),
            },
            HostSystemId: pulumi.String(esxiHost.Id),
            NetworkAdapters: pulumi.StringArray{
                pulumi.String("vmnic0"),
                pulumi.String("vmnic1"),
            },
            StandbyNics: pulumi.StringArray{
                pulumi.String("vmnic1"),
            },
        })
        if err != nil {
            return err
        }
        _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{
            HostSystemId:      pulumi.String(esxiHost.Id),
            VirtualSwitchName: _switch.Name,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc1")
esxi_host = vsphere.get_host(datacenter_id=datacenter.id,
    name="esxi1")
switch = vsphere.HostVirtualSwitch("switch",
    active_nics=["vmnic0"],
    host_system_id=esxi_host.id,
    network_adapters=[
        "vmnic0",
        "vmnic1",
    ],
    standby_nics=["vmnic1"])
pg = vsphere.HostPortGroup("pg",
    host_system_id=esxi_host.id,
    virtual_switch_name=switch.name)
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = pulumi.output(vsphere.getDatacenter({
    name: "dc1",
}, { async: true }));
const esxiHost = datacenter.apply(datacenter => vsphere.getHost({
    datacenterId: datacenter.id,
    name: "esxi1",
}, { async: true }));
const switchHostVirtualSwitch = new vsphere.HostVirtualSwitch("switch", {
    activeNics: ["vmnic0"],
    hostSystemId: esxiHost.id,
    networkAdapters: [
        "vmnic0",
        "vmnic1",
    ],
    standbyNics: ["vmnic1"],
});
const pg = new vsphere.HostPortGroup("pg", {
    hostSystemId: esxiHost.id,
    virtualSwitchName: switchHostVirtualSwitch.name,
});

Create a port group with VLAN set and some overrides

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
    public MyStack()
    {
        var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
        {
            Name = "dc1",
        }));
        var esxiHost = datacenter.Apply(datacenter => Output.Create(VSphere.GetHost.InvokeAsync(new VSphere.GetHostArgs
        {
            DatacenterId = datacenter.Id,
            Name = "esxi1",
        })));
        var @switch = new VSphere.HostVirtualSwitch("switch", new VSphere.HostVirtualSwitchArgs
        {
            ActiveNics = 
            {
                "vmnic0",
            },
            HostSystemId = esxiHost.Apply(esxiHost => esxiHost.Id),
            NetworkAdapters = 
            {
                "vmnic0",
                "vmnic1",
            },
            StandbyNics = 
            {
                "vmnic1",
            },
        });
        var pg = new VSphere.HostPortGroup("pg", new VSphere.HostPortGroupArgs
        {
            AllowPromiscuous = true,
            HostSystemId = esxiHost.Apply(esxiHost => esxiHost.Id),
            VirtualSwitchName = @switch.Name,
            VlanId = 4095,
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "dc1"
        datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
            Name: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        opt1 := "esxi1"
        esxiHost, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
            DatacenterId: datacenter.Id,
            Name:         &opt1,
        }, nil)
        if err != nil {
            return err
        }
        _, err = vsphere.NewHostVirtualSwitch(ctx, "_switch", &vsphere.HostVirtualSwitchArgs{
            ActiveNics: pulumi.StringArray{
                pulumi.String("vmnic0"),
            },
            HostSystemId: pulumi.String(esxiHost.Id),
            NetworkAdapters: pulumi.StringArray{
                pulumi.String("vmnic0"),
                pulumi.String("vmnic1"),
            },
            StandbyNics: pulumi.StringArray{
                pulumi.String("vmnic1"),
            },
        })
        if err != nil {
            return err
        }
        _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{
            AllowPromiscuous:  pulumi.Bool(true),
            HostSystemId:      pulumi.String(esxiHost.Id),
            VirtualSwitchName: _switch.Name,
            VlanId:            pulumi.Int(4095),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_vsphere as vsphere

datacenter = vsphere.get_datacenter(name="dc1")
esxi_host = vsphere.get_host(datacenter_id=datacenter.id,
    name="esxi1")
switch = vsphere.HostVirtualSwitch("switch",
    active_nics=["vmnic0"],
    host_system_id=esxi_host.id,
    network_adapters=[
        "vmnic0",
        "vmnic1",
    ],
    standby_nics=["vmnic1"])
pg = vsphere.HostPortGroup("pg",
    allow_promiscuous=True,
    host_system_id=esxi_host.id,
    virtual_switch_name=switch.name,
    vlan_id=4095)
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const datacenter = pulumi.output(vsphere.getDatacenter({
    name: "dc1",
}, { async: true }));
const esxiHost = datacenter.apply(datacenter => vsphere.getHost({
    datacenterId: datacenter.id,
    name: "esxi1",
}, { async: true }));
const switchHostVirtualSwitch = new vsphere.HostVirtualSwitch("switch", {
    activeNics: ["vmnic0"],
    hostSystemId: esxiHost.id,
    networkAdapters: [
        "vmnic0",
        "vmnic1",
    ],
    standbyNics: ["vmnic1"],
});
const pg = new vsphere.HostPortGroup("pg", {
    allowPromiscuous: true,
    hostSystemId: esxiHost.id,
    virtualSwitchName: switchHostVirtualSwitch.name,
    vlanId: 4095,
});

Create a HostPortGroup Resource

new HostPortGroup(name: string, args: HostPortGroupArgs, opts?: CustomResourceOptions);
def HostPortGroup(resource_name: 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, failback: Optional[bool] = None, host_system_id: Optional[str] = None, name: Optional[str] = None, notify_switches: Optional[bool] = 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)
func NewHostPortGroup(ctx *Context, name string, args HostPortGroupArgs, opts ...ResourceOption) (*HostPortGroup, error)
public HostPortGroup(string name, HostPortGroupArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args HostPortGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HostPortGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostPortGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

HostPortGroup Resource Properties

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

Inputs

The HostPortGroup resource accepts the following input properties:

HostSystemId string

The managed object ID of the host to set the port group up on. Forces a new resource if changed.

VirtualSwitchName 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 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 string

The managed object ID of the host to set the port group up on. Forces a new resource if changed.

VirtualSwitchName 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 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 string

The managed object ID of the host to set the port group up on. Forces a new resource if changed.

virtualSwitchName 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 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 str

The managed object ID of the host to set the port group up on. Forces a new resource if changed.

virtual_switch_name 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 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.

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 Pulumi.VSphere.Outputs.HostPortGroupPorts

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 HostPortGroupPorts

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 HostPortGroupPorts

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 HostPortGroupPorts

A list of ports that currently exist and are used on this port group.

Look up an 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[HostPortGroupPortsArgs] = 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)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 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 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 Pulumi.VSphere.Inputs.HostPortGroupPortsArgs

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 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 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 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 HostPortGroupPorts

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 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 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 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 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 HostPortGroupPorts

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 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 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 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 HostPortGroupPortsArgs

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 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.

Supporting Types

HostPortGroupPorts

Key string

The key for this port group as returned from the vSphere API.

MacAddresses List<string>
Type string
Key string

The key for this port group as returned from the vSphere API.

MacAddresses []string
Type string
key string

The key for this port group as returned from the vSphere API.

macAddresses string[]
type string
key str

The key for this port group as returned from the vSphere API.

mac_addresses Sequence[str]
type str

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.