UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

247 lines (246 loc) 7.66 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of vpn gateway routes * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: "cn-beijig-a", * vpcId: fooVpc.id, * }); * const fooGateway = new volcengine.vpn.Gateway("fooGateway", { * vpcId: fooVpc.id, * subnetId: fooSubnet.id, * bandwidth: 20, * vpnGatewayName: "acc-test", * description: "acc-test", * period: 2, * projectName: "default", * }); * const fooCustomerGateway = new volcengine.vpn.CustomerGateway("fooCustomerGateway", { * ipAddress: "192.0.1.3", * customerGatewayName: "acc-test", * description: "acc-test", * projectName: "default", * }); * const fooConnection = new volcengine.vpn.Connection("fooConnection", { * vpnConnectionName: "acc-tf-test", * description: "acc-tf-test", * vpnGatewayId: fooGateway.id, * customerGatewayId: fooCustomerGateway.id, * localSubnets: ["192.168.0.0/22"], * remoteSubnets: ["192.161.0.0/20"], * dpdAction: "none", * natTraversal: true, * ikeConfigPsk: "acctest@!3", * ikeConfigVersion: "ikev1", * ikeConfigMode: "main", * ikeConfigEncAlg: "aes", * ikeConfigAuthAlg: "md5", * ikeConfigDhGroup: "group2", * ikeConfigLifetime: 9000, * ikeConfigLocalId: "acc_test", * ikeConfigRemoteId: "acc_test", * ipsecConfigEncAlg: "aes", * ipsecConfigAuthAlg: "sha256", * ipsecConfigDhGroup: "group2", * ipsecConfigLifetime: 9000, * projectName: "default", * logEnabled: false, * }); * const fooGatewayRoute = new volcengine.vpn.GatewayRoute("fooGatewayRoute", { * vpnGatewayId: fooGateway.id, * destinationCidrBlock: "192.168.0.0/20", * nextHopId: fooConnection.id, * }); * const fooGatewayRoutes = volcengine.vpn.getGatewayRoutesOutput({ * ids: [fooGatewayRoute.id], * }); * ``` */ /** @deprecated volcengine.vpn.GatewayRoutes has been deprecated in favor of volcengine.vpn.getGatewayRoutes */ export declare function gatewayRoutes(args?: GatewayRoutesArgs, opts?: pulumi.InvokeOptions): Promise<GatewayRoutesResult>; /** * A collection of arguments for invoking GatewayRoutes. */ export interface GatewayRoutesArgs { /** * A destination cidr block. */ destinationCidrBlock?: string; /** * A list of VPN gateway route ids. */ ids?: string[]; /** * An ID of next hop. */ nextHopId?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The type of the VPN gateway route. Valid values: `Static`, `BGP`, `Cloud`. */ routeType?: string; /** * The status of the VPN gateway route. */ status?: string; /** * An ID of VPN gateway. */ vpnGatewayId?: string; } /** * A collection of values returned by GatewayRoutes. */ export interface GatewayRoutesResult { /** * The destination cidr block of the VPN gateway route. */ readonly destinationCidrBlock?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; /** * The next hop id of the VPN gateway route. */ readonly nextHopId?: string; readonly outputFile?: string; readonly routeType?: string; /** * The status of the VPN gateway route. */ readonly status?: string; /** * The total count of VPN gateway route query. */ readonly totalCount: number; /** * The ID of the VPN gateway of the VPN gateway route. */ readonly vpnGatewayId?: string; /** * The collection of VPN gateway route query. */ readonly vpnGatewayRoutes: outputs.vpn.GatewayRoutesVpnGatewayRoute[]; } /** * Use this data source to query detailed information of vpn gateway routes * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: "cn-beijig-a", * vpcId: fooVpc.id, * }); * const fooGateway = new volcengine.vpn.Gateway("fooGateway", { * vpcId: fooVpc.id, * subnetId: fooSubnet.id, * bandwidth: 20, * vpnGatewayName: "acc-test", * description: "acc-test", * period: 2, * projectName: "default", * }); * const fooCustomerGateway = new volcengine.vpn.CustomerGateway("fooCustomerGateway", { * ipAddress: "192.0.1.3", * customerGatewayName: "acc-test", * description: "acc-test", * projectName: "default", * }); * const fooConnection = new volcengine.vpn.Connection("fooConnection", { * vpnConnectionName: "acc-tf-test", * description: "acc-tf-test", * vpnGatewayId: fooGateway.id, * customerGatewayId: fooCustomerGateway.id, * localSubnets: ["192.168.0.0/22"], * remoteSubnets: ["192.161.0.0/20"], * dpdAction: "none", * natTraversal: true, * ikeConfigPsk: "acctest@!3", * ikeConfigVersion: "ikev1", * ikeConfigMode: "main", * ikeConfigEncAlg: "aes", * ikeConfigAuthAlg: "md5", * ikeConfigDhGroup: "group2", * ikeConfigLifetime: 9000, * ikeConfigLocalId: "acc_test", * ikeConfigRemoteId: "acc_test", * ipsecConfigEncAlg: "aes", * ipsecConfigAuthAlg: "sha256", * ipsecConfigDhGroup: "group2", * ipsecConfigLifetime: 9000, * projectName: "default", * logEnabled: false, * }); * const fooGatewayRoute = new volcengine.vpn.GatewayRoute("fooGatewayRoute", { * vpnGatewayId: fooGateway.id, * destinationCidrBlock: "192.168.0.0/20", * nextHopId: fooConnection.id, * }); * const fooGatewayRoutes = volcengine.vpn.getGatewayRoutesOutput({ * ids: [fooGatewayRoute.id], * }); * ``` */ /** @deprecated volcengine.vpn.GatewayRoutes has been deprecated in favor of volcengine.vpn.getGatewayRoutes */ export declare function gatewayRoutesOutput(args?: GatewayRoutesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GatewayRoutesResult>; /** * A collection of arguments for invoking GatewayRoutes. */ export interface GatewayRoutesOutputArgs { /** * A destination cidr block. */ destinationCidrBlock?: pulumi.Input<string>; /** * A list of VPN gateway route ids. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * An ID of next hop. */ nextHopId?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The type of the VPN gateway route. Valid values: `Static`, `BGP`, `Cloud`. */ routeType?: pulumi.Input<string>; /** * The status of the VPN gateway route. */ status?: pulumi.Input<string>; /** * An ID of VPN gateway. */ vpnGatewayId?: pulumi.Input<string>; }