1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. Trunk
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.networking.Trunk

Explore with Pulumi AI

Manages a networking V2 trunk resource within OpenStack.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    name: "network_1",
    adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    name: "subnet_1",
    networkId: network1.id,
    cidr: "192.168.1.0/24",
    ipVersion: 4,
    enableDhcp: true,
    noGateway: true,
});
const parentPort1 = new openstack.networking.Port("parent_port_1", {
    name: "parent_port_1",
    networkId: network1.id,
    adminStateUp: true,
}, {
    dependsOn: [subnet1],
});
const subport1 = new openstack.networking.Port("subport_1", {
    name: "subport_1",
    networkId: network1.id,
    adminStateUp: true,
}, {
    dependsOn: [subnet1],
});
const trunk1 = new openstack.networking.Trunk("trunk_1", {
    name: "trunk_1",
    adminStateUp: true,
    portId: parentPort1.id,
    subPorts: [{
        portId: subport1.id,
        segmentationId: 1,
        segmentationType: "vlan",
    }],
});
const instance1 = new openstack.compute.Instance("instance_1", {
    name: "instance_1",
    securityGroups: ["default"],
    networks: [{
        port: trunk1.portId,
    }],
});
Copy
import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network_1",
    name="network_1",
    admin_state_up=True)
subnet1 = openstack.networking.Subnet("subnet_1",
    name="subnet_1",
    network_id=network1.id,
    cidr="192.168.1.0/24",
    ip_version=4,
    enable_dhcp=True,
    no_gateway=True)
parent_port1 = openstack.networking.Port("parent_port_1",
    name="parent_port_1",
    network_id=network1.id,
    admin_state_up=True,
    opts = pulumi.ResourceOptions(depends_on=[subnet1]))
subport1 = openstack.networking.Port("subport_1",
    name="subport_1",
    network_id=network1.id,
    admin_state_up=True,
    opts = pulumi.ResourceOptions(depends_on=[subnet1]))
trunk1 = openstack.networking.Trunk("trunk_1",
    name="trunk_1",
    admin_state_up=True,
    port_id=parent_port1.id,
    sub_ports=[{
        "port_id": subport1.id,
        "segmentation_id": 1,
        "segmentation_type": "vlan",
    }])
