1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. NetworkingPortV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.NetworkingPortV2

Explore with Pulumi AI

Up-to-date reference of API arguments for VPC port you can get at documentation portal

Manages a V2 port resource within OpenTelekomCloud.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
    cidr: "192.168.199.0/24",
    ipVersion: 4,
    networkId: network1.networkingNetworkV2Id,
});
const port1 = new opentelekomcloud.NetworkingPortV2("port1", {
    adminStateUp: true,
    networkId: network1.networkingNetworkV2Id,
    fixedIp: {
        subnetId: subnet1.networkingSubnetV2Id,
        ipAddress: "192.168.199.23",
    },
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
    cidr="192.168.199.0/24",
    ip_version=4,
    network_id=network1.networking_network_v2_id)
port1 = opentelekomcloud.NetworkingPortV2("port1",
    admin_state_up=True,
    network_id=network1.networking_network_v2_id,
    fixed_ip={
        "subnet_id": subnet1.networking_subnet_v2_id,
        "ip_address": "192.168.199.23",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
			AdminStateUp: pulumi.String("true"),
		})
		if err != nil {
			return err
		}
		subnet1, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
			Cidr:      pulumi.String("192.168.199.0/24"),
			IpVersion: pulumi.Float64(4),
			NetworkId: network1.NetworkingNetworkV2Id,
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewNetworkingPortV2(ctx, "port1", &opentelekomcloud.NetworkingPortV2Args{
			AdminStateUp: pulumi.Bool(true),
			NetworkId:    network1.NetworkingNetworkV2Id,
			FixedIp: &opentelekomcloud.NetworkingPortV2FixedIpArgs{
				SubnetId:  subnet1.NetworkingSubnetV2Id,
				IpAddress: pulumi.String("192.168.199.23"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
    {
        AdminStateUp = "true",
    });

    var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
    {
        Cidr = "192.168.199.0/24",
        IpVersion = 4,
        NetworkId = network1.NetworkingNetworkV2Id,
    });

    var port1 = new Opentelekomcloud.NetworkingPortV2("port1", new()
    {
        AdminStateUp = true,
        NetworkId = network1.NetworkingNetworkV2Id,
        FixedIp = new Opentelekomcloud.Inputs.NetworkingPortV2FixedIpArgs
        {
            SubnetId = subnet1.NetworkingSubnetV2Id,
            IpAddress = "192.168.199.23",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
import com.pulumi.opentelekomcloud.NetworkingPortV2;
import com.pulumi.opentelekomcloud.NetworkingPortV2Args;
import com.pulumi.opentelekomcloud.inputs.NetworkingPortV2FixedIpArgs;
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 NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
            .adminStateUp("true")
            .build());

        var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
            .cidr("192.168.199.0/24")
            .ipVersion(4)
            .networkId(network1.networkingNetworkV2Id())
            .build());

        var port1 = new NetworkingPortV2("port1", NetworkingPortV2Args.builder()
            .adminStateUp("true")
            .networkId(network1.networkingNetworkV2Id())
            .fixedIp(NetworkingPortV2FixedIpArgs.builder()
                .subnetId(subnet1.networkingSubnetV2Id())
                .ipAddress("192.168.199.23")
                .build())
            .build());

    }
}
Copy
resources:
  port1:
    type: opentelekomcloud:NetworkingPortV2
    properties:
      adminStateUp: 'true'
      networkId: ${network1.networkingNetworkV2Id}
      fixedIp:
        subnetId: ${subnet1.networkingSubnetV2Id}
        ipAddress: 192.168.199.23
  network1:
    type: opentelekomcloud:NetworkingNetworkV2
    properties:
      adminStateUp: 'true'
  subnet1:
    type: opentelekomcloud:NetworkingSubnetV2
    properties:
      cidr: 192.168.199.0/24
      ipVersion: 4
      networkId: ${network1.networkingNetworkV2Id}
Copy

Notes

Ports and Instances

There are some notes to consider when connecting Instances to networks using Ports. Please see the opentelekomcloud.ComputeInstanceV2 documentation for further documentation.

Create NetworkingPortV2 Resource

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

Constructor syntax

new NetworkingPortV2(name: string, args: NetworkingPortV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingPortV2(resource_name: str,
                     args: NetworkingPortV2Args,
                     opts: Optional[ResourceOptions] = None)

@overload
def NetworkingPortV2(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     network_id: Optional[str] = None,
                     extra_dhcp_options: Optional[Sequence[NetworkingPortV2ExtraDhcpOptionArgs]] = None,
                     no_security_groups: Optional[bool] = None,
                     device_owner: Optional[str] = None,
                     admin_state_up: Optional[bool] = None,
                     fixed_ip: Optional[NetworkingPortV2FixedIpArgs] = None,
                     mac_address: Optional[str] = None,
                     device_id: Optional[str] = None,
                     name: Optional[str] = None,
                     networking_port_v2_id: Optional[str] = None,
                     allowed_address_pairs: Optional[Sequence[NetworkingPortV2AllowedAddressPairArgs]] = None,
                     port_security_enabled: Optional[bool] = None,
                     region: Optional[str] = None,
                     security_group_ids: Optional[Sequence[str]] = None,
                     tenant_id: Optional[str] = None,
                     timeouts: Optional[NetworkingPortV2TimeoutsArgs] = None,
                     value_specs: Optional[Mapping[str, str]] = None)
func NewNetworkingPortV2(ctx *Context, name string, args NetworkingPortV2Args, opts ...ResourceOption) (*NetworkingPortV2, error)
public NetworkingPortV2(string name, NetworkingPortV2Args args, CustomResourceOptions? opts = null)
public NetworkingPortV2(String name, NetworkingPortV2Args args)
public NetworkingPortV2(String name, NetworkingPortV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingPortV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NetworkingPortV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NetworkingPortV2Args
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 networkingPortV2Resource = new Opentelekomcloud.NetworkingPortV2("networkingPortV2Resource", new()
{
    NetworkId = "string",
    ExtraDhcpOptions = new[]
    {
        new Opentelekomcloud.Inputs.NetworkingPortV2ExtraDhcpOptionArgs
        {
            Name = "string",
            Value = "string",
        },
    },
    NoSecurityGroups = false,
    DeviceOwner = "string",
    AdminStateUp = false,
    FixedIp = new Opentelekomcloud.Inputs.NetworkingPortV2FixedIpArgs
    {
        SubnetId = "string",
        IpAddress = "string",
    },
    MacAddress = "string",
    DeviceId = "string",
    Name = "string",
    NetworkingPortV2Id = "string",
    AllowedAddressPairs = new[]
    {
        new Opentelekomcloud.Inputs.NetworkingPortV2AllowedAddressPairArgs
        {
            IpAddress = "string",
            MacAddress = "string",
        },
    },
    PortSecurityEnabled = false,
    Region = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    TenantId = "string",
    Timeouts = new Opentelekomcloud.Inputs.NetworkingPortV2TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    ValueSpecs = 
    {
        { "string", "string" },
    },
});
Copy
example, err := opentelekomcloud.NewNetworkingPortV2(ctx, "networkingPortV2Resource", &opentelekomcloud.NetworkingPortV2Args{
NetworkId: pulumi.String("string"),
ExtraDhcpOptions: .NetworkingPortV2ExtraDhcpOptionArray{
&.NetworkingPortV2ExtraDhcpOptionArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
NoSecurityGroups: pulumi.Bool(false),
DeviceOwner: pulumi.String("string"),
AdminStateUp: pulumi.Bool(false),
FixedIp: &.NetworkingPortV2FixedIpArgs{
SubnetId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
},
MacAddress: pulumi.String("string"),
DeviceId: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkingPortV2Id: pulumi.String("string"),
AllowedAddressPairs: .NetworkingPortV2AllowedAddressPairArray{
&.NetworkingPortV2AllowedAddressPairArgs{
IpAddress: pulumi.String("string"),
MacAddress: pulumi.String("string"),
},
},
PortSecurityEnabled: pulumi.Bool(false),
Region: pulumi.String("string"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.String("string"),
Timeouts: &.NetworkingPortV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
Copy
var networkingPortV2Resource = new NetworkingPortV2("networkingPortV2Resource", NetworkingPortV2Args.builder()
    .networkId("string")
    .extraDhcpOptions(NetworkingPortV2ExtraDhcpOptionArgs.builder()
        .name("string")
        .value("string")
        .build())
    .noSecurityGroups(false)
    .deviceOwner("string")
    .adminStateUp(false)
    .fixedIp(NetworkingPortV2FixedIpArgs.builder()
        .subnetId("string")
        .ipAddress("string")
        .build())
    .macAddress("string")
    .deviceId("string")
    .name("string")
    .networkingPortV2Id("string")
    .allowedAddressPairs(NetworkingPortV2AllowedAddressPairArgs.builder()
        .ipAddress("string")
        .macAddress("string")
        .build())
    .portSecurityEnabled(false)
    .region("string")
    .securityGroupIds("string")
    .tenantId("string")
    .timeouts(NetworkingPortV2TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .valueSpecs(Map.of("string", "string"))
    .build());
Copy
networking_port_v2_resource = opentelekomcloud.NetworkingPortV2("networkingPortV2Resource",
    network_id="string",
    extra_dhcp_options=[{
        "name": "string",
        "value": "string",
    }],
    no_security_groups=False,
    device_owner="string",
    admin_state_up=False,
    fixed_ip={
        "subnet_id": "string",
        "ip_address": "string",
    },
    mac_address="string",
    device_id="string",
    name="string",
    networking_port_v2_id="string",
    allowed_address_pairs=[{
        "ip_address": "string",
        "mac_address": "string",
    }],
    port_security_enabled=False,
    region="string",
    security_group_ids=["string"],
    tenant_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
    },
    value_specs={
        "string": "string",
    })
Copy
const networkingPortV2Resource = new opentelekomcloud.NetworkingPortV2("networkingPortV2Resource", {
    networkId: "string",
    extraDhcpOptions: [{
        name: "string",
        value: "string",
    }],
    noSecurityGroups: false,
    deviceOwner: "string",
    adminStateUp: false,
    fixedIp: {
        subnetId: "string",
        ipAddress: "string",
    },
    macAddress: "string",
    deviceId: "string",
    name: "string",
    networkingPortV2Id: "string",
    allowedAddressPairs: [{
        ipAddress: "string",
        macAddress: "string",
    }],
    portSecurityEnabled: false,
    region: "string",
    securityGroupIds: ["string"],
    tenantId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
    valueSpecs: {
        string: "string",
    },
});
Copy
type: opentelekomcloud:NetworkingPortV2
properties:
    adminStateUp: false
    allowedAddressPairs:
        - ipAddress: string
          macAddress: string
    deviceId: string
    deviceOwner: string
    extraDhcpOptions:
        - name: string
          value: string
    fixedIp:
        ipAddress: string
        subnetId: string
    macAddress: string
    name: string
    networkId: string
    networkingPortV2Id: string
    noSecurityGroups: false
    portSecurityEnabled: false
    region: string
    securityGroupIds:
        - string
    tenantId: string
    timeouts:
        create: string
        delete: string
    valueSpecs:
        string: string
Copy

NetworkingPortV2 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 NetworkingPortV2 resource accepts the following input properties:

NetworkId This property is required. 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<NetworkingPortV2AllowedAddressPair>
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
ExtraDhcpOptions List<NetworkingPortV2ExtraDhcpOption>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
FixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
NetworkingPortV2Id string
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.
Region string
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).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2Timeouts
ValueSpecs Dictionary<string, string>
Map of additional options.
NetworkId This property is required. 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 []NetworkingPortV2AllowedAddressPairArgs
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
ExtraDhcpOptions []NetworkingPortV2ExtraDhcpOptionArgs
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
FixedIp NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
NetworkingPortV2Id string
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.
Region string
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).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2TimeoutsArgs
ValueSpecs map[string]string
Map of additional options.
networkId This property is required. 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<NetworkingPortV2AllowedAddressPair>
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extraDhcpOptions List<NetworkingPortV2ExtraDhcpOption>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id String
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.
region String
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).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs Map<String,String>
Map of additional options.
networkId This property is required. 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 NetworkingPortV2AllowedAddressPair[]
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extraDhcpOptions NetworkingPortV2ExtraDhcpOption[]
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id string
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.
region string
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).
tenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
valueSpecs {[key: string]: string}
Map of additional options.
network_id This property is required. 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[NetworkingPortV2AllowedAddressPairArgs]
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extra_dhcp_options Sequence[NetworkingPortV2ExtraDhcpOptionArgs]
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixed_ip NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networking_port_v2_id str
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.
region str
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).
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.
timeouts NetworkingPortV2TimeoutsArgs
value_specs Mapping[str, str]
Map of additional options.
networkId This property is required. 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. The allowed_address_pairs block supports:
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.
extraDhcpOptions List<Property Map>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp Property Map
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id String
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.
region String
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).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts Property Map
valueSpecs Map<String>
Map of additional options.

Outputs

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

AllFixedIps List<string>
Id string
The provider-assigned unique ID for this managed resource.
AllFixedIps []string
Id string
The provider-assigned unique ID for this managed resource.
allFixedIps List<String>
id String
The provider-assigned unique ID for this managed resource.
allFixedIps string[]
id string
The provider-assigned unique ID for this managed resource.
all_fixed_ips Sequence[str]
id str
The provider-assigned unique ID for this managed resource.
allFixedIps List<String>
id String
The provider-assigned unique ID for this managed resource.

Look up Existing NetworkingPortV2 Resource

Get an existing NetworkingPortV2 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?: NetworkingPortV2State, opts?: CustomResourceOptions): NetworkingPortV2
@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,
        allowed_address_pairs: Optional[Sequence[NetworkingPortV2AllowedAddressPairArgs]] = None,
        device_id: Optional[str] = None,
        device_owner: Optional[str] = None,
        extra_dhcp_options: Optional[Sequence[NetworkingPortV2ExtraDhcpOptionArgs]] = None,
        fixed_ip: Optional[NetworkingPortV2FixedIpArgs] = None,
        mac_address: Optional[str] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        networking_port_v2_id: Optional[str] = None,
        no_security_groups: Optional[bool] = None,
        port_security_enabled: Optional[bool] = None,
        region: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        tenant_id: Optional[str] = None,
        timeouts: Optional[NetworkingPortV2TimeoutsArgs] = None,
        value_specs: Optional[Mapping[str, str]] = None) -> NetworkingPortV2
