openstack.networking.Port
Explore with Pulumi AI
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
ordepends_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)
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:
- Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Admin
State boolUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - Allowed
Address List<Pulumi.Pairs Open Stack. Networking. Inputs. Port Allowed Address Pair> - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Binding
Pulumi.
Open Stack. Networking. Inputs. Port Binding - 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. - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the port. Changing this creates a new port.
- Dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- Extra
Dhcp List<Pulumi.Options Open Stack. Networking. Inputs. Port Extra Dhcp Option> - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- Fixed
Ips List<Pulumi.Open Stack. Networking. Inputs. Port Fixed Ip> - An array of desired IPs for this port. The structure is described below.
- Mac
Address 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. - No
Fixed boolIp - 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 boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 boolEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Qos
Policy stringId - 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. - Security
Group List<string>Ids - 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).
- List<string>
- A set of string tags for the port.
- Tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- Value
Specs Dictionary<string, string> - Map of additional options.
- Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- Admin
State boolUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - Allowed
Address []PortPairs Allowed Address Pair Args - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Binding
Port
Binding Args - 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. - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the port. Changing this creates a new port.
- Dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- Extra
Dhcp []PortOptions Extra Dhcp Option Args - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- Fixed
Ips []PortFixed Ip Args - An array of desired IPs for this port. The structure is described below.
- Mac
Address 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. - No
Fixed boolIp - 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 boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 boolEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Qos
Policy stringId - 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. - Security
Group []stringIds - 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).
- []string
- A set of string tags for the port.
- Tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- Value
Specs map[string]string - Map of additional options.
- network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State BooleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - allowed
Address List<PortPairs Allowed Address Pair> - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding - 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. - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the port. Changing this creates a new port.
- dns
Name String - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp List<PortOptions Extra Dhcp Option> - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips List<PortFixed Ip> - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - no
Fixed BooleanIp - 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 BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 BooleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy StringId - 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. - security
Group List<String>Ids - 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).
- List<String>
- A set of string tags for the port.
- tenant
Id String - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs Map<String,String> - Map of additional options.
- network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State booleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - allowed
Address PortPairs Allowed Address Pair[] - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding - 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. - device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner string - The device owner of the port. Changing this creates a new port.
- dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp PortOptions Extra Dhcp Option[] - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips PortFixed Ip[] - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - no
Fixed booleanIp - 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 booleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 booleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy stringId - 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. - security
Group string[]Ids - 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).
- string[]
- A set of string tags for the port.
- tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs {[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_ boolup - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - allowed_
address_ Sequence[Portpairs Allowed Address Pair Args] - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding Args - 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_ Sequence[Portoptions Extra Dhcp Option Args] - 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[PortFixed Ip Args] - 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_ boolip - 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_ boolgroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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_ boolenabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos_
policy_ strid - 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_ Sequence[str]ids - 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).
- 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.
- network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- admin
State BooleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - allowed
Address List<Property Map>Pairs - 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. - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the port. Changing this creates a new port.
- dns
Name String - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp List<Property Map>Options - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips List<Property Map> - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - no
Fixed BooleanIp - 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 BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 BooleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy StringId - 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. - security
Group List<String>Ids - 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).
- List<String>
- A set of string tags for the port.
- tenant
Id String - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs 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:
- All
Fixed List<string>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security List<string>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<string>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- Dns
Assignments List<ImmutableDictionary<string, string>> - The list of maps representing port DNS assignments.
- Id string
- The provider-assigned unique ID for this managed resource.
- All
Fixed []stringIps - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security []stringGroup Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- []string
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- Dns
Assignments []map[string]string - The list of maps representing port DNS assignments.
- Id string
- The provider-assigned unique ID for this managed resource.
- all
Fixed List<String>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<String>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- dns
Assignments List<Map<String,String>> - The list of maps representing port DNS assignments.
- id String
- The provider-assigned unique ID for this managed resource.
- all
Fixed string[]Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security string[]Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- string[]
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- dns
Assignments {[key: string]: string}[] - The list of maps representing port DNS assignments.
- id string
- The provider-assigned unique ID for this managed resource.
- all_
fixed_ Sequence[str]ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all_
security_ Sequence[str]group_ ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- 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.
- all
Fixed List<String>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<String>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- dns
Assignments 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.
- Admin
State boolUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - All
Fixed List<string>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security List<string>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<string>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- Allowed
Address List<Pulumi.Pairs Open Stack. Networking. Inputs. Port Allowed Address Pair> - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Binding
Pulumi.
Open Stack. Networking. Inputs. Port Binding - 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. - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the port. Changing this creates a new port.
- Dns
Assignments List<ImmutableDictionary<string, string>> - The list of maps representing port DNS assignments.
- Dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- Extra
Dhcp List<Pulumi.Options Open Stack. Networking. Inputs. Port Extra Dhcp Option> - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- Fixed
Ips List<Pulumi.Open Stack. Networking. Inputs. Port Fixed Ip> - An array of desired IPs for this port. The structure is described below.
- Mac
Address 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. - Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- No
Fixed boolIp - 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 boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 boolEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Qos
Policy stringId - 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. - Security
Group List<string>Ids - 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).
- List<string>
- A set of string tags for the port.
- Tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- Value
Specs Dictionary<string, string> - Map of additional options.
- Admin
State boolUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - All
Fixed []stringIps - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security []stringGroup Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- []string
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- Allowed
Address []PortPairs Allowed Address Pair Args - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Binding
Port
Binding Args - 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. - Device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- Device
Owner string - The device owner of the port. Changing this creates a new port.
- Dns
Assignments []map[string]string - The list of maps representing port DNS assignments.
- Dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- Extra
Dhcp []PortOptions Extra Dhcp Option Args - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- Fixed
Ips []PortFixed Ip Args - An array of desired IPs for this port. The structure is described below.
- Mac
Address 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. - Network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- No
Fixed boolIp - 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 boolGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 boolEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - Qos
Policy stringId - 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. - Security
Group []stringIds - 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).
- []string
- A set of string tags for the port.
- Tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- Value
Specs map[string]string - Map of additional options.
- admin
State BooleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - all
Fixed List<String>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<String>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- allowed
Address List<PortPairs Allowed Address Pair> - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding - 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. - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the port. Changing this creates a new port.
- dns
Assignments List<Map<String,String>> - The list of maps representing port DNS assignments.
- dns
Name String - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp List<PortOptions Extra Dhcp Option> - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips List<PortFixed Ip> - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- no
Fixed BooleanIp - 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 BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 BooleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy StringId - 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. - security
Group List<String>Ids - 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).
- List<String>
- A set of string tags for the port.
- tenant
Id String - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs Map<String,String> - Map of additional options.
- admin
State booleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - all
Fixed string[]Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security string[]Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- string[]
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- allowed
Address PortPairs Allowed Address Pair[] - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding - 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. - device
Id string - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner string - The device owner of the port. Changing this creates a new port.
- dns
Assignments {[key: string]: string}[] - The list of maps representing port DNS assignments.
- dns
Name string - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp PortOptions Extra Dhcp Option[] - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips PortFixed Ip[] - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - network
Id string - The ID of the network to attach the port to. Changing this creates a new port.
- no
Fixed booleanIp - 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 booleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 booleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy stringId - 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. - security
Group string[]Ids - 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).
- string[]
- A set of string tags for the port.
- tenant
Id string - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs {[key: string]: string} - Map of additional options.
- admin_
state_ boolup - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - all_
fixed_ Sequence[str]ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all_
security_ Sequence[str]group_ ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- Sequence[str]
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- allowed_
address_ Sequence[Portpairs Allowed Address Pair Args] - An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- binding
Port
Binding Args - 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_ Sequence[Portoptions Extra Dhcp Option Args] - 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[PortFixed Ip Args] - 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_ boolip - 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_ boolgroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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_ boolenabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos_
policy_ strid - 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_ Sequence[str]ids - 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).
- 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.
- admin
State BooleanUp - Administrative up/down status for the port
(must be
true
orfalse
if provided). Changing this updates theadmin_state_up
of an existing port. - all
Fixed List<String>Ips - The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - The collection of Security Group IDs on the port which have been explicitly and implicitly added.
- List<String>
- The collection of tags assigned on the port, which have been explicitly and implicitly added.
- allowed
Address List<Property Map>Pairs - 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. - device
Id String - The ID of the device attached to the port. Changing this creates a new port.
- device
Owner String - The device owner of the port. Changing this creates a new port.
- dns
Assignments List<Map<String>> - The list of maps representing port DNS assignments.
- dns
Name String - The port DNS name. Available, when Neutron DNS extension is enabled.
- extra
Dhcp List<Property Map>Options - An extra DHCP option that needs to be configured on the port. The structure is described below. Can be specified multiple times.
- fixed
Ips List<Property Map> - An array of desired IPs for this port. The structure is described below.
- mac
Address 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. - network
Id String - The ID of the network to attach the port to. Changing this creates a new port.
- no
Fixed BooleanIp - 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 BooleanGroups - If set to
true
, then no security groups are applied to the port. If set tofalse
and nosecurity_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 BooleanEnabled - 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 tofalse
will disable port security. In order to disable port security, the port must not have any security groups. Valid values aretrue
andfalse
. - qos
Policy StringId - 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. - security
Group List<String>Ids - 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).
- List<String>
- A set of string tags for the port.
- tenant
Id String - The owner of the port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
- value
Specs Map<String> - Map of additional options.
Supporting Types
PortAllowedAddressPair, PortAllowedAddressPairArgs
- Ip
Address string - The additional IP address.
- Mac
Address string - The additional MAC address.
- Ip
Address string - The additional IP address.
- Mac
Address string - The additional MAC address.
- ip
Address String - The additional IP address.
- mac
Address String - The additional MAC address.
- ip
Address string - The additional IP address.
- mac
Address string - The additional MAC address.
- ip_
address str - The additional IP address.
- mac_
address str - The additional MAC address.
- ip
Address String - The additional IP address.
- mac
Address String - The additional MAC address.
PortBinding, PortBindingArgs
- Host
Id 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. - Vif
Details Dictionary<string, string> - A map of JSON strings containing additional details for this specific binding.
- Vif
Type string - The VNIC type of the port binding.
- Vnic
Type string - VNIC type for the port. Can either be
direct
,direct-physical
,macvtap
,normal
,baremetal
orvirtio-forwarder
. Default value isnormal
. It can be updated on unbound ports only.
- Host
Id 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. - Vif
Details map[string]string - A map of JSON strings containing additional details for this specific binding.
- Vif
Type string - The VNIC type of the port binding.
- Vnic
Type string - VNIC type for the port. Can either be
direct
,direct-physical
,macvtap
,normal
,baremetal
orvirtio-forwarder
. Default value isnormal
. It can be updated on unbound ports only.
- host
Id 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. - vif
Details Map<String,String> - A map of JSON strings containing additional details for this specific binding.
- vif
Type String - The VNIC type of the port binding.
- vnic
Type String - VNIC type for the port. Can either be
direct
,direct-physical
,macvtap
,normal
,baremetal
orvirtio-forwarder
. Default value isnormal
. It can be updated on unbound ports only.
- host
Id 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. - vif
Details {[key: string]: string} - A map of JSON strings containing additional details for this specific binding.
- vif
Type string - The VNIC type of the port binding.
- vnic
Type string - VNIC type for the port. Can either be
direct
,direct-physical
,macvtap
,normal
,baremetal
orvirtio-forwarder
. Default value isnormal
. 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
orvirtio-forwarder
. Default value isnormal
. It can be updated on unbound ports only.
- host
Id 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. - vif
Details Map<String> - A map of JSON strings containing additional details for this specific binding.
- vif
Type String - The VNIC type of the port binding.
- vnic
Type String - VNIC type for the port. Can either be
direct
,direct-physical
,macvtap
,normal
,baremetal
orvirtio-forwarder
. Default value isnormal
. It can be updated on unbound ports only.
PortExtraDhcpOption, PortExtraDhcpOptionArgs
- name str
- Name of the DHCP option.
- value str
- Value of the DHCP option.
- ip_
version int - IP protocol version. Defaults to 4.
PortFixedIp, PortFixedIpArgs
- Ip
Address 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 theall_fixed_ips
attribute. - Subnet
Id string - Subnet in which to allocate IP address for this port.
- Ip
Address 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 theall_fixed_ips
attribute. - Subnet
Id string - Subnet in which to allocate IP address for this port.
- ip
Address 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 theall_fixed_ips
attribute. - subnet
Id String - Subnet in which to allocate IP address for this port.
- ip
Address 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 theall_fixed_ips
attribute. - subnet
Id 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 theall_fixed_ips
attribute. - subnet_
id str - Subnet in which to allocate IP address for this port.
- ip
Address 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 theall_fixed_ips
attribute. - subnet
Id 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.