instance1 = openstack.compute.Instance("instance_1",
    name="instance_1",
    security_groups=["default"],
    networks=[{
        "port": trunk1.port_id,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network1, err := networking.NewNetwork(ctx, "network_1", &networking.NetworkArgs{
			Name:         pulumi.String("network_1"),
			AdminStateUp: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		subnet1, err := networking.NewSubnet(ctx, "subnet_1", &networking.SubnetArgs{
			Name:       pulumi.String("subnet_1"),
			NetworkId:  network1.ID(),
			Cidr:       pulumi.String("192.168.1.0/24"),
			IpVersion:  pulumi.Int(4),
			EnableDhcp: pulumi.Bool(true),
			NoGateway:  pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		parentPort1, err := networking.NewPort(ctx, "parent_port_1", &networking.PortArgs{
			Name:         pulumi.String("parent_port_1"),
			NetworkId:    network1.ID(),
			AdminStateUp: pulumi.Bool(true),
		}, pulumi.DependsOn([]pulumi.Resource{
			subnet1,
		}))
		if err != nil {
			return err
		}
		subport1, err := networking.NewPort(ctx, "subport_1", &networking.PortArgs{
			Name:         pulumi.String("subport_1"),
			NetworkId:    network1.ID(),
			AdminStateUp: pulumi.Bool(true),
		}, pulumi.DependsOn([]pulumi.Resource{
			subnet1,
		}))
		if err != nil {
			return err
		}
		trunk1, err := networking.NewTrunk(ctx, "trunk_1", &networking.TrunkArgs{
			Name:         pulumi.String("trunk_1"),
			AdminStateUp: pulumi.Bool(true),
			PortId:       parentPort1.ID(),
			SubPorts: networking.TrunkSubPortArray{
				&networking.TrunkSubPortArgs{
					PortId:           subport1.ID(),
					SegmentationId:   pulumi.Int(1),
					SegmentationType: pulumi.String("vlan"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
			Name: pulumi.String("instance_1"),
			SecurityGroups: pulumi.StringArray{
				pulumi.String("default"),
			},
			Networks: compute.InstanceNetworkArray{
				&compute.InstanceNetworkArgs{
					Port: trunk1.PortId,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var network1 = new OpenStack.Networking.Network("network_1", new()
    {
        Name = "network_1",
        AdminStateUp = true,
    });

    var subnet1 = new OpenStack.Networking.Subnet("subnet_1", new()
    {
        Name = "subnet_1",
        NetworkId = network1.Id,
        Cidr = "192.168.1.0/24",
        IpVersion = 4,
        EnableDhcp = true,
        NoGateway = true,
    });

    var parentPort1 = new OpenStack.Networking.Port("parent_port_1", new()
    {
        Name = "parent_port_1",
        NetworkId = network1.Id,
        AdminStateUp = true,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            subnet1,
        },
    });

    var subport1 = new OpenStack.Networking.Port("subport_1", new()
    {
        Name = "subport_1",
        NetworkId = network1.Id,
        AdminStateUp = true,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            subnet1,
        },
    });

    var trunk1 = new OpenStack.Networking.Trunk("trunk_1", new()
    {
        Name = "trunk_1",
        AdminStateUp = true,
        PortId = parentPort1.Id,
        SubPorts = new[]
        {
            new OpenStack.Networking.Inputs.TrunkSubPortArgs
            {
                PortId = subport1.Id,
                SegmentationId = 1,
                SegmentationType = "vlan",
            },
        },
    });

    var instance1 = new OpenStack.Compute.Instance("instance_1", new()
    {
        Name = "instance_1",
        SecurityGroups = new[]
        {
            "default",
        },
        Networks = new[]
        {
            new OpenStack.Compute.Inputs.InstanceNetworkArgs
            {
                Port = trunk1.PortId,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.networking.Network;
import com.pulumi.openstack.networking.NetworkArgs;
import com.pulumi.openstack.networking.Subnet;
import com.pulumi.openstack.networking.SubnetArgs;
import com.pulumi.openstack.networking.Port;
import com.pulumi.openstack.networking.PortArgs;
import com.pulumi.openstack.networking.Trunk;
import com.pulumi.openstack.networking.TrunkArgs;
import com.pulumi.openstack.networking.inputs.TrunkSubPortArgs;
import com.pulumi.openstack.compute.Instance;
import com.pulumi.openstack.compute.InstanceArgs;
import com.pulumi.openstack.compute.inputs.InstanceNetworkArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
        var network1 = new Network("network1", NetworkArgs.builder()
            .name("network_1")
            .adminStateUp("true")
            .build());

        var subnet1 = new Subnet("subnet1", SubnetArgs.builder()
            .name("subnet_1")
            .networkId(network1.id())
            .cidr("192.168.1.0/24")
            .ipVersion(4)
            .enableDhcp(true)
            .noGateway(true)
            .build());

        var parentPort1 = new Port("parentPort1", PortArgs.builder()
            .name("parent_port_1")
            .networkId(network1.id())
            .adminStateUp("true")
            .build(), CustomResourceOptions.builder()
                .dependsOn(subnet1)
                .build());

        var subport1 = new Port("subport1", PortArgs.builder()
            .name("subport_1")
            .networkId(network1.id())
            .adminStateUp("true")
            .build(), CustomResourceOptions.builder()
                .dependsOn(subnet1)
                .build());

        var trunk1 = new Trunk("trunk1", TrunkArgs.builder()
            .name("trunk_1")
            .adminStateUp("true")
            .portId(parentPort1.id())
            .subPorts(TrunkSubPortArgs.builder()
                .portId(subport1.id())
                .segmentationId(1)
                .segmentationType("vlan")
                .build())
            .build());

        var instance1 = new Instance("instance1", InstanceArgs.builder()
            .name("instance_1")
            .securityGroups("default")
            .networks(InstanceNetworkArgs.builder()
                .port(trunk1.portId())
                .build())
            .build());

    }
}
Copy
resources:
  network1:
    type: openstack:networking:Network
    name: network_1
    properties:
      name: network_1
      adminStateUp: 'true'
  subnet1:
    type: openstack:networking:Subnet
    name: subnet_1
    properties:
      name: subnet_1
      networkId: ${network1.id}
      cidr: 192.168.1.0/24
      ipVersion: 4
      enableDhcp: true
      noGateway: true
  parentPort1:
    type: openstack:networking:Port
    name: parent_port_1
    properties:
      name: parent_port_1
      networkId: ${network1.id}
      adminStateUp: 'true'
    options:
      dependsOn:
        - ${subnet1}
  subport1:
    type: openstack:networking:Port
    name: subport_1
    properties:
      name: subport_1
      networkId: ${network1.id}
      adminStateUp: 'true'
    options:
      dependsOn:
        - ${subnet1}
  trunk1:
    type: openstack:networking:Trunk
    name: trunk_1
    properties:
      name: trunk_1
      adminStateUp: 'true'
      portId: ${parentPort1.id}
      subPorts:
        - portId: ${subport1.id}
          segmentationId: 1
          segmentationType: vlan
  instance1:
    type: openstack:compute:Instance
    name: instance_1
    properties:
      name: instance_1
      securityGroups:
        - default
      networks:
        - port: ${trunk1.portId}
Copy

Create Trunk Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Trunk(name: string, args: TrunkArgs, opts?: CustomResourceOptions);
@overload
def Trunk(resource_name: str,
          args: TrunkArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Trunk(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          port_id: Optional[str] = None,
          admin_state_up: Optional[bool] = None,
          description: Optional[str] = None,
          name: Optional[str] = None,
          region: Optional[str] = None,
          sub_ports: Optional[Sequence[TrunkSubPortArgs]] = None,
          tags: Optional[Sequence[str]] = None,
          tenant_id: Optional[str] = None)
func NewTrunk(ctx *Context, name string, args TrunkArgs, opts ...ResourceOption) (*Trunk, error)
public Trunk(string name, TrunkArgs args, CustomResourceOptions? opts = null)
public Trunk(String name, TrunkArgs args)
public Trunk(String name, TrunkArgs args, CustomResourceOptions options)
type: openstack:networking:Trunk
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TrunkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TrunkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TrunkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TrunkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TrunkArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var trunkResource = new OpenStack.Networking.Trunk("trunkResource", new()
{
    PortId = "string",
    AdminStateUp = false,
    Description = "string",
    Name = "string",
    Region = "string",
    SubPorts = new[]
    {
        new OpenStack.Networking.Inputs.TrunkSubPortArgs
        {
            PortId = "string",
            SegmentationId = 0,
            SegmentationType = "string",
        },
    },
    Tags = new[]
    {
        "string",
    },
    TenantId = "string",
});
Copy
example, err := networking.NewTrunk(ctx, "trunkResource", &networking.TrunkArgs{
	PortId:       pulumi.String("string"),
	AdminStateUp: pulumi.Bool(false),
	Description:  pulumi.String("string"),
	Name:         pulumi.String("string"),
	Region:       pulumi.String("string"),
	SubPorts: networking.TrunkSubPortArray{
		&networking.TrunkSubPortArgs{
			PortId:           pulumi.String("string"),
			SegmentationId:   pulumi.Int(0),
			SegmentationType: pulumi.String("string"),
		},
	},
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	TenantId: pulumi.String("string"),
})
Copy
var trunkResource = new Trunk("trunkResource", TrunkArgs.builder()
    .portId("string")
    .adminStateUp(false)
    .description("string")
    .name("string")
    .region("string")
    .subPorts(TrunkSubPortArgs.builder()
        .portId("string")
        .segmentationId(0)
        .segmentationType("string")
        .build())
    .tags("string")
    .tenantId("string")
    .build());
Copy
trunk_resource = openstack.networking.Trunk("trunkResource",
    port_id="string",
    admin_state_up=False,
    description="string",
    name="string",
    region="string",
    sub_ports=[{
        "port_id": "string",
        "segmentation_id": 0,
        "segmentation_type": "string",
    }],
    tags=["string"],
    tenant_id="string")
Copy
const trunkResource = new openstack.networking.Trunk("trunkResource", {
    portId: "string",
    adminStateUp: false,
    description: "string",
    name: "string",
    region: "string",
    subPorts: [{
        portId: "string",
        segmentationId: 0,
        segmentationType: "string",
    }],
    tags: ["string"],
    tenantId: "string",
});
Copy
type: openstack:networking:Trunk
properties:
    adminStateUp: false
    description: string
    name: string
    portId: string
    region: string
    subPorts:
        - portId: string
          segmentationId: 0
          segmentationType: string
    tags:
        - string
    tenantId: string
Copy

Trunk Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Trunk resource accepts the following input properties:

PortId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
AdminStateUp bool
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.
Description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
Name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
Region Changes to this property will trigger replacement. string
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.
SubPorts List<Pulumi.OpenStack.Networking.Inputs.TrunkSubPort>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
Tags List<string>
A set of string tags for the port.
TenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
PortId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
AdminStateUp bool
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.
Description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
Name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
Region Changes to this property will trigger replacement. string
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.
SubPorts []TrunkSubPortArgs
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
Tags []string
A set of string tags for the port.
TenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
portId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
adminStateUp Boolean
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.
description String
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name String
A unique name for the trunk. Changing this updates the name of an existing trunk.
region Changes to this property will trigger replacement. String
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.
subPorts List<TrunkSubPort>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags List<String>
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. String
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
portId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
adminStateUp boolean
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.
description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
region Changes to this property will trigger replacement. string
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.
subPorts TrunkSubPort[]
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags string[]
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
port_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
admin_state_up bool
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.
description str
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name str
A unique name for the trunk. Changing this updates the name of an existing trunk.
region Changes to this property will trigger replacement. str
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.
sub_ports Sequence[TrunkSubPortArgs]
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags Sequence[str]
A set of string tags for the port.
tenant_id Changes to this property will trigger replacement. str
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
portId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
adminStateUp Boolean
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.
description String
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name String
A unique name for the trunk. Changing this updates the name of an existing trunk.
region Changes to this property will trigger replacement. String
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.
subPorts List<Property Map>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags List<String>
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. String
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.

Outputs

All input properties are implicitly available as output properties. Additionally, the Trunk resource produces the following output properties:

AllTags List<string>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
Id string
The provider-assigned unique ID for this managed resource.
AllTags []string
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
Id string
The provider-assigned unique ID for this managed resource.
allTags List<String>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
id String
The provider-assigned unique ID for this managed resource.
allTags string[]
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
id string
The provider-assigned unique ID for this managed resource.
all_tags Sequence[str]
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
id str
The provider-assigned unique ID for this managed resource.
allTags List<String>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Trunk Resource

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

public static get(name: string, id: Input<ID>, state?: TrunkState, opts?: CustomResourceOptions): Trunk
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        admin_state_up: Optional[bool] = None,
        all_tags: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        port_id: Optional[str] = None,
        region: Optional[str] = None,
        sub_ports: Optional[Sequence[TrunkSubPortArgs]] = None,
        tags: Optional[Sequence[str]] = None,
        tenant_id: Optional[str] = None) -> Trunk
func GetTrunk(ctx *Context, name string, id IDInput, state *TrunkState, opts ...ResourceOption) (*Trunk, error)
public static Trunk Get(string name, Input<string> id, TrunkState? state, CustomResourceOptions? opts = null)
public static Trunk get(String name, Output<String> id, TrunkState state, CustomResourceOptions options)
resources:  _:    type: openstack:networking:Trunk    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AdminStateUp bool
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.
AllTags List<string>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
Description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
Name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
PortId Changes to this property will trigger replacement. string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
Region Changes to this property will trigger replacement. string
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.
SubPorts List<Pulumi.OpenStack.Networking.Inputs.TrunkSubPort>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
Tags List<string>
A set of string tags for the port.
TenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
AdminStateUp bool
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.
AllTags []string
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
Description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
Name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
PortId Changes to this property will trigger replacement. string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
Region Changes to this property will trigger replacement. string
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.
SubPorts []TrunkSubPortArgs
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
Tags []string
A set of string tags for the port.
TenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
adminStateUp Boolean
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.
allTags List<String>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
description String
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name String
A unique name for the trunk. Changing this updates the name of an existing trunk.
portId Changes to this property will trigger replacement. String
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
region Changes to this property will trigger replacement. String
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.
subPorts List<TrunkSubPort>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags List<String>
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. String
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
adminStateUp boolean
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.
allTags string[]
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
description string
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name string
A unique name for the trunk. Changing this updates the name of an existing trunk.
portId Changes to this property will trigger replacement. string
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
region Changes to this property will trigger replacement. string
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.
subPorts TrunkSubPort[]
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags string[]
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. string
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
admin_state_up bool
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.
all_tags Sequence[str]
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
description str
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name str
A unique name for the trunk. Changing this updates the name of an existing trunk.
port_id Changes to this property will trigger replacement. str
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
region Changes to this property will trigger replacement. str
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.
sub_ports Sequence[TrunkSubPortArgs]
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags Sequence[str]
A set of string tags for the port.
tenant_id Changes to this property will trigger replacement. str
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.
adminStateUp Boolean
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.
allTags List<String>
The collection of tags assigned on the trunk, which have been explicitly and implicitly added.
description String
Human-readable description of the trunk. Changing this updates the name of the existing trunk.
name String
A unique name for the trunk. Changing this updates the name of an existing trunk.
portId Changes to this property will trigger replacement. String
The ID of the port to be used as the parent port of the trunk. This is the port that should be used as the compute instance network port. Changing this creates a new trunk.
region Changes to this property will trigger replacement. String
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.
subPorts List<Property Map>
The set of ports that will be made subports of the trunk. The structure of each subport is described below.
tags List<String>
A set of string tags for the port.
tenantId Changes to this property will trigger replacement. String
The owner of the Trunk. Required if admin wants to create a trunk on behalf of another tenant. Changing this creates a new trunk.

Supporting Types

TrunkSubPort
, TrunkSubPortArgs

PortId This property is required. string
The ID of the port to be made a subport of the trunk.
SegmentationId This property is required. int
The numeric id of the subport segment.
SegmentationType This property is required. string
The segmentation technology to use, e.g., "vlan".
PortId This property is required. string
The ID of the port to be made a subport of the trunk.
SegmentationId This property is required. int
The numeric id of the subport segment.
SegmentationType This property is required. string
The segmentation technology to use, e.g., "vlan".
portId This property is required. String
The ID of the port to be made a subport of the trunk.
segmentationId This property is required. Integer
The numeric id of the subport segment.
segmentationType This property is required. String
The segmentation technology to use, e.g., "vlan".
portId This property is required. string
The ID of the port to be made a subport of the trunk.
segmentationId This property is required. number
The numeric id of the subport segment.
segmentationType This property is required. string
The segmentation technology to use, e.g., "vlan".
port_id This property is required. str
The ID of the port to be made a subport of the trunk.
segmentation_id This property is required. int
The numeric id of the subport segment.
segmentation_type This property is required. str
The segmentation technology to use, e.g., "vlan".
portId This property is required. String
The ID of the port to be made a subport of the trunk.
segmentationId This property is required. Number
The numeric id of the subport segment.
segmentationType This property is required. String
The segmentation technology to use, 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.