func GetNetworkingPortV2(ctx *Context, name string, id IDInput, state *NetworkingPortV2State, opts ...ResourceOption) (*NetworkingPortV2, error)
public static NetworkingPortV2 Get(string name, Input<string> id, NetworkingPortV2State? state, CustomResourceOptions? opts = null)
public static NetworkingPortV2 get(String name, Output<String> id, NetworkingPortV2State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:NetworkingPortV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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>
AllowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
ExtraDhcpOptions List<NetworkingPortV2ExtraDhcpOption>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
FixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
NetworkingPortV2Id string
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.
Region string
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).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2Timeouts
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
AllowedAddressPairs []NetworkingPortV2AllowedAddressPairArgs
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
ExtraDhcpOptions []NetworkingPortV2ExtraDhcpOptionArgs
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
FixedIp NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
NetworkingPortV2Id string
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.
Region string
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).
TenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
Timeouts NetworkingPortV2TimeoutsArgs
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>
allowedAddressPairs List<NetworkingPortV2AllowedAddressPair>
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extraDhcpOptions List<NetworkingPortV2ExtraDhcpOption>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id String
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.
region String
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).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
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[]
allowedAddressPairs NetworkingPortV2AllowedAddressPair[]
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extraDhcpOptions NetworkingPortV2ExtraDhcpOption[]
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp NetworkingPortV2FixedIp
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id string
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.
region string
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).
tenantId string
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts NetworkingPortV2Timeouts
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]
allowed_address_pairs Sequence[NetworkingPortV2AllowedAddressPairArgs]
An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. The allowed_address_pairs block supports:
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.
extra_dhcp_options Sequence[NetworkingPortV2ExtraDhcpOptionArgs]
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixed_ip NetworkingPortV2FixedIpArgs
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networking_port_v2_id str
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.
region str
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).
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.
timeouts NetworkingPortV2TimeoutsArgs
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>
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. The allowed_address_pairs block supports:
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.
extraDhcpOptions List<Property Map>
Specifies the extended DHCP option. This is an extended attribute. The extra_dhcp_option block supports:
fixedIp Property Map
An array of desired IPs for this port. The structure is described below. A single fixed_ip entry is allowed for a port. The fixed_ip block supports:
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.
networkingPortV2Id String
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.
region String
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).
tenantId String
The owner of the Port. Required if admin wants to create a port for another tenant. Changing this creates a new port.
timeouts Property Map
valueSpecs Map<String>
Map of additional options.

