1. Packages
  2. Vkcs Provider
  3. API Docs
  4. getNetworkingPort
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.getNetworkingPort

Explore with Pulumi AI

Use this data source to get the ID of an available VKCS port.

Example Usage

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

const persistentEtcd = vkcs.getNetworkingPort({
    tags: [
        "tf-example",
        "etcd",
    ],
    networkId: vkcs_networking_network.db.id,
});
Copy
import pulumi
import pulumi_vkcs as vkcs

persistent_etcd = vkcs.get_networking_port(tags=[
        "tf-example",
        "etcd",
    ],
    network_id=vkcs_networking_network["db"]["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vkcs.LookupNetworkingPort(ctx, &vkcs.LookupNetworkingPortArgs{
			Tags: []string{
				"tf-example",
				"etcd",
			},
			NetworkId: pulumi.StringRef(vkcs_networking_network.Db.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var persistentEtcd = Vkcs.GetNetworkingPort.Invoke(new()
    {
        Tags = new[]
        {
            "tf-example",
            "etcd",
        },
        NetworkId = vkcs_networking_network.Db.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetNetworkingPortArgs;
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) {
        final var persistentEtcd = VkcsFunctions.getNetworkingPort(GetNetworkingPortArgs.builder()
            .tags(            
                "tf-example",
                "etcd")
            .networkId(vkcs_networking_network.db().id())
            .build());

    }
}
Copy
variables:
  persistentEtcd:
    fn::invoke:
      function: vkcs:getNetworkingPort
      arguments:
        tags:
          - tf-example
          - etcd
        networkId: ${vkcs_networking_network.db.id}
Copy

Using getNetworkingPort

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkingPort(args: GetNetworkingPortArgs, opts?: InvokeOptions): Promise<GetNetworkingPortResult>
function getNetworkingPortOutput(args: GetNetworkingPortOutputArgs, opts?: InvokeOptions): Output<GetNetworkingPortResult>
Copy
def get_networking_port(admin_state_up: Optional[bool] = None,
                        description: Optional[str] = None,
                        device_id: Optional[str] = None,
                        device_owner: Optional[str] = None,
                        dns_name: Optional[str] = None,
                        fixed_ip: Optional[str] = None,
                        id: Optional[str] = None,
                        mac_address: Optional[str] = None,
                        name: Optional[str] = None,
                        network_id: Optional[str] = None,
                        port_id: Optional[str] = None,
                        project_id: Optional[str] = None,
                        region: Optional[str] = None,
                        sdn: Optional[str] = None,
                        security_group_ids: Optional[Sequence[str]] = None,
                        status: Optional[str] = None,
                        tags: Optional[Sequence[str]] = None,
                        tenant_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNetworkingPortResult
def get_networking_port_output(admin_state_up: Optional[pulumi.Input[bool]] = None,
                        description: Optional[pulumi.Input[str]] = None,
                        device_id: Optional[pulumi.Input[str]] = None,
                        device_owner: Optional[pulumi.Input[str]] = None,
                        dns_name: Optional[pulumi.Input[str]] = None,
                        fixed_ip: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        mac_address: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        network_id: Optional[pulumi.Input[str]] = None,
                        port_id: Optional[pulumi.Input[str]] = None,
                        project_id: Optional[pulumi.Input[str]] = None,
                        region: Optional[pulumi.Input[str]] = None,
                        sdn: Optional[pulumi.Input[str]] = None,
                        security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        status: Optional[pulumi.Input[str]] = None,
                        tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        tenant_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNetworkingPortResult]
Copy
func LookupNetworkingPort(ctx *Context, args *LookupNetworkingPortArgs, opts ...InvokeOption) (*LookupNetworkingPortResult, error)
func LookupNetworkingPortOutput(ctx *Context, args *LookupNetworkingPortOutputArgs, opts ...InvokeOption) LookupNetworkingPortResultOutput
Copy

> Note: This function is named LookupNetworkingPort in the Go SDK.

public static class GetNetworkingPort 
{
    public static Task<GetNetworkingPortResult> InvokeAsync(GetNetworkingPortArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkingPortResult> Invoke(GetNetworkingPortInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkingPortResult> getNetworkingPort(GetNetworkingPortArgs args, InvokeOptions options)
public static Output<GetNetworkingPortResult> getNetworkingPort(GetNetworkingPortArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vkcs:index/getNetworkingPort:getNetworkingPort
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AdminStateUp bool
optional boolean → The administrative state of the port.
Description string
optional string → Human-readable description of the port.
DeviceId string
optional string → The ID of the device the port belongs to.
DeviceOwner string
optional string → The device owner of the port.
DnsName string
optional string → The port DNS name to filter.
FixedIp string
optional string → The port IP address filter.
Id string
optional string → The ID of the port.
MacAddress string
optional string → The MAC address of the port.
Name string
optional string → The name of the port.
NetworkId string
optional string → The ID of the network the port belongs to.
PortId string
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

ProjectId string
optional string → The project_id of the owner of the port.
Region string
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SecurityGroupIds List<string>
optional set of string → The list of port security group IDs to filter.
Status string
optional string → The status of the port.
Tags List<string>
optional set of string → The list of port tags to filter.
TenantId string
optional string → The tenant_id of the owner of the port.
AdminStateUp bool
optional boolean → The administrative state of the port.
Description string
optional string → Human-readable description of the port.
DeviceId string
optional string → The ID of the device the port belongs to.
DeviceOwner string
optional string → The device owner of the port.
DnsName string
optional string → The port DNS name to filter.
FixedIp string
optional string → The port IP address filter.
Id string
optional string → The ID of the port.
MacAddress string
optional string → The MAC address of the port.
Name string
optional string → The name of the port.
NetworkId string
optional string → The ID of the network the port belongs to.
PortId string
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

ProjectId string
optional string → The project_id of the owner of the port.
Region string
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
Sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
SecurityGroupIds []string
optional set of string → The list of port security group IDs to filter.
Status string
optional string → The status of the port.
Tags []string
optional set of string → The list of port tags to filter.
TenantId string
optional string → The tenant_id of the owner of the port.
adminStateUp Boolean
optional boolean → The administrative state of the port.
description String
optional string → Human-readable description of the port.
deviceId String
optional string → The ID of the device the port belongs to.
deviceOwner String
optional string → The device owner of the port.
dnsName String
optional string → The port DNS name to filter.
fixedIp String
optional string → The port IP address filter.
id String
optional string → The ID of the port.
macAddress String
optional string → The MAC address of the port.
name String
optional string → The name of the port.
networkId String
optional string → The ID of the network the port belongs to.
portId String
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

projectId String
optional string → The project_id of the owner of the port.
region String
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
securityGroupIds List<String>
optional set of string → The list of port security group IDs to filter.
status String
optional string → The status of the port.
tags List<String>
optional set of string → The list of port tags to filter.
tenantId String
optional string → The tenant_id of the owner of the port.
adminStateUp boolean
optional boolean → The administrative state of the port.
description string
optional string → Human-readable description of the port.
deviceId string
optional string → The ID of the device the port belongs to.
deviceOwner string
optional string → The device owner of the port.
dnsName string
optional string → The port DNS name to filter.
fixedIp string
optional string → The port IP address filter.
id string
optional string → The ID of the port.
macAddress string
optional string → The MAC address of the port.
name string
optional string → The name of the port.
networkId string
optional string → The ID of the network the port belongs to.
portId string
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

projectId string
optional string → The project_id of the owner of the port.
region string
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
sdn string
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
securityGroupIds string[]
optional set of string → The list of port security group IDs to filter.
status string
optional string → The status of the port.
tags string[]
optional set of string → The list of port tags to filter.
tenantId string
optional string → The tenant_id of the owner of the port.
admin_state_up bool
optional boolean → The administrative state of the port.
description str
optional string → Human-readable description of the port.
device_id str
optional string → The ID of the device the port belongs to.
device_owner str
optional string → The device owner of the port.
dns_name str
optional string → The port DNS name to filter.
fixed_ip str
optional string → The port IP address filter.
id str
optional string → The ID of the port.
mac_address str
optional string → The MAC address of the port.
name str
optional string → The name of the port.
network_id str
optional string → The ID of the network the port belongs to.
port_id str
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

project_id str
optional string → The project_id of the owner of the port.
region str
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
sdn str
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
security_group_ids Sequence[str]
optional set of string → The list of port security group IDs to filter.
status str
optional string → The status of the port.
tags Sequence[str]
optional set of string → The list of port tags to filter.
tenant_id str
optional string → The tenant_id of the owner of the port.
adminStateUp Boolean
optional boolean → The administrative state of the port.
description String
optional string → Human-readable description of the port.
deviceId String
optional string → The ID of the device the port belongs to.
deviceOwner String
optional string → The device owner of the port.
dnsName String
optional string → The port DNS name to filter.
fixedIp String
optional string → The port IP address filter.
id String
optional string → The ID of the port.
macAddress String
optional string → The MAC address of the port.
name String
optional string → The name of the port.
networkId String
optional string → The ID of the network the port belongs to.
portId String
optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the id attribute instead.

Deprecated: Deprecated

projectId String
optional string → The project_id of the owner of the port.
region String
optional string → The region in which to obtain the Network client. A Network client is needed to retrieve port ids. If omitted, the region argument of the provider is used.
sdn String
optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
securityGroupIds List<String>
optional set of string → The list of port security group IDs to filter.
status String
optional string → The status of the port.
tags List<String>
optional set of string → The list of port tags to filter.
tenantId String
optional string → The tenant_id of the owner of the port.

getNetworkingPort Result

The following output properties are available:

AdminStateUp bool
AllFixedIps List<string>
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
AllSecurityGroupIds List<string>
set of string → The set of security group IDs applied on the port.
AllTags List<string>
set of string → The set of string tags applied on the port.
AllowedAddressPairs List<GetNetworkingPortAllowedAddressPair>
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
Description string
DeviceId string
DeviceOwner string
DnsAssignments List<ImmutableDictionary<string, string>>
map of string → The list of maps representing port DNS assignments.
DnsName string
ExtraDhcpOptions List<GetNetworkingPortExtraDhcpOption>
list → An extra DHCP option configured on the port. The structure is described below.
Id string
MacAddress string
string → The additional MAC address.
Name string
string → Name of the DHCP option.
NetworkId string
PortId string

Deprecated: Deprecated

ProjectId string
Sdn string
Status string
TenantId string
FixedIp string
Region string
SecurityGroupIds List<string>
Tags List<string>
AdminStateUp bool
AllFixedIps []string
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
AllSecurityGroupIds []string
set of string → The set of security group IDs applied on the port.
AllTags []string
set of string → The set of string tags applied on the port.
AllowedAddressPairs []GetNetworkingPortAllowedAddressPair
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
Description string
DeviceId string
DeviceOwner string
DnsAssignments []map[string]string
map of string → The list of maps representing port DNS assignments.
DnsName string
ExtraDhcpOptions []GetNetworkingPortExtraDhcpOption
list → An extra DHCP option configured on the port. The structure is described below.
Id string
MacAddress string
string → The additional MAC address.
Name string
string → Name of the DHCP option.
NetworkId string
PortId string

Deprecated: Deprecated

ProjectId string
Sdn string
Status string
TenantId string
FixedIp string
Region string
SecurityGroupIds []string
Tags []string
adminStateUp Boolean
allFixedIps List<String>
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allSecurityGroupIds List<String>
set of string → The set of security group IDs applied on the port.
allTags List<String>
set of string → The set of string tags applied on the port.
allowedAddressPairs List<GetNetworkingPortAllowedAddressPair>
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
description String
deviceId String
deviceOwner String
dnsAssignments List<Map<String,String>>
map of string → The list of maps representing port DNS assignments.
dnsName String
extraDhcpOptions List<GetNetworkingPortExtraDhcpOption>
list → An extra DHCP option configured on the port. The structure is described below.
id String
macAddress String
string → The additional MAC address.
name String
string → Name of the DHCP option.
networkId String
portId String

Deprecated: Deprecated

projectId String
sdn String
status String
tenantId String
fixedIp String
region String
securityGroupIds List<String>
tags List<String>
adminStateUp boolean
allFixedIps string[]
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allSecurityGroupIds string[]
set of string → The set of security group IDs applied on the port.
allTags string[]
set of string → The set of string tags applied on the port.
allowedAddressPairs GetNetworkingPortAllowedAddressPair[]
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
description string
deviceId string
deviceOwner string
dnsAssignments {[key: string]: string}[]
map of string → The list of maps representing port DNS assignments.
dnsName string
extraDhcpOptions GetNetworkingPortExtraDhcpOption[]
list → An extra DHCP option configured on the port. The structure is described below.
id string
macAddress string
string → The additional MAC address.
name string
string → Name of the DHCP option.
networkId string
portId string

Deprecated: Deprecated

projectId string
sdn string
status string
tenantId string
fixedIp string
region string
securityGroupIds string[]
tags string[]
admin_state_up bool
all_fixed_ips Sequence[str]
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
all_security_group_ids Sequence[str]
set of string → The set of security group IDs applied on the port.
all_tags Sequence[str]
set of string → The set of string tags applied on the port.
allowed_address_pairs Sequence[GetNetworkingPortAllowedAddressPair]
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
description str
device_id str
device_owner str
dns_assignments Sequence[Mapping[str, str]]
map of string → The list of maps representing port DNS assignments.
dns_name str
extra_dhcp_options Sequence[GetNetworkingPortExtraDhcpOption]
list → An extra DHCP option configured on the port. The structure is described below.
id str
mac_address str
string → The additional MAC address.
name str
string → Name of the DHCP option.
network_id str
port_id str

Deprecated: Deprecated

project_id str
sdn str
status str
tenant_id str
fixed_ip str
region str
security_group_ids Sequence[str]
tags Sequence[str]
adminStateUp Boolean
allFixedIps List<String>
string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
allSecurityGroupIds List<String>
set of string → The set of security group IDs applied on the port.
allTags List<String>
set of string → The set of string tags applied on the port.
allowedAddressPairs List<Property Map>
set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
description String
deviceId String
deviceOwner String
dnsAssignments List<Map<String>>
map of string → The list of maps representing port DNS assignments.
dnsName String
extraDhcpOptions List<Property Map>
list → An extra DHCP option configured on the port. The structure is described below.
id String
macAddress String
string → The additional MAC address.
name String
string → Name of the DHCP option.
networkId String
portId String

Deprecated: Deprecated

projectId String
sdn String
status String
tenantId String
fixedIp String
region String
securityGroupIds List<String>
tags List<String>

Supporting Types

GetNetworkingPortAllowedAddressPair

IpAddress This property is required. string
string → The additional IP address.
MacAddress This property is required. string
optional string → The MAC address of the port.
IpAddress This property is required. string
string → The additional IP address.
MacAddress This property is required. string
optional string → The MAC address of the port.
ipAddress This property is required. String
string → The additional IP address.
macAddress This property is required. String
optional string → The MAC address of the port.
ipAddress This property is required. string
string → The additional IP address.
macAddress This property is required. string
optional string → The MAC address of the port.
ip_address This property is required. str
string → The additional IP address.
mac_address This property is required. str
optional string → The MAC address of the port.
ipAddress This property is required. String
string → The additional IP address.
macAddress This property is required. String
optional string → The MAC address of the port.

GetNetworkingPortExtraDhcpOption

Name This property is required. string
optional string → The name of the port.
Value This property is required. string
string → Value of the DHCP option.
Name This property is required. string
optional string → The name of the port.
Value This property is required. string
string → Value of the DHCP option.
name This property is required. String
optional string → The name of the port.
value This property is required. String
string → Value of the DHCP option.
name This property is required. string
optional string → The name of the port.
value This property is required. string
string → Value of the DHCP option.
name This property is required. str
optional string → The name of the port.
value This property is required. str
string → Value of the DHCP option.
name This property is required. String
optional string → The name of the port.
value This property is required. String
string → Value of the DHCP option.

Package Details

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