1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. Port
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.networking.Port

Explore with Pulumi AI

openstack logo
OpenStack v5.0.0 published on Friday, Sep 27, 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

    Example Usage

    Simple port

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

    Port defining fixed_ip.subnet_id

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

    Port with physical binding information

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network_1", {
        name: "network_1",
        adminStateUp: true,
    });
    const port1 = new openstack.networking.Port("port_1", {
        name: "port_1",
        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"
    }
    `,
        },
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network_1",
        name="network_1",
        admin_state_up=True)
    port1 = openstack.networking.Port("port_1",
        name="port_1",
        network_id=network1.id,
        device_id="cdf70fcf-c161-4f24-9c70-96b3f5a54b71",
        device_owner="baremetal:none",
        admin_state_up=True,
        binding={
            "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"
    }
    """,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/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, "network_1", &networking.NetworkArgs{
    			Name:         pulumi.String("network_1"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewPort(ctx, "port_1", &networking.PortArgs{
    			Name:         pulumi.String("port_1"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network_1", new()
        {
            Name = "network_1",
            AdminStateUp = true,
        });
    
        var port1 = new OpenStack.Networking.Port("port_1", new()
        {
            Name = "port_1",
            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 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()
                .name("network_1")
                .adminStateUp("true")
                .build());
    
            var port1 = new Port("port1", PortArgs.builder()
                .name("port_1")
                .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());
    
        }
    }
    
    resources:
      network1:
        type: openstack:networking:Network
        name: network_1
        properties:
          name: network_1
          adminStateUp: 'true'
      port1:
        type: openstack:networking:Port
        name: port_1
        properties:
          name: port_1
          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"
              }          
    

    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.

    Create Port Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Port(name: string, args: PortArgs, opts?: CustomResourceOptions);
    @overload
    def Port(resource_name: str,
             args: PortArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Port(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             network_id: Optional[str] = None,
             name: Optional[str] = None,
             tags: Optional[Sequence[str]] = 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,
             allowed_address_pairs: Optional[Sequence[PortAllowedAddressPairArgs]] = None,
             value_specs: Optional[Mapping[str, str]] = None,
             binding: Optional[PortBindingArgs] = None,
             fixed_ips: Optional[Sequence[PortFixedIpArgs]] = 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,
             admin_state_up: Optional[bool] = None,
             tenant_id: Optional[str] = None,
             mac_address: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var portResource = new OpenStack.Networking.Port("portResource", new()
    {
        NetworkId = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
        Description = "string",
        DeviceId = "string",
        DeviceOwner = "string",
        DnsName = "string",
        ExtraDhcpOptions = new[]
        {
            new OpenStack.Networking.Inputs.PortExtraDhcpOptionArgs
            {
                Name = "string",
                Value = "string",
                IpVersion = 0,
            },
        },
        AllowedAddressPairs = new[]
        {
            new OpenStack.Networking.Inputs.PortAllowedAddressPairArgs
            {
                IpAddress = "string",
                MacAddress = "string",
            },
        },
        ValueSpecs = 
        {
            { "string", "string" },
        },
        Binding = new OpenStack.Networking.Inputs.PortBindingArgs
        {
            HostId = "string",
            Profile = "string",
            VifDetails = 
            {
                { "string", "string" },
            },
            VifType = "string",
            VnicType = "string",
        },
        FixedIps = new[]
        {
            new OpenStack.Networking.Inputs.PortFixedIpArgs
            {
                IpAddress = "string",
                SubnetId = "string",
            },
        },
        NoFixedIp = false,
        NoSecurityGroups = false,
        PortSecurityEnabled = false,
        QosPolicyId = "string",
        Region = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
        AdminStateUp = false,
        TenantId = "string",
        MacAddress = "string",
    });
    
    example, err := networking.NewPort(ctx, "portResource", &networking.PortArgs{
    	NetworkId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	DeviceId:    pulumi.String("string"),
    	DeviceOwner: pulumi.String("string"),
    	DnsName:     pulumi.String("string"),
    	ExtraDhcpOptions: networking.PortExtraDhcpOptionArray{
    		&networking.PortExtraDhcpOptionArgs{
    			Name:      pulumi.String("string"),
    			Value:     pulumi.String("string"),
    			IpVersion: pulumi.Int(0),
    		},
    	},
    	AllowedAddressPairs: networking.PortAllowedAddressPairArray{
    		&networking.PortAllowedAddressPairArgs{
    			IpAddress:  pulumi.String("string"),
    			MacAddress: pulumi.String("string"),
    		},
    	},
    	ValueSpecs: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Binding: &networking.PortBindingArgs{
    		HostId:  pulumi.String("string"),
    		Profile: pulumi.String("string"),
    		VifDetails: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		VifType:  pulumi.String("string"),
    		VnicType: pulumi.String("string"),
    	},
    	FixedIps: networking.PortFixedIpArray{
    		&networking.PortFixedIpArgs{
    			IpAddress: pulumi.String("string"),
    			SubnetId:  pulumi.String("string"),
    		},
    	},
    	NoFixedIp:           pulumi.Bool(false),
    	NoSecurityGroups:    pulumi.Bool(false),
    	PortSecurityEnabled: pulumi.Bool(false),
    	QosPolicyId:         pulumi.String("string"),
    	Region:              pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AdminStateUp: pulumi.Bool(false),
    	TenantId:     pulumi.String("string"),
    	MacAddress:   pulumi.String("string"),
    })
    
    var portResource = new Port("portResource", PortArgs.builder()
        .networkId("string")
        .name("string")
        .tags("string")
        .description("string")
        .deviceId("string")
        .deviceOwner("string")
        .dnsName("string")
        .extraDhcpOptions(PortExtraDhcpOptionArgs.builder()
            .name("string")
            .value("string")
            .ipVersion(0)
            .build())
        .allowedAddressPairs(PortAllowedAddressPairArgs.builder()
            .ipAddress("string")
            .macAddress("string")
            .build())
        .valueSpecs(Map.of("string", "string"))
        .binding(PortBindingArgs.builder()
            .hostId("string")
            .profile("string")
            .vifDetails(Map.of("string", "string"))
            .vifType("string")
            .vnicType("string")
            .build())
        .fixedIps(PortFixedIpArgs.builder()
            .ipAddress("string")
            .subnetId("string")
            .build())
        .noFixedIp(false)
        .noSecurityGroups(false)
        .portSecurityEnabled(false)
        .qosPolicyId("string")
        .region("string")
        .securityGroupIds("string")
        .adminStateUp(false)
        .tenantId("string")
        .macAddress("string")
        .build());
    
    port_resource = openstack.networking.Port("portResource",
        network_id="string",
        name="string",
        tags=["string"],
        description="string",
        device_id="string",
        device_owner="string",
        dns_name="string",
        extra_dhcp_options=[{
            "name": "string",
            "value": "string",
            "ip_version": 0,
        }],
        allowed_address_pairs=[{
            "ip_address": "string",
            "mac_address": "string",
        }],
        value_specs={
            "string": "string",
        },
        binding={
            "host_id": "string",
            "profile": "string",
            "vif_details": {
                "string": "string",
            },
            "vif_type": "string",
            "vnic_type": "string",
        },
        fixed_ips=[{
            "ip_address": "string",
            "subnet_id": "string",
        }],
        no_fixed_ip=False,
        no_security_groups=False,
        port_security_enabled=False,
        qos_policy_id="string",
        region="string",
        security_group_ids=["string"],
        admin_state_up=False,
        tenant_id="string",
        mac_address="string")
    
    const portResource = new openstack.networking.Port("portResource", {
        networkId: "string",
        name: "string",
        tags: ["string"],
        description: "string",
        deviceId: "string",
        deviceOwner: "string",
        dnsName: "string",
        extraDhcpOptions: [{
            name: "string",
            value: "string",
            ipVersion: 0,
        }],
        allowedAddressPairs: [{
            ipAddress: "string",
            macAddress: "string",
        }],
        valueSpecs: {
            string: "string",
        },
        binding: {
            hostId: "string",
            profile: "string",
            vifDetails: {
                string: "string",
            },
            vifType: "string",
            vnicType: "string",
        },
        fixedIps: [{
            ipAddress: "string",
            subnetId: "string",
        }],
        noFixedIp: false,
        noSecurityGroups: false,
        portSecurityEnabled: false,
        qosPolicyId: "string",
        region: "string",
        securityGroupIds: ["string"],
        adminStateUp: false,
        tenantId: "string",
        macAddress: "string",
    });
    
    type: openstack:networking:Port
    properties:
        adminStateUp: false
        allowedAddressPairs:
            - ipAddress: string
              macAddress: string
        binding:
            hostId: string
            profile: string
            vifDetails:
                string: string
            vifType: string
            vnicType: string
        description: string
        deviceId: string
        deviceOwner: string
        dnsName: string
        extraDhcpOptions:
            - ipVersion: 0
              name: string
              value: string
        fixedIps:
            - ipAddress: string
              subnetId: string
        macAddress: string
        name: string
        networkId: string
        noFixedIp: false
        noSecurityGroups: false
        portSecurityEnabled: false
        qosPolicyId: string
        region: string
        securityGroupIds:
            - string
        tags:
            - string
        tenantId: string
        valueSpecs:
            string: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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, string>
    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]string
    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,String>
    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]: string}
    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, str]
    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<String>
    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, string>>
    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]string
    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,String>>
    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]: string}[]
    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, str]]
    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<String>>
    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, 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, str]] = 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, string>>
    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, string>
    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]string
    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]string
    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,String>>
    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,String>
    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]: string}[]
    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]: string}
    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, str]]
    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, str]
    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<String>>
    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<String>
    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, string>
    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]string
    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,String>
    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]: string}
    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, str]
    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<String>
    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

    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.
    subnetId string
    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.
    subnet_id str
    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.

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    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 v5.0.0 published on Friday, Sep 27, 2024 by Pulumi