Supporting Types

NetworkingPortV2AllowedAddressPair
, NetworkingPortV2AllowedAddressPairArgs

IpAddress This property is required. string
The additional IP address.
MacAddress string
The additional MAC address.
IpAddress This property is required. string
The additional IP address.
MacAddress string
The additional MAC address.
ipAddress This property is required. String
The additional IP address.
macAddress String
The additional MAC address.
ipAddress This property is required. string
The additional IP address.
macAddress string
The additional MAC address.
ip_address This property is required. str
The additional IP address.
mac_address str
The additional MAC address.
ipAddress This property is required. String
The additional IP address.
macAddress String
The additional MAC address.

NetworkingPortV2ExtraDhcpOption
, NetworkingPortV2ExtraDhcpOptionArgs

Name This property is required. string
Specifies the option name.
Value This property is required. string
Specifies the option value.
Name This property is required. string
Specifies the option name.
Value This property is required. string
Specifies the option value.
name This property is required. String
Specifies the option name.
value This property is required. String
Specifies the option value.
name This property is required. string
Specifies the option name.
value This property is required. string
Specifies the option value.
name This property is required. str
Specifies the option name.
value This property is required. str
Specifies the option value.
name This property is required. String
Specifies the option name.
value This property is required. String
Specifies the option value.

NetworkingPortV2FixedIp
, NetworkingPortV2FixedIpArgs

SubnetId This property is required. 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.
SubnetId This property is required. 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.
subnetId This property is required. 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.
subnetId This property is required. 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.
subnet_id This property is required. str
Subnet in which to allocate IP address for this port.
ip_address str
IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
subnetId This property is required. 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.

NetworkingPortV2Timeouts
, NetworkingPortV2TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

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

$ pulumi import opentelekomcloud:index/networkingPortV2:NetworkingPortV2 port_1 eae26a3e-1c33-4cc1-9c31-0cd729c438a1
Copy

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

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.