openstack.networking.getTrunk
Use this data source to get the ID of an available OpenStack trunk.
Example Usage
using System.Collections.Generic;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var trunk1 = OpenStack.Networking.GetTrunk.Invoke(new()
{
Name = "trunk_1",
});
});
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networking.LookupTrunk(ctx, &networking.LookupTrunkArgs{
Name: pulumi.StringRef("trunk_1"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.networking.NetworkingFunctions;
import com.pulumi.openstack.networking.inputs.GetTrunkArgs;
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 trunk1 = NetworkingFunctions.getTrunk(GetTrunkArgs.builder()
.name("trunk_1")
.build());
}
}
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 = openstack.networking.getTrunk({
name: "trunk_1",
});
variables:
trunk1:
fn::invoke:
Function: openstack:networking:getTrunk
Arguments:
name: trunk_1
Using getTrunk
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 getTrunk(args: GetTrunkArgs, opts?: InvokeOptions): Promise<GetTrunkResult>
function getTrunkOutput(args: GetTrunkOutputArgs, opts?: InvokeOptions): Output<GetTrunkResult>
def get_trunk(admin_state_up: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None,
port_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
trunk_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTrunkResult
def get_trunk_output(admin_state_up: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
name: 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,
status: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
trunk_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTrunkResult]
func LookupTrunk(ctx *Context, args *LookupTrunkArgs, opts ...InvokeOption) (*LookupTrunkResult, error)
func LookupTrunkOutput(ctx *Context, args *LookupTrunkOutputArgs, opts ...InvokeOption) LookupTrunkResultOutput
> Note: This function is named LookupTrunk
in the Go SDK.
public static class GetTrunk
{
public static Task<GetTrunkResult> InvokeAsync(GetTrunkArgs args, InvokeOptions? opts = null)
public static Output<GetTrunkResult> Invoke(GetTrunkInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTrunkResult> getTrunk(GetTrunkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:networking/getTrunk:getTrunk
arguments:
# arguments dictionary
The following arguments are supported:
- Admin
State boolUp The administrative state of the trunk.
- Description string
Human-readable description of the trunk.
- Name string
The name of the trunk.
- Port
Id string The ID of the trunk parent port.
- Project
Id 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.
- List<string>
The list of trunk tags to filter.
- Trunk
Id string The ID of the trunk.
- Admin
State boolUp The administrative state of the trunk.
- Description string
Human-readable description of the trunk.
- Name string
The name of the trunk.
- Port
Id string The ID of the trunk parent port.
- Project
Id 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.
- []string
The list of trunk tags to filter.
- Trunk
Id string The ID of the trunk.
- admin
State BooleanUp The administrative state of the trunk.
- description String
Human-readable description of the trunk.
- name String
The name of the trunk.
- port
Id String The ID of the trunk parent port.
- project
Id 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.
- List<String>
The list of trunk tags to filter.
- trunk
Id String The ID of the trunk.
- admin
State booleanUp The administrative state of the trunk.
- description string
Human-readable description of the trunk.
- name string
The name of the trunk.
- port
Id string The ID of the trunk parent port.
- project
Id 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.
- string[]
The list of trunk tags to filter.
- trunk
Id string The ID of the trunk.
- admin_
state_ boolup 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.
- Sequence[str]
The list of trunk tags to filter.
- trunk_
id str The ID of the trunk.
- admin
State BooleanUp The administrative state of the trunk.
- description String
Human-readable description of the trunk.
- name String
The name of the trunk.
- port
Id String The ID of the trunk parent port.
- project
Id 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.
- List<String>
The list of trunk tags to filter.
- trunk
Id String The ID of the trunk.
getTrunk Result
The following output properties are available:
- List<string>
The set of string tags applied on the trunk.
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Region string
- Sub
Ports List<Pulumi.Open Stack. Networking. Outputs. Get Trunk Sub Port> The set of the trunk subports. The structure of each subport is described below.
- Admin
State boolUp - Description string
- Name string
- Port
Id string The ID of the trunk subport.
- Status string
- List<string>
- Trunk
Id string
- []string
The set of string tags applied on the trunk.
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Region string
- Sub
Ports []GetTrunk Sub Port The set of the trunk subports. The structure of each subport is described below.
- Admin
State boolUp - Description string
- Name string
- Port
Id string The ID of the trunk subport.
- Status string
- []string
- Trunk
Id string
- List<String>
The set of string tags applied on the trunk.
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String - region String
- sub
Ports List<GetTrunk Sub Port> The set of the trunk subports. The structure of each subport is described below.
- admin
State BooleanUp - description String
- name String
- port
Id String The ID of the trunk subport.
- status String
- List<String>
- trunk
Id String
- string[]
The set of string tags applied on the trunk.
- id string
The provider-assigned unique ID for this managed resource.
- project
Id string - region string
- sub
Ports GetTrunk Sub Port[] The set of the trunk subports. The structure of each subport is described below.
- admin
State booleanUp - description string
- name string
- port
Id string The ID of the trunk subport.
- status string
- string[]
- trunk
Id string
- Sequence[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 Sequence[GetTrunk Sub Port] The set of the trunk subports. The structure of each subport is described below.
- admin_
state_ boolup - description str
- name str
- port_
id str The ID of the trunk subport.
- status str
- Sequence[str]
- trunk_
id str
- List<String>
The set of string tags applied on the trunk.
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String - region String
- sub
Ports List<Property Map> The set of the trunk subports. The structure of each subport is described below.
- admin
State BooleanUp - description String
- name String
- port
Id String The ID of the trunk subport.
- status String
- List<String>
- trunk
Id String
Supporting Types
GetTrunkSubPort
- Port
Id string The ID of the trunk parent port.
- Segmentation
Id int The numeric id of the subport segment.
- Segmentation
Type string The segmenation tecnology used, e.g., "vlan".
- Port
Id string The ID of the trunk parent port.
- Segmentation
Id int The numeric id of the subport segment.
- Segmentation
Type string The segmenation tecnology used, e.g., "vlan".
- port
Id String The ID of the trunk parent port.
- segmentation
Id Integer The numeric id of the subport segment.
- segmentation
Type String The segmenation tecnology used, e.g., "vlan".
- port
Id string The ID of the trunk parent port.
- segmentation
Id number The numeric id of the subport segment.
- segmentation
Type string The segmenation tecnology used, e.g., "vlan".
- port_
id str The ID of the trunk parent port.
- segmentation_
id int The numeric id of the subport segment.
- segmentation_
type str The segmenation tecnology used, e.g., "vlan".
- port
Id String The ID of the trunk parent port.
- segmentation
Id Number The numeric id of the subport segment.
- segmentation
Type String The segmenation tecnology used, e.g., "vlan".
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
openstack
Terraform Provider.