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.
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:
- Host
System stringId The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- Virtual
Switch stringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- Active
Nics List<string> List of active network adapters used for load balancing.
- Allow
Forged boolTransmits 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 boolChanges 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 string
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 intBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- Shaping
Burst intSize 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 intBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- Standby
Nics List<string> List of standby network adapters used for failover.
- Teaming
Policy string 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- Host
System stringId The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- Virtual
Switch stringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- Active
Nics []string List of active network adapters used for load balancing.
- Allow
Forged boolTransmits 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 boolChanges 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 string
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 intBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- Shaping
Burst intSize 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 intBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- Standby
Nics []string List of standby network adapters used for failover.
- Teaming
Policy string 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- host
System StringId The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- virtual
Switch StringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- active
Nics List<String> List of active network adapters used for load balancing.
- allow
Forged BooleanTransmits 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 BooleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous Boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon 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.
- notify
Switches Boolean If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- shaping
Average IntegerBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst IntegerSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled Boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak IntegerBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics List<String> List of standby network adapters used for failover.
- teaming
Policy String The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- vlan
Id Integer The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- host
System stringId The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- virtual
Switch stringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- active
Nics string[] List of active network adapters used for load balancing.
- allow
Forged booleanTransmits 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 booleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon 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.
- notify
Switches boolean If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- shaping
Average numberBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst numberSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak numberBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics string[] List of standby network adapters used for failover.
- teaming
Policy string The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- vlan
Id number The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- host_
system_ strid The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- virtual_
switch_ strname 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_ booltransmits 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_ boolchanges 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_ intbandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping_
burst_ intsize 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_ intbandwidth 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- host
System StringId The managed object ID of the host to set the port group up on. Forces a new resource if changed.
- virtual
Switch StringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- active
Nics List<String> List of active network adapters used for load balancing.
- allow
Forged BooleanTransmits 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 BooleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous Boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon 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.
- notify
Switches Boolean If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- shaping
Average NumberBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst NumberSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled Boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak NumberBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics List<String> List of standby network adapters used for failover.
- teaming
Policy String The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- vlan
Id Number The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
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:
- Computed
Policy 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. Host Port Group Port> A list of ports that currently exist and are used on this port group.
- Computed
Policy 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
[]Host
Port Group Port A list of ports that currently exist and are used on this port group.
- computed
Policy 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<Host
Port Group Port> A list of ports that currently exist and are used on this port group.
- computed
Policy {[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
Host
Port Group Port[] 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[Host
Port Group Port] A list of ports that currently exist and are used on this port group.
- computed
Policy 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.
- Active
Nics List<string> List of active network adapters used for load balancing.
- Allow
Forged boolTransmits 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 boolChanges 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 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.
- Host
System stringId 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.
- Notify
Switches bool If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- Ports
List<Pulumi.
VSphere. Inputs. Host Port Group Port> A list of ports that currently exist and are used on this port group.
- Shaping
Average intBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- Shaping
Burst intSize 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 intBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- Standby
Nics List<string> List of standby network adapters used for failover.
- Teaming
Policy string The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- Virtual
Switch stringName 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- Active
Nics []string List of active network adapters used for load balancing.
- Allow
Forged boolTransmits 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 boolChanges 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 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.
- Host
System stringId 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.
- Notify
Switches bool If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- Ports
[]Host
Port Group Port Args A list of ports that currently exist and are used on this port group.
- Shaping
Average intBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- Shaping
Burst intSize 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 intBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- Standby
Nics []string List of standby network adapters used for failover.
- Teaming
Policy string The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- Virtual
Switch stringName 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- active
Nics List<String> List of active network adapters used for load balancing.
- allow
Forged BooleanTransmits 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 BooleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous Boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon Boolean Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
- computed
Policy 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.
- host
System StringId 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.
- notify
Switches Boolean If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- ports
List<Host
Port Group Port> A list of ports that currently exist and are used on this port group.
- shaping
Average IntegerBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst IntegerSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled Boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak IntegerBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics List<String> List of standby network adapters used for failover.
- teaming
Policy String The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- virtual
Switch StringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- vlan
Id Integer The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- active
Nics string[] List of active network adapters used for load balancing.
- allow
Forged booleanTransmits 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 booleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon boolean Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
- computed
Policy {[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.
- host
System stringId 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.
- notify
Switches boolean If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
- ports
Host
Port Group Port[] A list of ports that currently exist and are used on this port group.
- shaping
Average numberBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst numberSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak numberBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics string[] List of standby network adapters used for failover.
- teaming
Policy string The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- virtual
Switch stringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- vlan
Id number The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
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_ booltransmits 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_ boolchanges 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_ strid 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[Host
Port Group Port Args] A list of ports that currently exist and are used on this port group.
- shaping_
average_ intbandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping_
burst_ intsize 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_ intbandwidth 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_ strname 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 of1
-4094
tags with the specific ID, and an ID of4095
enables trunk mode, allowing the guest to manage its own tagging. Default:0
.
- active
Nics List<String> List of active network adapters used for load balancing.
- allow
Forged BooleanTransmits 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 BooleanChanges Controls whether or not the Media Access Control (MAC) address can be changed.
- allow
Promiscuous Boolean Enable promiscuous mode on the network. This flag indicates whether or not all traffic is seen on a given port.
- check
Beacon Boolean Enable beacon probing. Requires that the vSwitch has been configured to use a beacon. If disabled, link status is used only.
- computed
Policy 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.
- host
System StringId 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.
- notify
Switches 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.
- shaping
Average NumberBandwidth The average bandwidth in bits per second if traffic shaping is enabled.
- shaping
Burst NumberSize The maximum burst size allowed in bytes if traffic shaping is enabled.
- shaping
Enabled Boolean Enable traffic shaping on this virtual switch or port group.
- shaping
Peak NumberBandwidth The peak bandwidth during bursts in bits per second if traffic shaping is enabled.
- standby
Nics List<String> List of standby network adapters used for failover.
- teaming
Policy String The network adapter teaming policy. Can be one of loadbalance_ip, loadbalance_srcmac, loadbalance_srcid, or failover_explicit.
- virtual
Switch StringName The name of the virtual switch to bind this port group to. Forces a new resource if changed.
- vlan
Id Number The VLAN ID/trunk mode for this port group. An ID of
0
denotes no tagging, an ID of1
-4094
tags with the specific ID, and an ID of4095
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.
- Mac
Addresses List<string> - Type string
- Key string
The key for this port group as returned from the vSphere API.
- Mac
Addresses []string - Type string
- key String
The key for this port group as returned from the vSphere API.
- mac
Addresses List<String> - type String
- key string
The key for this port group as returned from the vSphere API.
- mac
Addresses 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.
- mac
Addresses 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.