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
LookupTrunkin the Go SDK.
public static class GetTrunk {
public static Task<GetTrunkResult> InvokeAsync(GetTrunkArgs args, InvokeOptions? opts = null)
}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
regionargument 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
regionargument 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
regionargument 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
regionargument of the provider is used.- status str
The status of the trunk.
- 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:
- 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
- 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
- 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[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
- 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.
- 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 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
Type 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
openstackTerraform Provider.