UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

232 lines (231 loc) • 8.24 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a networking V2 trunk resource within OpenStack. * * ## Example Usage * * ```typescript * 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, * }], * }); * ``` */ export declare class Trunk extends pulumi.CustomResource { /** * Get an existing Trunk resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TrunkState, opts?: pulumi.CustomResourceOptions): Trunk; /** * Returns true if the given object is an instance of Trunk. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Trunk; /** * Administrative up/down status for the trunk * (must be "true" or "false" if provided). Changing this updates the * `adminStateUp` of an existing trunk. */ readonly adminStateUp: pulumi.Output<boolean | undefined>; /** * The collection of tags assigned on the trunk, which have been * explicitly and implicitly added. */ readonly allTags: pulumi.Output<string[]>; /** * Human-readable description of the trunk. Changing this * updates the name of the existing trunk. */ readonly description: pulumi.Output<string | undefined>; /** * A unique name for the trunk. Changing this * updates the `name` of an existing trunk. */ readonly name: pulumi.Output<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. */ readonly portId: pulumi.Output<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. */ readonly region: pulumi.Output<string>; /** * The set of ports that will be made subports of the trunk. * The structure of each subport is described below. */ readonly subPorts: pulumi.Output<outputs.networking.TrunkSubPort[] | undefined>; /** * A set of string tags for the port. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The owner of the Trunk. Required if admin wants * to create a trunk on behalf of another tenant. Changing this creates a new trunk. */ readonly tenantId: pulumi.Output<string>; /** * Create a Trunk resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TrunkArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Trunk resources. */ export interface TrunkState { /** * Administrative up/down status for the trunk * (must be "true" or "false" if provided). Changing this updates the * `adminStateUp` of an existing trunk. */ adminStateUp?: pulumi.Input<boolean>; /** * The collection of tags assigned on the trunk, which have been * explicitly and implicitly added. */ allTags?: pulumi.Input<pulumi.Input<string>[]>; /** * Human-readable description of the trunk. Changing this * updates the name of the existing trunk. */ description?: pulumi.Input<string>; /** * A unique name for the trunk. Changing this * updates the `name` of an existing trunk. */ name?: pulumi.Input<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. */ portId?: pulumi.Input<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. */ region?: pulumi.Input<string>; /** * The set of ports that will be made subports of the trunk. * The structure of each subport is described below. */ subPorts?: pulumi.Input<pulumi.Input<inputs.networking.TrunkSubPort>[]>; /** * A set of string tags for the port. */ tags?: pulumi.Input<pulumi.Input<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. */ tenantId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Trunk resource. */ export interface TrunkArgs { /** * Administrative up/down status for the trunk * (must be "true" or "false" if provided). Changing this updates the * `adminStateUp` of an existing trunk. */ adminStateUp?: pulumi.Input<boolean>; /** * Human-readable description of the trunk. Changing this * updates the name of the existing trunk. */ description?: pulumi.Input<string>; /** * A unique name for the trunk. Changing this * updates the `name` of an existing trunk. */ name?: pulumi.Input<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. */ portId: pulumi.Input<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. */ region?: pulumi.Input<string>; /** * The set of ports that will be made subports of the trunk. * The structure of each subport is described below. */ subPorts?: pulumi.Input<pulumi.Input<inputs.networking.TrunkSubPort>[]>; /** * A set of string tags for the port. */ tags?: pulumi.Input<pulumi.Input<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. */ tenantId?: pulumi.Input<string>; }