@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
508 lines (507 loc) • 19.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage vpn connection
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* 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",
* });
* ```
*
* ## Import
*
* VpnConnection can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:vpn/connection:Connection default vgc-3tex2x1cwd4c6c0v****
* ```
*/
export declare class Connection extends pulumi.CustomResource {
/**
* Get an existing Connection 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?: ConnectionState, opts?: pulumi.CustomResourceOptions): Connection;
/**
* Returns true if the given object is an instance of Connection. 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 Connection;
/**
* The account ID of the VPN connection.
*/
readonly accountId: pulumi.Output<string>;
/**
* The IPsec attach status.
*/
readonly attachStatus: pulumi.Output<string>;
/**
* The attach type of the VPN connection, the value can be `VpnGateway` or `TransitRouter`.
*/
readonly attachType: pulumi.Output<string | undefined>;
/**
* The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
*/
readonly businessStatus: pulumi.Output<string>;
/**
* The connect status of the VPN connection.
*/
readonly connectStatus: pulumi.Output<string>;
/**
* The create time of VPN connection.
*/
readonly creationTime: pulumi.Output<string>;
/**
* The ID of the customer gateway.
*/
readonly customerGatewayId: pulumi.Output<string>;
/**
* The delete time of resource, valid when the attach type is 'TransitRouter'.
*/
readonly deletedTime: pulumi.Output<string>;
/**
* The description of the VPN connection.
*/
readonly description: pulumi.Output<string>;
/**
* The dpd action of the VPN connection.
*/
readonly dpdAction: pulumi.Output<string | undefined>;
/**
* The auth alg of the ike config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
readonly ikeConfigAuthAlg: pulumi.Output<string | undefined>;
/**
* The dk group of the ike config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14`. The default value is `group2`.
*/
readonly ikeConfigDhGroup: pulumi.Output<string | undefined>;
/**
* The enc alg of the ike config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
readonly ikeConfigEncAlg: pulumi.Output<string | undefined>;
/**
* The lifetime of the ike config of the VPN connection. Value: 900~86400.
*/
readonly ikeConfigLifetime: pulumi.Output<number | undefined>;
/**
* The localId of the ike config of the VPN connection.
*/
readonly ikeConfigLocalId: pulumi.Output<string>;
/**
* The mode of the ike config of the VPN connection. Valid values are `main`, `aggressive`, and default value is `main`.
*/
readonly ikeConfigMode: pulumi.Output<string | undefined>;
/**
* The psk of the ike config of the VPN connection. The length does not exceed 100 characters, and only uppercase and lowercase letters, special symbols and numbers are allowed.
*/
readonly ikeConfigPsk: pulumi.Output<string>;
/**
* The remote id of the ike config of the VPN connection.
*/
readonly ikeConfigRemoteId: pulumi.Output<string>;
/**
* The version of the ike config of the VPN connection. The value can be `ikev1` or `ikev2`. The default value is `ikev1`.
*/
readonly ikeConfigVersion: pulumi.Output<string | undefined>;
/**
* The ip address of transit router, valid when the attach type is 'TransitRouter'.
*/
readonly ipAddress: pulumi.Output<string>;
/**
* The auth alg of the ipsec config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
readonly ipsecConfigAuthAlg: pulumi.Output<string | undefined>;
/**
* The dh group of the ipsec config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14` and `disable`. The default value is `group2`.
*/
readonly ipsecConfigDhGroup: pulumi.Output<string | undefined>;
/**
* The enc alg of the ipsec config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
readonly ipsecConfigEncAlg: pulumi.Output<string | undefined>;
/**
* The ipsec config of the ike config of the VPN connection. Value: 900~86400.
*/
readonly ipsecConfigLifetime: pulumi.Output<number | undefined>;
/**
* The local subnet of the VPN connection. Up to 5 network segments are supported.
*/
readonly localSubnets: pulumi.Output<string[]>;
/**
* Whether to enable connection logging. After enabling Connection Day, you can view and download IPsec connection logs, and use the log information to troubleshoot IPsec connection problems yourself.
*/
readonly logEnabled: pulumi.Output<boolean | undefined>;
/**
* The nat traversal of the VPN connection.
*/
readonly natTraversal: pulumi.Output<boolean | undefined>;
/**
* Whether to initiate negotiation mode immediately.
*/
readonly negotiateInstantly: pulumi.Output<boolean | undefined>;
/**
* The overdue time of resource, valid when the attach type is 'TransitRouter'.
*/
readonly overdueTime: pulumi.Output<string>;
/**
* The project name of the VPN connection.
*/
readonly projectName: pulumi.Output<string>;
/**
* The remote subnet of the VPN connection. Up to 5 network segments are supported.
*/
readonly remoteSubnets: pulumi.Output<string[]>;
/**
* The status of the VPN connection.
*/
readonly status: pulumi.Output<string>;
/**
* The id of transit router, valid when the attach type is 'TransitRouter'.
*/
readonly transitRouterId: pulumi.Output<string>;
/**
* The update time of VPN connection.
*/
readonly updateTime: pulumi.Output<string>;
/**
* The ID of the VPN connection.
*/
readonly vpnConnectionId: pulumi.Output<string>;
/**
* The name of the VPN connection.
*/
readonly vpnConnectionName: pulumi.Output<string>;
/**
* The ID of the vpn gateway. If the `AttachType` is not passed or the passed value is `VpnGateway`, this parameter must be filled. If the value of `AttachType` is `TransitRouter`, this parameter does not need to be filled.
*/
readonly vpnGatewayId: pulumi.Output<string | undefined>;
/**
* The zone id of transit router, valid when the attach type is 'TransitRouter'.
*/
readonly zoneId: pulumi.Output<string>;
/**
* Create a Connection 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: ConnectionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Connection resources.
*/
export interface ConnectionState {
/**
* The account ID of the VPN connection.
*/
accountId?: pulumi.Input<string>;
/**
* The IPsec attach status.
*/
attachStatus?: pulumi.Input<string>;
/**
* The attach type of the VPN connection, the value can be `VpnGateway` or `TransitRouter`.
*/
attachType?: pulumi.Input<string>;
/**
* The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
*/
businessStatus?: pulumi.Input<string>;
/**
* The connect status of the VPN connection.
*/
connectStatus?: pulumi.Input<string>;
/**
* The create time of VPN connection.
*/
creationTime?: pulumi.Input<string>;
/**
* The ID of the customer gateway.
*/
customerGatewayId?: pulumi.Input<string>;
/**
* The delete time of resource, valid when the attach type is 'TransitRouter'.
*/
deletedTime?: pulumi.Input<string>;
/**
* The description of the VPN connection.
*/
description?: pulumi.Input<string>;
/**
* The dpd action of the VPN connection.
*/
dpdAction?: pulumi.Input<string>;
/**
* The auth alg of the ike config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
ikeConfigAuthAlg?: pulumi.Input<string>;
/**
* The dk group of the ike config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14`. The default value is `group2`.
*/
ikeConfigDhGroup?: pulumi.Input<string>;
/**
* The enc alg of the ike config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
ikeConfigEncAlg?: pulumi.Input<string>;
/**
* The lifetime of the ike config of the VPN connection. Value: 900~86400.
*/
ikeConfigLifetime?: pulumi.Input<number>;
/**
* The localId of the ike config of the VPN connection.
*/
ikeConfigLocalId?: pulumi.Input<string>;
/**
* The mode of the ike config of the VPN connection. Valid values are `main`, `aggressive`, and default value is `main`.
*/
ikeConfigMode?: pulumi.Input<string>;
/**
* The psk of the ike config of the VPN connection. The length does not exceed 100 characters, and only uppercase and lowercase letters, special symbols and numbers are allowed.
*/
ikeConfigPsk?: pulumi.Input<string>;
/**
* The remote id of the ike config of the VPN connection.
*/
ikeConfigRemoteId?: pulumi.Input<string>;
/**
* The version of the ike config of the VPN connection. The value can be `ikev1` or `ikev2`. The default value is `ikev1`.
*/
ikeConfigVersion?: pulumi.Input<string>;
/**
* The ip address of transit router, valid when the attach type is 'TransitRouter'.
*/
ipAddress?: pulumi.Input<string>;
/**
* The auth alg of the ipsec config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
ipsecConfigAuthAlg?: pulumi.Input<string>;
/**
* The dh group of the ipsec config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14` and `disable`. The default value is `group2`.
*/
ipsecConfigDhGroup?: pulumi.Input<string>;
/**
* The enc alg of the ipsec config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
ipsecConfigEncAlg?: pulumi.Input<string>;
/**
* The ipsec config of the ike config of the VPN connection. Value: 900~86400.
*/
ipsecConfigLifetime?: pulumi.Input<number>;
/**
* The local subnet of the VPN connection. Up to 5 network segments are supported.
*/
localSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to enable connection logging. After enabling Connection Day, you can view and download IPsec connection logs, and use the log information to troubleshoot IPsec connection problems yourself.
*/
logEnabled?: pulumi.Input<boolean>;
/**
* The nat traversal of the VPN connection.
*/
natTraversal?: pulumi.Input<boolean>;
/**
* Whether to initiate negotiation mode immediately.
*/
negotiateInstantly?: pulumi.Input<boolean>;
/**
* The overdue time of resource, valid when the attach type is 'TransitRouter'.
*/
overdueTime?: pulumi.Input<string>;
/**
* The project name of the VPN connection.
*/
projectName?: pulumi.Input<string>;
/**
* The remote subnet of the VPN connection. Up to 5 network segments are supported.
*/
remoteSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The status of the VPN connection.
*/
status?: pulumi.Input<string>;
/**
* The id of transit router, valid when the attach type is 'TransitRouter'.
*/
transitRouterId?: pulumi.Input<string>;
/**
* The update time of VPN connection.
*/
updateTime?: pulumi.Input<string>;
/**
* The ID of the VPN connection.
*/
vpnConnectionId?: pulumi.Input<string>;
/**
* The name of the VPN connection.
*/
vpnConnectionName?: pulumi.Input<string>;
/**
* The ID of the vpn gateway. If the `AttachType` is not passed or the passed value is `VpnGateway`, this parameter must be filled. If the value of `AttachType` is `TransitRouter`, this parameter does not need to be filled.
*/
vpnGatewayId?: pulumi.Input<string>;
/**
* The zone id of transit router, valid when the attach type is 'TransitRouter'.
*/
zoneId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Connection resource.
*/
export interface ConnectionArgs {
/**
* The attach type of the VPN connection, the value can be `VpnGateway` or `TransitRouter`.
*/
attachType?: pulumi.Input<string>;
/**
* The ID of the customer gateway.
*/
customerGatewayId: pulumi.Input<string>;
/**
* The description of the VPN connection.
*/
description?: pulumi.Input<string>;
/**
* The dpd action of the VPN connection.
*/
dpdAction?: pulumi.Input<string>;
/**
* The auth alg of the ike config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
ikeConfigAuthAlg?: pulumi.Input<string>;
/**
* The dk group of the ike config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14`. The default value is `group2`.
*/
ikeConfigDhGroup?: pulumi.Input<string>;
/**
* The enc alg of the ike config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
ikeConfigEncAlg?: pulumi.Input<string>;
/**
* The lifetime of the ike config of the VPN connection. Value: 900~86400.
*/
ikeConfigLifetime?: pulumi.Input<number>;
/**
* The localId of the ike config of the VPN connection.
*/
ikeConfigLocalId?: pulumi.Input<string>;
/**
* The mode of the ike config of the VPN connection. Valid values are `main`, `aggressive`, and default value is `main`.
*/
ikeConfigMode?: pulumi.Input<string>;
/**
* The psk of the ike config of the VPN connection. The length does not exceed 100 characters, and only uppercase and lowercase letters, special symbols and numbers are allowed.
*/
ikeConfigPsk: pulumi.Input<string>;
/**
* The remote id of the ike config of the VPN connection.
*/
ikeConfigRemoteId?: pulumi.Input<string>;
/**
* The version of the ike config of the VPN connection. The value can be `ikev1` or `ikev2`. The default value is `ikev1`.
*/
ikeConfigVersion?: pulumi.Input<string>;
/**
* The auth alg of the ipsec config of the VPN connection. Valid value are `sha1`, `md5`, `sha256`, `sha384`, `sha512`, `sm3`. The default value is `sha1`.
*/
ipsecConfigAuthAlg?: pulumi.Input<string>;
/**
* The dh group of the ipsec config of the VPN connection. Valid value are `group1`, `group2`, `group5`, `group14` and `disable`. The default value is `group2`.
*/
ipsecConfigDhGroup?: pulumi.Input<string>;
/**
* The enc alg of the ipsec config of the VPN connection. Valid value are `aes`, `aes192`, `aes256`, `des`, `3des`, `sm4`. The default value is `aes`.
*/
ipsecConfigEncAlg?: pulumi.Input<string>;
/**
* The ipsec config of the ike config of the VPN connection. Value: 900~86400.
*/
ipsecConfigLifetime?: pulumi.Input<number>;
/**
* The local subnet of the VPN connection. Up to 5 network segments are supported.
*/
localSubnets: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to enable connection logging. After enabling Connection Day, you can view and download IPsec connection logs, and use the log information to troubleshoot IPsec connection problems yourself.
*/
logEnabled?: pulumi.Input<boolean>;
/**
* The nat traversal of the VPN connection.
*/
natTraversal?: pulumi.Input<boolean>;
/**
* Whether to initiate negotiation mode immediately.
*/
negotiateInstantly?: pulumi.Input<boolean>;
/**
* The project name of the VPN connection.
*/
projectName?: pulumi.Input<string>;
/**
* The remote subnet of the VPN connection. Up to 5 network segments are supported.
*/
remoteSubnets: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the VPN connection.
*/
vpnConnectionName?: pulumi.Input<string>;
/**
* The ID of the vpn gateway. If the `AttachType` is not passed or the passed value is `VpnGateway`, this parameter must be filled. If the value of `AttachType` is `TransitRouter`, this parameter does not need to be filled.
*/
vpnGatewayId?: pulumi.Input<string>;
}