1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. NetworkingPortV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.NetworkingPortV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    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",
        },
    });
    
    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",
        })
    
    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
    	})
    }
    
    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",
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    Notes

    The arguments mac_address and tenant_id are no longer supported as input and are therefore removed from the argument reference.

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

    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 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:
    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).
    Timeouts NetworkingPortV2Timeouts
    ValueSpecs Dictionary<string, string>
    Map of additional options.
    NetworkId string
    The ID of the network to attach the port to. Changing this creates a new port.
    AdminStateUp bool
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    AllowedAddressPairs []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:
    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).
    Timeouts NetworkingPortV2TimeoutsArgs
    ValueSpecs map[string]string
    Map of additional options.
    networkId String
    The ID of the network to attach the port to. Changing this creates a new port.
    adminStateUp Boolean
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    allowedAddressPairs List<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:
    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).
    timeouts NetworkingPortV2Timeouts
    valueSpecs Map<String,String>
    Map of additional options.
    networkId string
    The ID of the network to attach the port to. Changing this creates a new port.
    adminStateUp boolean
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    allowedAddressPairs 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:
    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).
    timeouts NetworkingPortV2Timeouts
    valueSpecs {[key: string]: string}
    Map of additional options.
    network_id str
    The ID of the network to attach the port to. Changing this creates a new port.
    admin_state_up bool
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    allowed_address_pairs Sequence[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:
    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).
    timeouts NetworkingPortV2TimeoutsArgs
    value_specs Mapping[str, str]
    Map of additional options.
    networkId String
    The ID of the network to attach the port to. Changing this creates a new port.
    adminStateUp Boolean
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    allowedAddressPairs List<Property Map>
    An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below. 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:
    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).
    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.
    MacAddress string
    Specifies the port MAC address.
    AllFixedIps []string
    Id string
    The provider-assigned unique ID for this managed resource.
    MacAddress string
    Specifies the port MAC address.
    allFixedIps List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    Specifies the port MAC address.
    allFixedIps string[]
    id string
    The provider-assigned unique ID for this managed resource.
    macAddress string
    Specifies the port MAC address.
    all_fixed_ips Sequence[str]
    id str
    The provider-assigned unique ID for this managed resource.
    mac_address str
    Specifies the port MAC address.
    allFixedIps List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    macAddress String
    Specifies the port MAC address.

    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,
            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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdminStateUp bool
    Administrative up/down status for the port (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing port.
    AllFixedIps List<string>
    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
    Specifies the port MAC address.
    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).
    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
    Specifies the port MAC address.
    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).
    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
    Specifies the port MAC address.
    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).
    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
    Specifies the port MAC address.
    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).
    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
    Specifies the port MAC address.
    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).
    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
    Specifies the port MAC address.
    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).
    timeouts Property Map
    valueSpecs Map<String>
    Map of additional options.

    Supporting Types

    NetworkingPortV2AllowedAddressPair, NetworkingPortV2AllowedAddressPairArgs

    IpAddress string
    The additional IP address.
    MacAddress string
    The additional MAC address.
    IpAddress string
    The additional IP address.
    MacAddress string
    The additional MAC address.
    ipAddress String
    The additional IP address.
    macAddress String
    The additional MAC address.
    ipAddress string
    The additional IP address.
    macAddress string
    The additional MAC address.
    ip_address str
    The additional IP address.
    mac_address str
    The additional MAC address.
    ipAddress String
    The additional IP address.
    macAddress String
    The additional MAC address.

    NetworkingPortV2ExtraDhcpOption, NetworkingPortV2ExtraDhcpOptionArgs

    Name string
    Specifies the option name.
    Value string
    Specifies the option value.
    Name string
    Specifies the option name.
    Value string
    Specifies the option value.
    name String
    Specifies the option name.
    value String
    Specifies the option value.
    name string
    Specifies the option name.
    value string
    Specifies the option value.
    name str
    Specifies the option name.
    value str
    Specifies the option value.
    name String
    Specifies the option name.
    value String
    Specifies the option value.

    NetworkingPortV2FixedIp, NetworkingPortV2FixedIpArgs

    SubnetId string
    Subnet in which to allocate IP address for this port.
    IpAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
    SubnetId string
    Subnet in which to allocate IP address for this port.
    IpAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
    subnetId String
    Subnet in which to allocate IP address for this port.
    ipAddress String
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
    subnetId string
    Subnet in which to allocate IP address for this port.
    ipAddress string
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
    subnet_id str
    Subnet in which to allocate IP address for this port.
    ip_address str
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.
    subnetId String
    Subnet in which to allocate IP address for this port.
    ipAddress String
    IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port.

    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
    

    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.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud