1. Packages
  2. OpenStack
  3. API Docs
  4. networking
  5. Port
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.networking.Port

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Manages a V2 port resource within OpenStack.

    Note: Ports do not get an IP if the network they are attached to does not have a subnet. If you create the subnet resource in the same run as the port, make sure to use fixed_ip.subnet_id or depends_on to enforce the subnet resource creation before the port creation is triggered. More info here

    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 System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network1", new()
        {
            AdminStateUp = true,
        });
    
        var port1 = new OpenStack.Networking.Port("port1", new()
        {
            NetworkId = network1.Id,
            AdminStateUp = true,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := networking.NewNetwork(ctx, "network1", &networking.NetworkArgs{
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewPort(ctx, "port1", &networking.PortArgs{
    			NetworkId:    network1.ID(),
    			AdminStateUp: 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.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.networking.Port;
    import com.pulumi.openstack.networking.PortArgs;
    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) {
            var network1 = new Network("network1", NetworkArgs.builder()        
                .adminStateUp("true")
                .build());
    
            var port1 = new Port("port1", PortArgs.builder()        
                .networkId(network1.id())
                .adminStateUp("true")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network1", admin_state_up=True)
    port1 = openstack.networking.Port("port1",
        network_id=network1.id,
        admin_state_up=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network1", {adminStateUp: true});
    const port1 = new openstack.networking.Port("port1", {
        networkId: network1.id,
        adminStateUp: true,
    });
    
    resources:
      network1:
        type: openstack:networking:Network
        properties:
          adminStateUp: 'true'
      port1:
        type: openstack:networking:Port
        properties:
          networkId: ${network1.id}
          adminStateUp: 'true'
    

    Port defining fixed_ip.subnet_id

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network1", new()
        {
            AdminStateUp = true,
        });
    
        var subnet1 = new OpenStack.Networking.Subnet("subnet1", new()
        {
            NetworkId = network1.Id,
            Cidr = "192.168.199.0/24",
        });
    
        var port1 = new OpenStack.Networking.Port("port1", new()
        {
            NetworkId = network1.Id,
            AdminStateUp = true,
            FixedIps = new[]
            {
                new OpenStack.Networking.Inputs.PortFixedIpArgs
                {
                    SubnetId = subnet1.Id,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := networking.NewNetwork(ctx, "network1", &networking.NetworkArgs{
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		subnet1, err := networking.NewSubnet(ctx, "subnet1", &networking.SubnetArgs{
    			NetworkId: network1.ID(),
    			Cidr:      pulumi.String("192.168.199.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewPort(ctx, "port1", &networking.PortArgs{
    			NetworkId:    network1.ID(),
    			AdminStateUp: pulumi.Bool(true),
    			FixedIps: networking.PortFixedIpArray{
    				&networking.PortFixedIpArgs{
    					SubnetId: subnet1.ID(),
    				},
    			},
    		})
    		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.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.networking.Subnet;
    import com.pulumi.openstack.networking.SubnetArgs;
    import com.pulumi.openstack.networking.Port;
    import com.pulumi.openstack.networking.PortArgs;
    import com.pulumi.openstack.networking.inputs.PortFixedIpArgs;
    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) {
            var network1 = new Network("network1", NetworkArgs.builder()        
                .adminStateUp("true")
                .build());
    
            var subnet1 = new Subnet("subnet1", SubnetArgs.builder()        
                .networkId(network1.id())
                .cidr("192.168.199.0/24")
                .build());
    
            var port1 = new Port("port1", PortArgs.builder()        
                .networkId(network1.id())
                .adminStateUp("true")
                .fixedIps(PortFixedIpArgs.builder()
                    .subnetId(subnet1.id())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network1", admin_state_up=True)
    subnet1 = openstack.networking.Subnet("subnet1",
        network_id=network1.id,
        cidr="192.168.199.0/24")
    port1 = openstack.networking.Port("port1",
        network_id=network1.id,
        admin_state_up=True,
        fixed_ips=[openstack.networking.PortFixedIpArgs(
            subnet_id=subnet1.id,
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network1", {adminStateUp: true});
    const subnet1 = new openstack.networking.Subnet("subnet1", {
        networkId: network1.id,
        cidr: "192.168.199.0/24",
    });
    const port1 = new openstack.networking.Port("port1", {
        networkId: network1.id,
        adminStateUp: true,
        fixedIps: [{
            subnetId: subnet1.id,
        }],
    });
    
    resources:
      network1:
        type: openstack:networking:Network
        properties:
          adminStateUp: 'true'
      subnet1:
        type: openstack:networking:Subnet
        properties:
          networkId: ${network1.id}
          cidr: 192.168.199.0/24
      port1:
        type: openstack:networking:Port
        properties:
          networkId: ${network1.id}
          adminStateUp: 'true'
          fixedIps:
            - subnetId: ${subnet1.id}
    

    Port with physical binding information

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network1", new()
        {
            AdminStateUp = true,
        });
    
        var port1 = new OpenStack.Networking.Port("port1", new()
        {
            NetworkId = network1.Id,
            DeviceId = "cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
            DeviceOwner = "baremetal:none",
            AdminStateUp = true,
            Binding = new OpenStack.Networking.Inputs.PortBindingArgs
            {
                HostId = "b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
                VnicType = "baremetal",
                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""
    }
    ",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := networking.NewNetwork(ctx, "network1", &networking.NetworkArgs{
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewPort(ctx, "port1", &networking.PortArgs{
    			NetworkId:    network1.ID(),
    			DeviceId:     pulumi.String("cdf70fcf-c161-4f24-9c70-96b3f5a54b71"),
    			DeviceOwner:  pulumi.String("baremetal:none"),
    			AdminStateUp: pulumi.Bool(true),
    			Binding: &networking.PortBindingArgs{
    				HostId:   pulumi.String("b080b9cf-46e0-4ce8-ad47-0fd4accc872b"),
    				VnicType: pulumi.String("baremetal"),
    				Profile: pulumi.String(`{
      "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"
    }
    `),
    			},
    		})
    		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.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.networking.Port;
    import com.pulumi.openstack.networking.PortArgs;
    import com.pulumi.openstack.networking.inputs.PortBindingArgs;
    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) {
            var network1 = new Network("network1", NetworkArgs.builder()        
                .adminStateUp("true")
                .build());
    
            var port1 = new Port("port1", PortArgs.builder()        
                .networkId(network1.id())
                .deviceId("cdf70fcf-c161-4f24-9c70-96b3f5a54b71")
                .deviceOwner("baremetal:none")
                .adminStateUp("true")
                .binding(PortBindingArgs.builder()
                    .hostId("b080b9cf-46e0-4ce8-ad47-0fd4accc872b")
                    .vnicType("baremetal")
                    .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"
    }
                    """)
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network1", admin_state_up=True)
    port1 = openstack.networking.Port("port1",
        network_id=network1.id,
        device_id="cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
        device_owner="baremetal:none",
        admin_state_up=True,
        binding=openstack.networking.PortBindingArgs(
            host_id="b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
            vnic_type="baremetal",
            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"
    }
    """,
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network1", {adminStateUp: true});
    const port1 = new openstack.networking.Port("port1", {
        networkId: network1.id,
        deviceId: "cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
        deviceOwner: "baremetal:none",
        adminStateUp: true,
        binding: {
            hostId: "b080b9cf-46e0-4ce8-ad47-0fd4accc872b",
            vnicType: "baremetal",
            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"
    }
    `,
        },
    });
    
    resources:
      network1:
        type: openstack:networking:Network
        properties:
          adminStateUp: 'true'
      port1:
        type: openstack:networking:Port
        properties:
          networkId: ${network1.id}
          deviceId: cdf70fcf-c161-4f24-9c70-96b3f5a54b71
          deviceOwner: baremetal:none
          adminStateUp: 'true'
          binding:
            hostId: b080b9cf-46e0-4ce8-ad47-0fd4accc872b
            vnicType: baremetal
            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"
              }          
    

    Create Port Resource

    new Port(name: string, args: PortArgs, opts?: CustomResourceOptions);
    @overload
    def Port(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             admin_state_up: Optional[bool] = None,
             allowed_address_pairs: Optional[Sequence[PortAllowedAddressPairArgs]] = None,
             binding: Optional[PortBindingArgs] = None,
             description: Optional[str] = None,
             device_id: Optional[str] = None,
             device_owner: Optional[str] = None,
             dns_name: Optional[str] = None,
             extra_dhcp_options: Optional[Sequence[PortExtraDhcpOptionArgs]] = None,
             fixed_ips: Optional[Sequence[PortFixedIpArgs]] = None,
             mac_address: Optional[str] = None,
             name: Optional[str] = None,
             network_id: Optional[str] = None,
             no_fixed_ip: Optional[bool] = None,
             no_security_groups: Optional[bool] = None,
             port_security_enabled: Optional[bool] = None,
             qos_policy_id: Optional[str] = None,
             region: Optional[str] = None,
             security_group_ids: Optional[Sequence[str]] = None,
             tags: Optional[Sequence[str]] = None,
             tenant_id: Optional[str] = None,
             value_specs: Optional[Mapping[str, Any]] = None)
    @overload
    def Port(resource_name: str,
             args: PortArgs,
             opts: Optional[ResourceOptions] = None)
    func NewPort(ctx *Context, name string, args PortArgs, opts ...ResourceOption) (*Port, error)
    public Port(string name, PortArgs args, CustomResourceOptions? opts = null)
    public Port(String name, PortArgs args)
    public Port(String name, PortArgs args, CustomResourceOptions options)
    
    type: openstack:networking:Port
    properties: # The arguments to resource properties.
    options: # 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.
    resource_name str
    The unique name of the resource.
    args PortArgs
    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 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.
    name String
    The unique name of the resource.
    args PortArgs
    The arguments to resource properties.
    options 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 Architecture and Concepts 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.PortAllowedAddressPair>
    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.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 List<Pulumi.OpenStack.Networking.Inputs.PortExtraDhcpOption>
    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.PortFixedIp>
    An array of desired IPs for this port. The structure is described below.
    MacAddress string
    Specify a specific MAC address for the port. Changing this creates a new port.
    Name string
    A unique name for the port. Changing this updates the name of an existing 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.
    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 []PortAllowedAddressPairArgs
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    Binding 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 []PortExtraDhcpOptionArgs
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    FixedIps []PortFixedIpArgs
    An array of desired IPs for this port. The structure is described below.
    MacAddress string
    Specify a specific MAC address for the port. Changing this creates a new port.
    Name string
    A unique name for the port. Changing this updates the name of an existing 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.
    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 List<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 List<PortExtraDhcpOption>
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixedIps List<PortFixedIp>
    An array of desired IPs for this port. The structure is described below.
    macAddress String
    Specify a specific MAC address for the port. Changing this creates a new port.
    name String
    A unique name for the port. Changing this updates the name of an existing 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 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 Map<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 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
    Specify a specific MAC address for the port. Changing this creates a new port.
    name string
    A unique name for the port. Changing this updates the name of an existing 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.
    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 Sequence[PortAllowedAddressPairArgs]
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    binding PortBindingArgs
    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 Sequence[PortExtraDhcpOptionArgs]
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixed_ips Sequence[PortFixedIpArgs]
    An array of desired IPs for this port. The structure is described below.
    mac_address str
    Specify a specific MAC address for the port. Changing this creates a new port.
    name str
    A unique name for the port. Changing this updates the name of an existing 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 Sequence[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 Sequence[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 Mapping[str, Any]
    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 List<Property Map>
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    binding Property Map
    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<Property Map>
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixedIps List<Property Map>
    An array of desired IPs for this port. The structure is described below.
    macAddress String
    Specify a specific MAC address for the port. Changing this creates a new port.
    name String
    A unique name for the port. Changing this updates the name of an existing 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 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 Map<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 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<Map<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 {[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 Sequence[str]
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    all_security_group_ids Sequence[str]
    The collection of Security Group IDs on the port which have been explicitly and implicitly added.
    all_tags Sequence[str]
    The collection of tags assigned on the port, which have been explicitly and implicitly added.
    dns_assignments Sequence[Mapping[str, Any]]
    The list of maps representing port DNS assignments.
    id str
    The provider-assigned unique ID for this managed resource.
    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<Map<Any>>
    The list of maps representing port DNS assignments.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin_state_up: Optional[bool] = None,
            all_fixed_ips: Optional[Sequence[str]] = None,
            all_security_group_ids: Optional[Sequence[str]] = None,
            all_tags: Optional[Sequence[str]] = None,
            allowed_address_pairs: Optional[Sequence[PortAllowedAddressPairArgs]] = None,
            binding: Optional[PortBindingArgs] = None,
            description: Optional[str] = None,
            device_id: Optional[str] = None,
            device_owner: Optional[str] = None,
            dns_assignments: Optional[Sequence[Mapping[str, Any]]] = None,
            dns_name: Optional[str] = None,
            extra_dhcp_options: Optional[Sequence[PortExtraDhcpOptionArgs]] = None,
            fixed_ips: Optional[Sequence[PortFixedIpArgs]] = None,
            mac_address: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            no_fixed_ip: Optional[bool] = None,
            no_security_groups: Optional[bool] = None,
            port_security_enabled: Optional[bool] = None,
            qos_policy_id: Optional[str] = None,
            region: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            tags: Optional[Sequence[str]] = None,
            tenant_id: Optional[str] = None,
            value_specs: Optional[Mapping[str, Any]] = None) -> Port
    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)
    public static Port get(String name, Output<String> id, PortState 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:
    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.PortAllowedAddressPair>
    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.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 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.PortExtraDhcpOption>
    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.PortFixedIp>
    An array of desired IPs for this port. The structure is described below.
    MacAddress string
    Specify a specific MAC address for the port. Changing this creates a new port.
    Name string
    A unique name for the port. Changing this updates the name of an existing port.
    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 []PortAllowedAddressPairArgs
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    Binding 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 []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 []PortExtraDhcpOptionArgs
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    FixedIps []PortFixedIpArgs
    An array of desired IPs for this port. The structure is described below.
    MacAddress string
    Specify a specific MAC address for the port. Changing this creates a new port.
    Name string
    A unique name for the port. Changing this updates the name of an existing port.
    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 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<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 List<Map<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<PortExtraDhcpOption>
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixedIps List<PortFixedIp>
    An array of desired IPs for this port. The structure is described below.
    macAddress String
    Specify a specific MAC address for the port. Changing this creates a new port.
    name String
    A unique name for the port. Changing this updates the name of an existing port.
    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 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 Map<String,Object>
    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
    Specify a specific MAC address for the port. Changing this creates a new port.
    name string
    A unique name for the port. Changing this updates the name of an existing port.
    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 Sequence[str]
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    all_security_group_ids Sequence[str]
    The collection of Security Group IDs on the port which have been explicitly and implicitly added.
    all_tags Sequence[str]
    The collection of tags assigned on the port, which have been explicitly and implicitly added.
    allowed_address_pairs Sequence[PortAllowedAddressPairArgs]
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    binding PortBindingArgs
    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 Sequence[Mapping[str, 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 Sequence[PortExtraDhcpOptionArgs]
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixed_ips Sequence[PortFixedIpArgs]
    An array of desired IPs for this port. The structure is described below.
    mac_address str
    Specify a specific MAC address for the port. Changing this creates a new port.
    name str
    A unique name for the port. Changing this updates the name of an existing port.
    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 Sequence[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 Sequence[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 Mapping[str, Any]
    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 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<Property Map>
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
    binding Property Map
    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<Map<Any>>
    The list of maps representing port DNS assignments.
    dnsName String
    The port DNS name. Available, when Neutron DNS extension is enabled.
    extraDhcpOptions List<Property Map>
    An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
    fixedIps List<Property Map>
    An array of desired IPs for this port. The structure is described below.
    macAddress String
    Specify a specific MAC address for the port. Changing this creates a new port.
    name String
    A unique name for the port. Changing this updates the name of an existing port.
    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 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 Map<Any>
    Map of additional options.

    Supporting Types

    PortAllowedAddressPair, PortAllowedAddressPairArgs

    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.
    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.
    ipAddress String
    The additional IP address.
    macAddress String
    The additional MAC address.

    PortBinding, PortBindingArgs

    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. It can be updated on unbound ports only.
    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. It can be updated on unbound ports only.
    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,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. It can be updated on unbound ports only.
    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. It can be updated on unbound ports only.
    host_id 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.
    vif_details Mapping[str, Any]
    A map of JSON strings containing additional details for this specific binding.
    vif_type str
    The VNIC type of the port binding.
    vnic_type str
    VNIC type for the port. Can either be direct, direct-physical, macvtap, normal, baremetal or virtio-forwarder. Default value is normal. It can be updated on unbound ports only.
    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<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. It can be updated on unbound ports only.

    PortExtraDhcpOption, PortExtraDhcpOptionArgs

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

    PortFixedIp, PortFixedIpArgs

    SubnetId string
    Subnet in which to allocate IP address for this port.
    IpAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.
    SubnetId string
    Subnet in which to allocate IP address for this port.
    IpAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.
    subnetId String
    Subnet in which to allocate IP address for this port.
    ipAddress String
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.
    subnetId string
    Subnet in which to allocate IP address for this port.
    ipAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.
    subnet_id str
    Subnet in which to allocate IP address for this port.
    ip_address str
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.
    subnetId String
    Subnet in which to allocate IP address for this port.
    ipAddress String
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank or omitted. To retrieve the assigned IP address, use the all_fixed_ips attribute.

    Import

    Ports can be imported using the id, e.g.

     $ pulumi import openstack:networking/port:Port port_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1
    

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi