Port

Manages a V2 port resource within OpenStack.

Notes

Ports and Instances

There are some notes to consider when connecting Instances to networks using Ports. Please see the openstack.compute.Instance documentation for further documentation.

Example Usage

Simple port

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
        {
            AdminStateUp = true,
        });
        var port1 = new OpenStack.Networking.Port("port1", new OpenStack.Networking.PortArgs
        {
            AdminStateUp = true,
            NetworkId = network1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
port1 = openstack.networking.Port("port1",
    admin_state_up="true",
    network_id=network1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const port1 = new openstack.networking.Port("port_1", {
    adminStateUp: true,
    networkId: network1.id,
});

Port with physical binding information

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
        {
            AdminStateUp = true,
        });
        var port1 = new OpenStack.Networking.Port("port1", new OpenStack.Networking.PortArgs
        {
            AdminStateUp = true,
            Binding = new OpenStack.Networking.Inputs.PortBindingArgs
            {
                HostId = "b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
                Profile = @"{
  ""local_link_information"": [
    {
      ""switch_info"": ""info1"",
      ""port_id"": ""Ethernet3/4"",
      ""switch_id"": ""12:34:56:78:9A:BC""
    },
    {
      ""switch_info"": ""info2"",
      ""port_id"": ""Ethernet3/4"",
      ""switch_id"": ""12:34:56:78:9A:BD""
    }
  ],
  ""vlan_type"": ""allowed""
}

",
                VnicType = "baremetal",
            },
            DeviceId = "cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
            DeviceOwner = "baremetal:none",
            NetworkId = network1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
port1 = openstack.networking.Port("port1",
    admin_state_up="true",
    binding={
        "hostId": "b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
        "profile": """{
  "local_link_information": [
    {
      "switch_info": "info1",
      "port_id": "Ethernet3/4",
      "switch_id": "12:34:56:78:9A:BC"
    },
    {
      "switch_info": "info2",
      "port_id": "Ethernet3/4",
      "switch_id": "12:34:56:78:9A:BD"
    }
  ],
  "vlan_type": "allowed"
}

""",
        "vnicType": "baremetal",
    },
    device_id="cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
    device_owner="baremetal:none",
    network_id=network1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const port1 = new openstack.networking.Port("port_1", {
    adminStateUp: true,
    binding: {
        hostId: "b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
        profile: `{
  "local_link_information": [
    {
      "switch_info": "info1",
      "port_id": "Ethernet3/4",
      "switch_id": "12:34:56:78:9A:BC"
    },
    {
      "switch_info": "info2",
      "port_id": "Ethernet3/4",
      "switch_id": "12:34:56:78:9A:BD"
    }
  ],
  "vlan_type": "allowed"
}
`,
        vnicType: "baremetal",
    },
    deviceId: "cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
    deviceOwner: "baremetal:none",
    networkId: network1.id,
});

Create a Port Resource

new Port(name: string, args: PortArgs, opts?: CustomResourceOptions);
def Port(resource_name, opts=None, admin_state_up=None, allowed_address_pairs=None, binding=None, description=None, device_id=None, device_owner=None, dns_name=None, extra_dhcp_options=None, fixed_ips=None, mac_address=None, name=None, network_id=None, no_fixed_ip=None, no_security_groups=None, port_security_enabled=None, qos_policy_id=None, region=None, security_group_ids=None, tags=None, tenant_id=None, value_specs=None, __props__=None);
func NewPort(ctx *Context, name string, args PortArgs, opts ...ResourceOption) (*Port, error)
public Port(string name, PortArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PortArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PortArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PortArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Port Resource Properties

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

Inputs

The Port resource accepts the following input properties:

NetworkId string

The ID of the network to attach the port to. Changing this creates a new port.

AdminStateUp bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

AllowedAddressPairs List<Pulumi.OpenStack.Networking.Inputs.PortAllowedAddressPairArgs>

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

Binding Pulumi.OpenStack.Networking.Inputs.PortBindingArgs

The port binding allows to specify binding information for the port. The structure is described below.

Description string

Human-readable description of the port. Changing this updates the description of an existing port.

DeviceId string

The ID of the device attached to the port. Changing this creates a new port.

DeviceOwner string

The device owner of the port. Changing this creates a new port.

DnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

ExtraDhcpOptions List<Pulumi.OpenStack.Networking.Inputs.PortExtraDhcpOptionArgs>

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

FixedIps List<Pulumi.OpenStack.Networking.Inputs.PortFixedIpArgs>

An array of desired IPs for this port. The structure is described below.

MacAddress string

The additional MAC address.

Name string

Name of the DHCP option.

NoFixedIp bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

NoSecurityGroups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

PortSecurityEnabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

QosPolicyId string

Reference to the associated QoS policy.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

SecurityGroupIds List<string>

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

Tags List<string>

A set of string tags for the port.

TenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

ValueSpecs Dictionary<string, object>

Map of additional options.

NetworkId string

The ID of the network to attach the port to. Changing this creates a new port.

AdminStateUp bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

AllowedAddressPairs []PortAllowedAddressPair

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

Binding PortBinding

The port binding allows to specify binding information for the port. The structure is described below.

Description string

Human-readable description of the port. Changing this updates the description of an existing port.

DeviceId string

The ID of the device attached to the port. Changing this creates a new port.

DeviceOwner string

The device owner of the port. Changing this creates a new port.

DnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

ExtraDhcpOptions []PortExtraDhcpOption

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

FixedIps []PortFixedIp

An array of desired IPs for this port. The structure is described below.

MacAddress string

The additional MAC address.

Name string

Name of the DHCP option.

NoFixedIp bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

NoSecurityGroups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

PortSecurityEnabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

QosPolicyId string

Reference to the associated QoS policy.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

SecurityGroupIds []string

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

Tags []string

A set of string tags for the port.

TenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

ValueSpecs map[string]interface{}

Map of additional options.

networkId string

The ID of the network to attach the port to. Changing this creates a new port.

adminStateUp boolean

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

allowedAddressPairs PortAllowedAddressPair[]

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

binding PortBinding

The port binding allows to specify binding information for the port. The structure is described below.

description string

Human-readable description of the port. Changing this updates the description of an existing port.

deviceId string

The ID of the device attached to the port. Changing this creates a new port.

deviceOwner string

The device owner of the port. Changing this creates a new port.

dnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

extraDhcpOptions PortExtraDhcpOption[]

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

fixedIps PortFixedIp[]

An array of desired IPs for this port. The structure is described below.

macAddress string

The additional MAC address.

name string

Name of the DHCP option.

noFixedIp boolean

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

noSecurityGroups boolean

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

portSecurityEnabled boolean

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

qosPolicyId string

Reference to the associated QoS policy.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

securityGroupIds string[]

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

tags string[]

A set of string tags for the port.

tenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

valueSpecs {[key: string]: any}

Map of additional options.

network_id str

The ID of the network to attach the port to. Changing this creates a new port.

admin_state_up bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

allowed_address_pairs List[PortAllowedAddressPair]

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

binding Dict[PortBinding]

The port binding allows to specify binding information for the port. The structure is described below.

description str

Human-readable description of the port. Changing this updates the description of an existing port.

device_id str

The ID of the device attached to the port. Changing this creates a new port.

device_owner str

The device owner of the port. Changing this creates a new port.

dns_name str

The port DNS name. Available, when Neutron DNS extension is enabled.

extra_dhcp_options List[PortExtraDhcpOption]

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

fixed_ips List[PortFixedIp]

An array of desired IPs for this port. The structure is described below.

mac_address str

The additional MAC address.

name str

Name of the DHCP option.

no_fixed_ip bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

no_security_groups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

port_security_enabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

qos_policy_id str

Reference to the associated QoS policy.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

security_group_ids List[str]

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

tags List[str]

A set of string tags for the port.

tenant_id str

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

value_specs Dict[str, Any]

Map of additional options.

Outputs

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

AllFixedIps List<string>

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

AllSecurityGroupIds List<string>

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

AllTags List<string>

The collection of tags assigned on the port, which have been explicitly and implicitly added.

DnsAssignments List<ImmutableDictionary<string, object>>

The list of maps representing port DNS assignments.

Id string
The provider-assigned unique ID for this managed resource.
AllFixedIps []string

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

AllSecurityGroupIds []string

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

AllTags []string

The collection of tags assigned on the port, which have been explicitly and implicitly added.

DnsAssignments []map[string]interface{}

The list of maps representing port DNS assignments.

Id string
The provider-assigned unique ID for this managed resource.
allFixedIps string[]

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

allSecurityGroupIds string[]

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

allTags string[]

The collection of tags assigned on the port, which have been explicitly and implicitly added.

dnsAssignments {[key: string]: any}[]

The list of maps representing port DNS assignments.

id string
The provider-assigned unique ID for this managed resource.
all_fixed_ips List[str]

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

all_security_group_ids List[str]

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

all_tags List[str]

The collection of tags assigned on the port, which have been explicitly and implicitly added.

dns_assignments List[Any>]

The list of maps representing port DNS assignments.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Port Resource

Get an existing Port 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?: PortState, opts?: CustomResourceOptions): Port
static get(resource_name, id, opts=None, admin_state_up=None, all_fixed_ips=None, all_security_group_ids=None, all_tags=None, allowed_address_pairs=None, binding=None, description=None, device_id=None, device_owner=None, dns_assignments=None, dns_name=None, extra_dhcp_options=None, fixed_ips=None, mac_address=None, name=None, network_id=None, no_fixed_ip=None, no_security_groups=None, port_security_enabled=None, qos_policy_id=None, region=None, security_group_ids=None, tags=None, tenant_id=None, value_specs=None, __props__=None);
func GetPort(ctx *Context, name string, id IDInput, state *PortState, opts ...ResourceOption) (*Port, error)
public static Port Get(string name, Input<string> id, PortState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AdminStateUp bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

AllFixedIps List<string>

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

AllSecurityGroupIds List<string>

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

AllTags List<string>

The collection of tags assigned on the port, which have been explicitly and implicitly added.

AllowedAddressPairs List<Pulumi.OpenStack.Networking.Inputs.PortAllowedAddressPairArgs>

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

Binding Pulumi.OpenStack.Networking.Inputs.PortBindingArgs

The port binding allows to specify binding information for the port. The structure is described below.

Description string

Human-readable description of the port. Changing this updates the description of an existing port.

DeviceId string

The ID of the device attached to the port. Changing this creates a new port.

DeviceOwner string

The device owner of the port. Changing this creates a new port.

DnsAssignments List<ImmutableDictionary<string, object>>

The list of maps representing port DNS assignments.

DnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

ExtraDhcpOptions List<Pulumi.OpenStack.Networking.Inputs.PortExtraDhcpOptionArgs>

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

FixedIps List<Pulumi.OpenStack.Networking.Inputs.PortFixedIpArgs>

An array of desired IPs for this port. The structure is described below.

MacAddress string

The additional MAC address.

Name string

Name of the DHCP option.

NetworkId string

The ID of the network to attach the port to. Changing this creates a new port.

NoFixedIp bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

NoSecurityGroups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

PortSecurityEnabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

QosPolicyId string

Reference to the associated QoS policy.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

SecurityGroupIds List<string>

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

Tags List<string>

A set of string tags for the port.

TenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

ValueSpecs Dictionary<string, object>

Map of additional options.

AdminStateUp bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

AllFixedIps []string

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

AllSecurityGroupIds []string

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

AllTags []string

The collection of tags assigned on the port, which have been explicitly and implicitly added.

AllowedAddressPairs []PortAllowedAddressPair

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

Binding PortBinding

The port binding allows to specify binding information for the port. The structure is described below.

Description string

Human-readable description of the port. Changing this updates the description of an existing port.

DeviceId string

The ID of the device attached to the port. Changing this creates a new port.

DeviceOwner string

The device owner of the port. Changing this creates a new port.

DnsAssignments []map[string]interface{}

The list of maps representing port DNS assignments.

DnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

ExtraDhcpOptions []PortExtraDhcpOption

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

FixedIps []PortFixedIp

An array of desired IPs for this port. The structure is described below.

MacAddress string

The additional MAC address.

Name string

Name of the DHCP option.

NetworkId string

The ID of the network to attach the port to. Changing this creates a new port.

NoFixedIp bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

NoSecurityGroups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

PortSecurityEnabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

QosPolicyId string

Reference to the associated QoS policy.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

SecurityGroupIds []string

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

Tags []string

A set of string tags for the port.

TenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

ValueSpecs map[string]interface{}

Map of additional options.

adminStateUp boolean

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

allFixedIps string[]

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

allSecurityGroupIds string[]

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

allTags string[]

The collection of tags assigned on the port, which have been explicitly and implicitly added.

allowedAddressPairs PortAllowedAddressPair[]

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

binding PortBinding

The port binding allows to specify binding information for the port. The structure is described below.

description string

Human-readable description of the port. Changing this updates the description of an existing port.

deviceId string

The ID of the device attached to the port. Changing this creates a new port.

deviceOwner string

The device owner of the port. Changing this creates a new port.

dnsAssignments {[key: string]: any}[]

The list of maps representing port DNS assignments.

dnsName string

The port DNS name. Available, when Neutron DNS extension is enabled.

extraDhcpOptions PortExtraDhcpOption[]

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

fixedIps PortFixedIp[]

An array of desired IPs for this port. The structure is described below.

macAddress string

The additional MAC address.

name string

Name of the DHCP option.

networkId string

The ID of the network to attach the port to. Changing this creates a new port.

noFixedIp boolean

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

noSecurityGroups boolean

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

portSecurityEnabled boolean

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

qosPolicyId string

Reference to the associated QoS policy.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

securityGroupIds string[]

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

tags string[]

A set of string tags for the port.

tenantId string

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

valueSpecs {[key: string]: any}

Map of additional options.

admin_state_up bool

Administrative up/down status for the port (must be true or false if provided). Changing this updates the admin_state_up of an existing port.

all_fixed_ips List[str]

The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.

all_security_group_ids List[str]

The collection of Security Group IDs on the port which have been explicitly and implicitly added.

all_tags List[str]

The collection of tags assigned on the port, which have been explicitly and implicitly added.

allowed_address_pairs List[PortAllowedAddressPair]

An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.

binding Dict[PortBinding]

The port binding allows to specify binding information for the port. The structure is described below.

description str

Human-readable description of the port. Changing this updates the description of an existing port.

device_id str

The ID of the device attached to the port. Changing this creates a new port.

device_owner str

The device owner of the port. Changing this creates a new port.

dns_assignments List[Any>]

The list of maps representing port DNS assignments.

dns_name str

The port DNS name. Available, when Neutron DNS extension is enabled.

extra_dhcp_options List[PortExtraDhcpOption]

An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.

fixed_ips List[PortFixedIp]

An array of desired IPs for this port. The structure is described below.

mac_address str

The additional MAC address.

name str

Name of the DHCP option.

network_id str

The ID of the network to attach the port to. Changing this creates a new port.

no_fixed_ip bool

Create a port with no fixed IP address. This will also remove any fixed IPs previously set on a port. true is the only valid value for this argument.

no_security_groups bool

If set to true, then no security groups are applied to the port. If set to false and no security_group_ids are specified, then the port will yield to the default behavior of the Networking service, which is to usually apply the “default” security group.

port_security_enabled bool

Whether to explicitly enable or disable port security on the port. Port Security is usually enabled by default, so omitting argument will usually result in a value of true. Setting this explicitly to false will disable port security. In order to disable port security, the port must not have any security groups. Valid values are true and false.

qos_policy_id str

Reference to the associated QoS policy.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create a port. If omitted, the region argument of the provider is used. Changing this creates a new port.

security_group_ids List[str]

A list of security group IDs to apply to the port. The security groups must be specified by ID and not name (as opposed to how they are configured with the Compute Instance).

tags List[str]

A set of string tags for the port.

tenant_id str

The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.

value_specs Dict[str, Any]

Map of additional options.

Supporting Types

PortAllowedAddressPair

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

IpAddress string

The additional IP address.

MacAddress string

The additional MAC address.

IpAddress string

The additional IP address.

MacAddress string

The additional MAC address.

ipAddress string

The additional IP address.

macAddress string

The additional MAC address.

ip_address str

The additional IP address.

mac_address str

The additional MAC address.

PortBinding

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HostId string

The ID of the host to allocate port on.

Profile string

Custom data to be passed as binding:profile. Data must be passed as JSON.

VifDetails Dictionary<string, object>

A map of JSON strings containing additional details for this specific binding.

VifType string

The VNIC type of the port binding.

VnicType string

VNIC type for the port. Can either be direct, direct-physical, macvtap, normal, baremetal or virtio-forwarder. Default value is normal.

HostId string

The ID of the host to allocate port on.

Profile string

Custom data to be passed as binding:profile. Data must be passed as JSON.

VifDetails map[string]interface{}

A map of JSON strings containing additional details for this specific binding.

VifType string

The VNIC type of the port binding.

VnicType string

VNIC type for the port. Can either be direct, direct-physical, macvtap, normal, baremetal or virtio-forwarder. Default value is normal.

hostId string

The ID of the host to allocate port on.

profile string

Custom data to be passed as binding:profile. Data must be passed as JSON.

vifDetails {[key: string]: any}

A map of JSON strings containing additional details for this specific binding.

vifType string

The VNIC type of the port binding.

vnicType string

VNIC type for the port. Can either be direct, direct-physical, macvtap, normal, baremetal or virtio-forwarder. Default value is normal.

hostId str

The ID of the host to allocate port on.

profile str

Custom data to be passed as binding:profile. Data must be passed as JSON.

vifDetails Dict[str, Any]

A map of JSON strings containing additional details for this specific binding.

vifType str

The VNIC type of the port binding.

vnicType str

VNIC type for the port. Can either be direct, direct-physical, macvtap, normal, baremetal or virtio-forwarder. Default value is normal.

PortExtraDhcpOption

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Name of the DHCP option.

Value string

Value of the DHCP option.

IpVersion int

IP protocol version. Defaults to 4.

Name string

Name of the DHCP option.

Value string

Value of the DHCP option.

IpVersion int

IP protocol version. Defaults to 4.

name string

Name of the DHCP option.

value string

Value of the DHCP option.

ipVersion number

IP protocol version. Defaults to 4.

name str

Name of the DHCP option.

value str

Value of the DHCP option.

ip_version float

IP protocol version. Defaults to 4.

PortFixedIp

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

SubnetId string

Subnet in which to allocate IP address for this port.

IpAddress string

The additional IP address.

SubnetId string

Subnet in which to allocate IP address for this port.

IpAddress string

The additional IP address.

subnetId string

Subnet in which to allocate IP address for this port.

ipAddress string

The additional IP address.

subnet_id str

Subnet in which to allocate IP address for this port.

ip_address str

The additional IP address.

Package Details

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