UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

284 lines (283 loc) 8.33 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of vpn connections * ## 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-beijing-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", * }); * const fooConnections = volcengine.vpn.getConnectionsOutput({ * ids: [fooConnection.id], * }); * ``` */ export declare function getConnections(args?: GetConnectionsArgs, opts?: pulumi.InvokeOptions): Promise<GetConnectionsResult>; /** * A collection of arguments for invoking getConnections. */ export interface GetConnectionsArgs { /** * The attach status of VPN connection. */ attachStatus?: string; /** * The attach type of VPN connection. Valid values: `VpnGateway`, `TransitRouter`. */ attachType?: string; /** * An ID of customer gateway. */ customerGatewayId?: string; /** * A list of VPN connection ids. */ ids?: string[]; /** * A Name Regex of VPN connection. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; /** * The project name of VPN connection. */ projectName?: string; /** * The spec of IPSec connection. Valid values: `default`, `large`. */ spec?: string; /** * The status of IPSec connection. Valid values: `Creating`, `Deleting`, `Pending`, `Available`. */ status?: string; /** * An ID of transit router. */ transitRouterId?: string; /** * A list of VPN connection names. */ vpnConnectionNames?: string[]; /** * An ID of VPN gateway. */ vpnGatewayId?: string; } /** * A collection of values returned by getConnections. */ export interface GetConnectionsResult { /** * The IPsec attach status. */ readonly attachStatus?: string; /** * The IPsec attach type. */ readonly attachType?: string; /** * The ID of the customer gateway. */ readonly customerGatewayId?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; readonly nameRegex?: string; readonly outputFile?: string; readonly projectName?: string; readonly spec?: string; /** * The status of the VPN connection. */ readonly status?: string; /** * The total count of VPN connection query. */ readonly totalCount: number; /** * The id of transit router, valid when the attach type is 'TransitRouter'. */ readonly transitRouterId?: string; readonly vpnConnectionNames?: string[]; /** * The collection of VPN connection query. */ readonly vpnConnections: outputs.vpn.GetConnectionsVpnConnection[]; /** * The ID of the vpn gateway. */ readonly vpnGatewayId?: string; } /** * Use this data source to query detailed information of vpn connections * ## 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-beijing-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", * }); * const fooConnections = volcengine.vpn.getConnectionsOutput({ * ids: [fooConnection.id], * }); * ``` */ export declare function getConnectionsOutput(args?: GetConnectionsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetConnectionsResult>; /** * A collection of arguments for invoking getConnections. */ export interface GetConnectionsOutputArgs { /** * The attach status of VPN connection. */ attachStatus?: pulumi.Input<string>; /** * The attach type of VPN connection. Valid values: `VpnGateway`, `TransitRouter`. */ attachType?: pulumi.Input<string>; /** * An ID of customer gateway. */ customerGatewayId?: pulumi.Input<string>; /** * A list of VPN connection ids. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * A Name Regex of VPN connection. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; /** * The project name of VPN connection. */ projectName?: pulumi.Input<string>; /** * The spec of IPSec connection. Valid values: `default`, `large`. */ spec?: pulumi.Input<string>; /** * The status of IPSec connection. Valid values: `Creating`, `Deleting`, `Pending`, `Available`. */ status?: pulumi.Input<string>; /** * An ID of transit router. */ transitRouterId?: pulumi.Input<string>; /** * A list of VPN connection names. */ vpnConnectionNames?: pulumi.Input<pulumi.Input<string>[]>; /** * An ID of VPN gateway. */ vpnGatewayId?: pulumi.Input<string>; }