GetTrunk

Use this data source to get the ID of an available OpenStack trunk.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var trunk1 = Output.Create(OpenStack.Networking.GetTrunk.InvokeAsync(new OpenStack.Networking.GetTrunkArgs
        {
            Name = "trunk_1",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

trunk1 = openstack.networking.get_trunk(name="trunk_1")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const trunk1 = pulumi.output(openstack.networking.getTrunk({
    name: "trunk_1",
}, { async: true }));

Using GetTrunk

function getTrunk(args: GetTrunkArgs, opts?: InvokeOptions): Promise<GetTrunkResult>
function  get_trunk(admin_state_up=None, description=None, name=None, port_id=None, project_id=None, region=None, status=None, tags=None, trunk_id=None, opts=None)
func LookupTrunk(ctx *Context, args *LookupTrunkArgs, opts ...InvokeOption) (*LookupTrunkResult, error)

Note: This function is named LookupTrunk in the Go SDK.

public static class GetTrunk {
    public static Task<GetTrunkResult> InvokeAsync(GetTrunkArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AdminStateUp bool

The administrative state of the trunk.

Description string

Human-readable description of the trunk.

Name string

The name of the trunk.

PortId string

The ID of the trunk parent port.

ProjectId string

The owner of the trunk.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve trunk ids. If omitted, the region argument of the provider is used.

Status string

The status of the trunk.

Tags List<string>

The list of trunk tags to filter.

TrunkId string

The ID of the trunk.

AdminStateUp bool

The administrative state of the trunk.

Description string

Human-readable description of the trunk.

Name string

The name of the trunk.

PortId string

The ID of the trunk parent port.

ProjectId string

The owner of the trunk.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve trunk ids. If omitted, the region argument of the provider is used.

Status string

The status of the trunk.

Tags []string

The list of trunk tags to filter.

TrunkId string

The ID of the trunk.

adminStateUp boolean

The administrative state of the trunk.

description string

Human-readable description of the trunk.

name string

The name of the trunk.

portId string

The ID of the trunk parent port.

projectId string

The owner of the trunk.

region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve trunk ids. If omitted, the region argument of the provider is used.

status string

The status of the trunk.

tags string[]

The list of trunk tags to filter.

trunkId string

The ID of the trunk.

admin_state_up bool

The administrative state of the trunk.

description str

Human-readable description of the trunk.

name str

The name of the trunk.

port_id str

The ID of the trunk parent port.

project_id str

The owner of the trunk.

region str

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve trunk ids. If omitted, the region argument of the provider is used.

status str

The status of the trunk.

tags List[str]

The list of trunk tags to filter.

trunk_id str

The ID of the trunk.

GetTrunk Result

The following output properties are available:

AllTags List<string>

The set of string tags applied on the trunk.

Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
Region string
SubPorts List<Pulumi.OpenStack.Networking.Outputs.GetTrunkSubPort>

The set of the trunk subports. The structure of each subport is described below.

AdminStateUp bool
Description string
Name string
PortId string

The ID of the trunk subport.

Status string
Tags List<string>
TrunkId string
AllTags []string

The set of string tags applied on the trunk.

Id string

The provider-assigned unique ID for this managed resource.

ProjectId string
Region string
SubPorts []GetTrunkSubPort

The set of the trunk subports. The structure of each subport is described below.

AdminStateUp bool
Description string
Name string
PortId string

The ID of the trunk subport.

Status string
Tags []string
TrunkId string
allTags string[]

The set of string tags applied on the trunk.

id string

The provider-assigned unique ID for this managed resource.

projectId string
region string
subPorts GetTrunkSubPort[]

The set of the trunk subports. The structure of each subport is described below.

adminStateUp boolean
description string
name string
portId string

The ID of the trunk subport.

status string
tags string[]
trunkId string
all_tags List[str]

The set of string tags applied on the trunk.

id str

The provider-assigned unique ID for this managed resource.

project_id str
region str
sub_ports List[GetTrunkSubPort]

The set of the trunk subports. The structure of each subport is described below.

admin_state_up bool
description str
name str
port_id str

The ID of the trunk subport.

status str
tags List[str]
trunk_id str

Supporting Types

GetTrunkSubPort

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

PortId string

The ID of the trunk parent port.

SegmentationId int

The numeric id of the subport segment.

SegmentationType string

The segmenation tecnology used, e.g., “vlan”.

PortId string

The ID of the trunk parent port.

SegmentationId int

The numeric id of the subport segment.

SegmentationType string

The segmenation tecnology used, e.g., “vlan”.

portId string

The ID of the trunk parent port.

segmentationId number

The numeric id of the subport segment.

segmentationType string

The segmenation tecnology used, e.g., “vlan”.

port_id str

The ID of the trunk parent port.

segmentationType str

The segmenation tecnology used, e.g., “vlan”.

segmentation_id float

The numeric id of the subport segment.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.