UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

217 lines (216 loc) 7.13 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage transit router vpc attachment * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", { * transitRouterName: "test-tf-acc", * description: "test-tf-acc", * asn: 4294967293, * }); * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc-acc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * vpcId: fooVpc.id, * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * subnetName: "acc-test-subnet", * }); * const foo2 = new volcengine.vpc.Subnet("foo2", { * vpcId: fooVpc.id, * cidrBlock: "172.16.255.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id), * subnetName: "acc-test-subnet2", * }); * const fooVpcAttachment = new volcengine.transit_router.VpcAttachment("fooVpcAttachment", { * transitRouterId: fooTransitRouter.id, * vpcId: fooVpc.id, * attachPoints: [ * { * subnetId: fooSubnet.id, * zoneId: "cn-beijing-a", * }, * { * subnetId: foo2.id, * zoneId: "cn-beijing-b", * }, * ], * transitRouterAttachmentName: "tf-test-acc-vpc-attach", * description: "tf-test-acc-description", * autoPublishRouteEnabled: true, * tags: [{ * key: "k1", * value: "v1", * }], * }); * ``` * * ## Import * * TransitRouterVpcAttachment can be imported using the transitRouterId:attachmentId, e.g. * * ```sh * $ pulumi import volcengine:transit_router/vpcAttachment:VpcAttachment default tr-2d6fr7mzya2gw58ozfes5g2oh:tr-attach-7qthudw0ll6jmc**** * ``` */ export declare class VpcAttachment extends pulumi.CustomResource { /** * Get an existing VpcAttachment 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?: VpcAttachmentState, opts?: pulumi.CustomResourceOptions): VpcAttachment; /** * Returns true if the given object is an instance of VpcAttachment. 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 VpcAttachment; /** * The attach points of transit router vpc attachment. */ readonly attachPoints: pulumi.Output<outputs.transit_router.VpcAttachmentAttachPoint[]>; /** * Whether to auto publish route of the transit router to vpc instance. Default is false. */ readonly autoPublishRouteEnabled: pulumi.Output<boolean | undefined>; /** * The create time. */ readonly creationTime: pulumi.Output<string>; /** * The description of the transit router vpc attachment. */ readonly description: pulumi.Output<string | undefined>; /** * The status of the transit router. */ readonly status: pulumi.Output<string>; /** * Tags. */ readonly tags: pulumi.Output<outputs.transit_router.VpcAttachmentTag[] | undefined>; /** * The id of the transit router attachment. */ readonly transitRouterAttachmentId: pulumi.Output<string>; /** * The name of the transit router vpc attachment. */ readonly transitRouterAttachmentName: pulumi.Output<string>; /** * The id of the transit router. */ readonly transitRouterId: pulumi.Output<string>; /** * The update time. */ readonly updateTime: pulumi.Output<string>; /** * The ID of vpc. */ readonly vpcId: pulumi.Output<string>; /** * Create a VpcAttachment 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: VpcAttachmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VpcAttachment resources. */ export interface VpcAttachmentState { /** * The attach points of transit router vpc attachment. */ attachPoints?: pulumi.Input<pulumi.Input<inputs.transit_router.VpcAttachmentAttachPoint>[]>; /** * Whether to auto publish route of the transit router to vpc instance. Default is false. */ autoPublishRouteEnabled?: pulumi.Input<boolean>; /** * The create time. */ creationTime?: pulumi.Input<string>; /** * The description of the transit router vpc attachment. */ description?: pulumi.Input<string>; /** * The status of the transit router. */ status?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.transit_router.VpcAttachmentTag>[]>; /** * The id of the transit router attachment. */ transitRouterAttachmentId?: pulumi.Input<string>; /** * The name of the transit router vpc attachment. */ transitRouterAttachmentName?: pulumi.Input<string>; /** * The id of the transit router. */ transitRouterId?: pulumi.Input<string>; /** * The update time. */ updateTime?: pulumi.Input<string>; /** * The ID of vpc. */ vpcId?: pulumi.Input<string>; } /** * The set of arguments for constructing a VpcAttachment resource. */ export interface VpcAttachmentArgs { /** * The attach points of transit router vpc attachment. */ attachPoints: pulumi.Input<pulumi.Input<inputs.transit_router.VpcAttachmentAttachPoint>[]>; /** * Whether to auto publish route of the transit router to vpc instance. Default is false. */ autoPublishRouteEnabled?: pulumi.Input<boolean>; /** * The description of the transit router vpc attachment. */ description?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.transit_router.VpcAttachmentTag>[]>; /** * The name of the transit router vpc attachment. */ transitRouterAttachmentName?: pulumi.Input<string>; /** * The id of the transit router. */ transitRouterId: pulumi.Input<string>; /** * The ID of vpc. */ vpcId: pulumi.Input<string>; }