1. Packages
  2. vSphere
  3. API Docs
  4. HostPortGroup
vSphere v4.9.0 published on Tuesday, Nov 28, 2023 by Pulumi

vsphere.HostPortGroup

Explore with Pulumi AI

vsphere logo
vSphere v4.9.0 published on Tuesday, Nov 28, 2023 by Pulumi

    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.

    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 System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    
    {}
    

    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

    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("hostVirtualSwitch", new()
        {
            HostSystemId = host.Apply(getHostResult => getHostResult.Id),
            NetworkAdapters = new[]
            {
                "vmnic0",
                "vmnic1",
            },
            ActiveNics = new[]
            {
                "vmnic0",
            },
            StandbyNics = new[]
            {
                "vmnic1",
            },
        });
    
        var pg = new VSphere.HostPortGroup("pg", new()
        {
            HostSystemId = host.Apply(getHostResult => getHostResult.Id),
            VirtualSwitchName = hostVirtualSwitch.Name,
        });
    
    });
    
    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, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{
    			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{
    			HostSystemId:      *pulumi.String(host.Id),
    			VirtualSwitchName: hostVirtualSwitch.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            var hostVirtualSwitch = new HostVirtualSwitch("hostVirtualSwitch", HostVirtualSwitchArgs.builder()        
                .hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
                .networkAdapters(            
                    "vmnic0",
                    "vmnic1")
                .activeNics("vmnic0")
                .standbyNics("vmnic1")
                .build());
    
            var pg = new HostPortGroup("pg", HostPortGroupArgs.builder()        
                .hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
                .virtualSwitchName(hostVirtualSwitch.name())
                .build());
    
        }
    }
    
    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("hostVirtualSwitch",
        host_system_id=host.id,
        network_adapters=[
            "vmnic0",
            "vmnic1",
        ],
        active_nics=["vmnic0"],
        standby_nics=["vmnic1"])
    pg = vsphere.HostPortGroup("pg",
        host_system_id=host.id,
        virtual_switch_name=host_virtual_switch.name)
    
    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("hostVirtualSwitch", {
        hostSystemId: host.then(host => host.id),
        networkAdapters: [
            "vmnic0",
            "vmnic1",
        ],
        activeNics: ["vmnic0"],
        standbyNics: ["vmnic1"],
    });
    const pg = new vsphere.HostPortGroup("pg", {
        hostSystemId: host.then(host => host.id),
        virtualSwitchName: hostVirtualSwitch.name,
    });
    
    resources:
      hostVirtualSwitch:
        type: vsphere:HostVirtualSwitch
        properties:
          hostSystemId: ${host.id}
          networkAdapters:
            - vmnic0
            - vmnic1
          activeNics:
            - vmnic0
          standbyNics:
            - vmnic1
      pg:
        type: vsphere:HostPortGroup
        properties:
          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}
    

    set on the standard switch.

    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("hostVirtualSwitch", new()
        {
            HostSystemId = host.Apply(getHostResult => getHostResult.Id),
            NetworkAdapters = new[]
            {
                "vmnic0",
                "vmnic1",
            },
            ActiveNics = new[]
            {
                "vmnic0",
            },
            StandbyNics = new[]
            {
                "vmnic1",
            },
        });
    
        var pg = new VSphere.HostPortGroup("pg", new()
        {
            HostSystemId = host.Apply(getHostResult => getHostResult.Id),
            VirtualSwitchName = hostVirtualSwitch.Name,
            VlanId = 4095,
            AllowPromiscuous = true,
        });
    
    });
    
    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, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{
    			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{
    			HostSystemId:      *pulumi.String(host.Id),
    			VirtualSwitchName: hostVirtualSwitch.Name,
    			VlanId:            pulumi.Int(4095),
    			AllowPromiscuous:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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.applyValue(getDatacenterResult -> getDatacenterResult.id()))
                .build());
    
            var hostVirtualSwitch = new HostVirtualSwitch("hostVirtualSwitch", HostVirtualSwitchArgs.builder()        
                .hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
                .networkAdapters(            
                    "vmnic0",
                    "vmnic1")
                .activeNics("vmnic0")
                .standbyNics("vmnic1")
                .build());
    
            var pg = new HostPortGroup("pg", HostPortGroupArgs.builder()        
                .hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
                .virtualSwitchName(hostVirtualSwitch.name())
                .vlanId(4095)
                .allowPromiscuous(true)
                .build());
    
        }
    }
    
    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("hostVirtualSwitch",
        host_system_id=host.id,
        network_adapters=[
            "vmnic0",
            "vmnic1",
        ],
        active_nics=["vmnic0"],
        standby_nics=["vmnic1"])
    pg = vsphere.HostPortGroup("pg",
        host_system_id=host.id,
        virtual_switch_name=host_virtual_switch.name,
        vlan_id=4095,
        allow_promiscuous=True)
    
    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("hostVirtualSwitch", {
        hostSystemId: host.then(host => host.id),
        networkAdapters: [
            "vmnic0",
            "vmnic1",
        ],
        activeNics: ["vmnic0"],
        standbyNics: ["vmnic1"],
    });
    const pg = new vsphere.HostPortGroup("pg", {
        hostSystemId: host.then(host => host.id),
        virtualSwitchName: hostVirtualSwitch.name,
        vlanId: 4095,
        allowPromiscuous: true,
    });
    
    resources:
      hostVirtualSwitch:
        type: vsphere:HostVirtualSwitch
        properties:
          hostSystemId: ${host.id}
          networkAdapters:
            - vmnic0
            - vmnic1
          activeNics:
            - vmnic0
          standbyNics:
            - vmnic1
      pg:
        type: vsphere:HostPortGroup
        properties:
          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}
    

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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    
    import pulumi
    
    import * as pulumi from "@pulumi/pulumi";
    
    {}
    

    Create HostPortGroup Resource

    new HostPortGroup(name: string, args: HostPortGroupArgs, opts?: CustomResourceOptions);
    @overload
    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)
    @overload
    def HostPortGroup(resource_name: str,
                      args: HostPortGroupArgs,
                      opts: Optional[ResourceOptions] = 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.
    
    
    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.
    args 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 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.
    name String
    The unique name of the resource.
    args HostPortGroupArgs
    The arguments to resource properties.
    options 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 Architecture and Concepts 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 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 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 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.

    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 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 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)
    Resource lookup is not supported in YAML
    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.
    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 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 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 []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 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 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 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 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 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 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 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 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 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 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 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 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>
    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 List<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
    key String

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

    macAddresses List<String>
    type String

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vsphere Terraform Provider.

    vsphere logo
    vSphere v4.9.0 published on Tuesday, Nov 28, 2023 by Pulumi