UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

202 lines (201 loc) 7.42 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage cen service route entry * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc: volcengine.vpc.Vpc[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooVpc.push(new volcengine.vpc.Vpc(`fooVpc-${range.value}`, { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * })); * } * const fooCen = new volcengine.cen.Cen("fooCen", { * cenName: "acc-test-cen", * description: "acc-test", * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * const fooAttachInstance: volcengine.cen.AttachInstance[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooAttachInstance.push(new volcengine.cen.AttachInstance(`fooAttachInstance-${range.value}`, { * cenId: fooCen.id, * instanceId: fooVpc[range.value].id, * instanceRegionId: "cn-beijing", * instanceType: "VPC", * })); * } * const fooServiceRouteEntry = new volcengine.cen.ServiceRouteEntry("fooServiceRouteEntry", { * cenId: fooCen.id, * destinationCidrBlock: "100.64.0.0/11", * serviceRegionId: "cn-beijing", * serviceVpcId: fooAttachInstance[0].instanceId, * description: "acc-test", * publishMode: "Custom", * publishToInstances: [ * { * instanceRegionId: "cn-beijing", * instanceType: "VPC", * instanceId: fooAttachInstance[1].instanceId, * }, * { * instanceRegionId: "cn-beijing", * instanceType: "VPC", * instanceId: fooAttachInstance[2].instanceId, * }, * ], * }); * ``` * * ## Import * * CenServiceRouteEntry can be imported using the CenId#DestinationCidrBlock#ServiceRegionId#ServiceVpcId, e.g. * * ```sh * $ pulumi import volcengine:cen/serviceRouteEntry:ServiceRouteEntry default cen-2nim00ybaylts7trquyzt****#100.XX.XX.0/24#cn-beijing#vpc-3rlkeggyn6tc010exd32q**** * ``` */ export declare class ServiceRouteEntry extends pulumi.CustomResource { /** * Get an existing ServiceRouteEntry 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?: ServiceRouteEntryState, opts?: pulumi.CustomResourceOptions): ServiceRouteEntry; /** * Returns true if the given object is an instance of ServiceRouteEntry. 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 ServiceRouteEntry; /** * The cen ID of the cen service route entry. */ readonly cenId: pulumi.Output<string>; /** * The create time of the cen service route entry. */ readonly creationTime: pulumi.Output<string>; /** * The description of the cen service route entry. */ readonly description: pulumi.Output<string>; /** * The destination cidr block of the cen service route entry. */ readonly destinationCidrBlock: pulumi.Output<string>; /** * Publishing scope of cloud service access routes. Valid values are `LocalDCGW`(default), `Custom`. */ readonly publishMode: pulumi.Output<string | undefined>; /** * The publish instances. A maximum of 100 can be uploaded in one request. This field needs to be filled in when the `publishMode` is `Custom`. */ readonly publishToInstances: pulumi.Output<outputs.cen.ServiceRouteEntryPublishToInstance[] | undefined>; /** * The service region id of the cen service route entry. */ readonly serviceRegionId: pulumi.Output<string>; /** * The service VPC id of the cen service route entry. */ readonly serviceVpcId: pulumi.Output<string>; /** * The status of the cen service route entry. */ readonly status: pulumi.Output<string>; /** * Create a ServiceRouteEntry 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: ServiceRouteEntryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceRouteEntry resources. */ export interface ServiceRouteEntryState { /** * The cen ID of the cen service route entry. */ cenId?: pulumi.Input<string>; /** * The create time of the cen service route entry. */ creationTime?: pulumi.Input<string>; /** * The description of the cen service route entry. */ description?: pulumi.Input<string>; /** * The destination cidr block of the cen service route entry. */ destinationCidrBlock?: pulumi.Input<string>; /** * Publishing scope of cloud service access routes. Valid values are `LocalDCGW`(default), `Custom`. */ publishMode?: pulumi.Input<string>; /** * The publish instances. A maximum of 100 can be uploaded in one request. This field needs to be filled in when the `publishMode` is `Custom`. */ publishToInstances?: pulumi.Input<pulumi.Input<inputs.cen.ServiceRouteEntryPublishToInstance>[]>; /** * The service region id of the cen service route entry. */ serviceRegionId?: pulumi.Input<string>; /** * The service VPC id of the cen service route entry. */ serviceVpcId?: pulumi.Input<string>; /** * The status of the cen service route entry. */ status?: pulumi.Input<string>; } /** * The set of arguments for constructing a ServiceRouteEntry resource. */ export interface ServiceRouteEntryArgs { /** * The cen ID of the cen service route entry. */ cenId: pulumi.Input<string>; /** * The description of the cen service route entry. */ description?: pulumi.Input<string>; /** * The destination cidr block of the cen service route entry. */ destinationCidrBlock: pulumi.Input<string>; /** * Publishing scope of cloud service access routes. Valid values are `LocalDCGW`(default), `Custom`. */ publishMode?: pulumi.Input<string>; /** * The publish instances. A maximum of 100 can be uploaded in one request. This field needs to be filled in when the `publishMode` is `Custom`. */ publishToInstances?: pulumi.Input<pulumi.Input<inputs.cen.ServiceRouteEntryPublishToInstance>[]>; /** * The service region id of the cen service route entry. */ serviceRegionId: pulumi.Input<string>; /** * The service VPC id of the cen service route entry. */ serviceVpcId: pulumi.Input<string>; }