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,
});
import pulumi
import pulumi_vkcs as vkcs
persistent_etcd = vkcs.get_networking_port(tags=[
"tf-example",
"etcd",
],
network_id=vkcs_networking_network["db"]["id"])
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
})
}
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,
});
});
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());
}
}
variables:
persistentEtcd:
fn::invoke:
function: vkcs:getNetworkingPort
arguments:
tags:
- tf-example
- etcd
networkId: ${vkcs_networking_network.db.id}
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>
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]
func LookupNetworkingPort(ctx *Context, args *LookupNetworkingPortArgs, opts ...InvokeOption) (*LookupNetworkingPortResult, error)
func LookupNetworkingPortOutput(ctx *Context, args *LookupNetworkingPortOutputArgs, opts ...InvokeOption) LookupNetworkingPortResultOutput
> 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)
}
public static CompletableFuture<GetNetworkingPortResult> getNetworkingPort(GetNetworkingPortArgs args, InvokeOptions options)
public static Output<GetNetworkingPortResult> getNetworkingPort(GetNetworkingPortArgs args, InvokeOptions options)
fn::invoke:
function: vkcs:index/getNetworkingPort:getNetworkingPort
arguments:
# arguments dictionary
The following arguments are supported:
- Admin
State boolUp - optional boolean → The administrative state of the port.
- Description string
- optional string → Human-readable description of the port.
- Device
Id string - optional string → The ID of the device the port belongs to.
- Device
Owner string - optional string → The device owner of the port.
- Dns
Name string - optional string → The port DNS name to filter.
- Fixed
Ip string - optional string → The port IP address filter.
- Id string
- optional string → The ID of the port.
- Mac
Address string - optional string → The MAC address of the port.
- Name string
- optional string → The name of the port.
- Network
Id string - optional string → The ID of the network the port belongs to.
- Port
Id string - optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the
id
attribute instead. - Project
Id 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.
- Security
Group List<string>Ids - optional set of string → The list of port security group IDs to filter.
- Status string
- optional string → The status of the port.
- List<string>
- optional set of string → The list of port tags to filter.
- Tenant
Id string - optional string → The tenant_id of the owner of the port.
- Admin
State boolUp - optional boolean → The administrative state of the port.
- Description string
- optional string → Human-readable description of the port.
- Device
Id string - optional string → The ID of the device the port belongs to.
- Device
Owner string - optional string → The device owner of the port.
- Dns
Name string - optional string → The port DNS name to filter.
- Fixed
Ip string - optional string → The port IP address filter.
- Id string
- optional string → The ID of the port.
- Mac
Address string - optional string → The MAC address of the port.
- Name string
- optional string → The name of the port.
- Network
Id string - optional string → The ID of the network the port belongs to.
- Port
Id string - optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the
id
attribute instead. - Project
Id 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.
- Security
Group []stringIds - optional set of string → The list of port security group IDs to filter.
- Status string
- optional string → The status of the port.
- []string
- optional set of string → The list of port tags to filter.
- Tenant
Id string - optional string → The tenant_id of the owner of the port.
- admin
State BooleanUp - optional boolean → The administrative state of the port.
- description String
- optional string → Human-readable description of the port.
- device
Id String - optional string → The ID of the device the port belongs to.
- device
Owner String - optional string → The device owner of the port.
- dns
Name String - optional string → The port DNS name to filter.
- fixed
Ip String - optional string → The port IP address filter.
- id String
- optional string → The ID of the port.
- mac
Address String - optional string → The MAC address of the port.
- name String
- optional string → The name of the port.
- network
Id String - optional string → The ID of the network the port belongs to.
- port
Id String - optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the
id
attribute instead. - project
Id 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.
- security
Group List<String>Ids - optional set of string → The list of port security group IDs to filter.
- status String
- optional string → The status of the port.
- List<String>
- optional set of string → The list of port tags to filter.
- tenant
Id String - optional string → The tenant_id of the owner of the port.
- admin
State booleanUp - optional boolean → The administrative state of the port.
- description string
- optional string → Human-readable description of the port.
- device
Id string - optional string → The ID of the device the port belongs to.
- device
Owner string - optional string → The device owner of the port.
- dns
Name string - optional string → The port DNS name to filter.
- fixed
Ip string - optional string → The port IP address filter.
- id string
- optional string → The ID of the port.
- mac
Address string - optional string → The MAC address of the port.
- name string
- optional string → The name of the port.
- network
Id string - optional string → The ID of the network the port belongs to.
- port
Id string - optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the
id
attribute instead. - project
Id 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.
- security
Group string[]Ids - optional set of string → The list of port security group IDs to filter.
- status string
- optional string → The status of the port.
- string[]
- optional set of string → The list of port tags to filter.
- tenant
Id string - optional string → The tenant_id of the owner of the port.
- admin_
state_ boolup - 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. - 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_ Sequence[str]ids - optional set of string → The list of port security group IDs to filter.
- status str
- optional string → The status of the port.
- 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.
- admin
State BooleanUp - optional boolean → The administrative state of the port.
- description String
- optional string → Human-readable description of the port.
- device
Id String - optional string → The ID of the device the port belongs to.
- device
Owner String - optional string → The device owner of the port.
- dns
Name String - optional string → The port DNS name to filter.
- fixed
Ip String - optional string → The port IP address filter.
- id String
- optional string → The ID of the port.
- mac
Address String - optional string → The MAC address of the port.
- name String
- optional string → The name of the port.
- network
Id String - optional string → The ID of the network the port belongs to.
- port
Id String - optional deprecated string → The ID of the port. Deprecated This argument is deprecated, please, use the
id
attribute instead. - project
Id 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.
- security
Group List<String>Ids - optional set of string → The list of port security group IDs to filter.
- status String
- optional string → The status of the port.
- List<String>
- optional set of string → The list of port tags to filter.
- tenant
Id String - optional string → The tenant_id of the owner of the port.
getNetworkingPort Result
The following output properties are available:
- Admin
State boolUp - All
Fixed List<string>Ips - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security List<string>Group Ids - set of string → The set of security group IDs applied on the port.
- List<string>
- set of string → The set of string tags applied on the port.
- Allowed
Address List<GetPairs Networking Port Allowed Address Pair> - set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Description string
- Device
Id string - Device
Owner string - Dns
Assignments List<ImmutableDictionary<string, string>> - map of string → The list of maps representing port DNS assignments.
- Dns
Name string - Extra
Dhcp List<GetOptions Networking Port Extra Dhcp Option> - list → An extra DHCP option configured on the port. The structure is described below.
- Id string
- Mac
Address string - string → The additional MAC address.
- Name string
- string → Name of the DHCP option.
- Network
Id string - Port
Id string - Project
Id string - Sdn string
- Status string
- Tenant
Id string - Fixed
Ip string - Region string
- Security
Group List<string>Ids - List<string>
- Admin
State boolUp - All
Fixed []stringIps - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- All
Security []stringGroup Ids - set of string → The set of security group IDs applied on the port.
- []string
- set of string → The set of string tags applied on the port.
- Allowed
Address []GetPairs Networking Port Allowed Address Pair - set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- Description string
- Device
Id string - Device
Owner string - Dns
Assignments []map[string]string - map of string → The list of maps representing port DNS assignments.
- Dns
Name string - Extra
Dhcp []GetOptions Networking Port Extra Dhcp Option - list → An extra DHCP option configured on the port. The structure is described below.
- Id string
- Mac
Address string - string → The additional MAC address.
- Name string
- string → Name of the DHCP option.
- Network
Id string - Port
Id string - Project
Id string - Sdn string
- Status string
- Tenant
Id string - Fixed
Ip string - Region string
- Security
Group []stringIds - []string
- admin
State BooleanUp - all
Fixed List<String>Ips - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - set of string → The set of security group IDs applied on the port.
- List<String>
- set of string → The set of string tags applied on the port.
- allowed
Address List<GetPairs Networking Port Allowed Address Pair> - set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- description String
- device
Id String - device
Owner String - dns
Assignments List<Map<String,String>> - map of string → The list of maps representing port DNS assignments.
- dns
Name String - extra
Dhcp List<GetOptions Networking Port Extra Dhcp Option> - list → An extra DHCP option configured on the port. The structure is described below.
- id String
- mac
Address String - string → The additional MAC address.
- name String
- string → Name of the DHCP option.
- network
Id String - port
Id String - project
Id String - sdn String
- status String
- tenant
Id String - fixed
Ip String - region String
- security
Group List<String>Ids - List<String>
- admin
State booleanUp - all
Fixed string[]Ips - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security string[]Group Ids - set of string → The set of security group IDs applied on the port.
- string[]
- set of string → The set of string tags applied on the port.
- allowed
Address GetPairs Networking Port Allowed Address Pair[] - set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- description string
- device
Id string - device
Owner string - dns
Assignments {[key: string]: string}[] - map of string → The list of maps representing port DNS assignments.
- dns
Name string - extra
Dhcp GetOptions Networking Port Extra Dhcp Option[] - list → An extra DHCP option configured on the port. The structure is described below.
- id string
- mac
Address string - string → The additional MAC address.
- name string
- string → Name of the DHCP option.
- network
Id string - port
Id string - project
Id string - sdn string
- status string
- tenant
Id string - fixed
Ip string - region string
- security
Group string[]Ids - string[]
- admin_
state_ boolup - all_
fixed_ Sequence[str]ips - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all_
security_ Sequence[str]group_ ids - set of string → The set of security group IDs applied on the port.
- Sequence[str]
- set of string → The set of string tags applied on the port.
- allowed_
address_ Sequence[Getpairs Networking Port Allowed Address Pair] - 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_ Sequence[Getoptions Networking Port Extra Dhcp Option] - 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 - project_
id str - sdn str
- status str
- tenant_
id str - fixed_
ip str - region str
- security_
group_ Sequence[str]ids - Sequence[str]
- admin
State BooleanUp - all
Fixed List<String>Ips - string → The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
- all
Security List<String>Group Ids - set of string → The set of security group IDs applied on the port.
- List<String>
- set of string → The set of string tags applied on the port.
- allowed
Address List<Property Map>Pairs - set → An IP/MAC Address pair of additional IP addresses that can be active on this port. The structure is described below.
- description String
- device
Id String - device
Owner String - dns
Assignments List<Map<String>> - map of string → The list of maps representing port DNS assignments.
- dns
Name String - extra
Dhcp List<Property Map>Options - list → An extra DHCP option configured on the port. The structure is described below.
- id String
- mac
Address String - string → The additional MAC address.
- name String
- string → Name of the DHCP option.
- network
Id String - port
Id String - project
Id String - sdn String
- status String
- tenant
Id String - fixed
Ip String - region String
- security
Group List<String>Ids - List<String>
Supporting Types
GetNetworkingPortAllowedAddressPair
- Ip
Address string - string → The additional IP address.
- Mac
Address string - optional string → The MAC address of the port.
- Ip
Address string - string → The additional IP address.
- Mac
Address string - optional string → The MAC address of the port.
- ip
Address String - string → The additional IP address.
- mac
Address String - optional string → The MAC address of the port.
- ip
Address string - string → The additional IP address.
- mac
Address string - optional string → The MAC address of the port.
- ip_
address str - string → The additional IP address.
- mac_
address str - optional string → The MAC address of the port.
- ip
Address String - string → The additional IP address.
- mac
Address String - optional string → The MAC address of the port.
GetNetworkingPortExtraDhcpOption
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.