Show / Hide Table of Contents

Class Trunk

Manages a networking V2 trunk resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
    {
        AdminStateUp = "true",
    });
    var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
    {
        Cidr = "192.168.1.0/24",
        EnableDhcp = true,
        IpVersion = 4,
        NetworkId = network1.Id,
        NoGateway = true,
    });
    var parentPort1 = new OpenStack.Networking.Port("parentPort1", new OpenStack.Networking.PortArgs
    {
        AdminStateUp = "true",
        NetworkId = network1.Id,
    });
    var subport1 = new OpenStack.Networking.Port("subport1", new OpenStack.Networking.PortArgs
    {
        AdminStateUp = "true",
        NetworkId = network1.Id,
    });
    var trunk1 = new OpenStack.Networking.Trunk("trunk1", new OpenStack.Networking.TrunkArgs
    {
        AdminStateUp = "true",
        PortId = parentPort1.Id,
        SubPorts = 
        {
            new OpenStack.Networking.Inputs.TrunkSubPortArgs
            {
                PortId = subport1.Id,
                SegmentationId = 1,
                SegmentationType = "vlan",
            },
        },
    });
    var instance1 = new OpenStack.Compute.Instance("instance1", new OpenStack.Compute.InstanceArgs
    {
        Networks = 
        {
            new OpenStack.Compute.Inputs.InstanceNetworkArgs
            {
                Port = trunk1.PortId,
            },
        },
        SecurityGroups = 
        {
            "default",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Trunk
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.Networking
Assembly: Pulumi.OpenStack.dll
Syntax
public class Trunk : CustomResource

Constructors

View Source

Trunk(String, TrunkArgs, CustomResourceOptions)

Create a Trunk resource with the given unique name, arguments, and options.

Declaration
public Trunk(string name, TrunkArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

TrunkArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AdminStateUp

Administrative up/down status for the trunk (must be "true" or "false" if provided). Changing this updates the admin_state_up of an existing trunk.

Declaration
public Output<bool?> AdminStateUp { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

AllTags

The collection of tags assigned on the trunk, which have been explicitly and implicitly added.

Declaration
public Output<ImmutableArray<string>> AllTags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Description

Human-readable description of the trunk. Changing this updates the name of the existing trunk.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

A unique name for the trunk. Changing this updates the name of an existing trunk.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PortId

The ID of the port to be made a subport of the trunk.

Declaration
public Output<string> PortId { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to obtain the V2 networking client. A networking client is needed to create a trunk. If omitted, the region argument of the provider is used. Changing this creates a new trunk.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

SubPorts

The set of ports that will be made subports of the trunk. The structure of each subport is described below.

Declaration
public Output<ImmutableArray<TrunkSubPort>> SubPorts { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<TrunkSubPort>>
View Source

Tags

A set of string tags for the port.

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

TenantId

The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.

Declaration
public Output<string> TenantId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, TrunkState, CustomResourceOptions)

Get an existing Trunk resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Trunk Get(string name, Input<string> id, TrunkState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

TrunkState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Trunk
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.