1. Packages
  2. Volcengine
  3. API Docs
  4. vpn
  5. Connection
Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine

volcengine.vpn.Connection

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine

    Provides a resource to manage vpn connection

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = "cn-beijing-a",
            VpcId = fooVpc.Id,
        });
    
        var fooGateway = new Volcengine.Vpn.Gateway("fooGateway", new()
        {
            VpcId = fooVpc.Id,
            SubnetId = fooSubnet.Id,
            Bandwidth = 20,
            VpnGatewayName = "acc-test",
            Description = "acc-test",
            Period = 2,
            ProjectName = "default",
        });
    
        var fooCustomerGateway = new Volcengine.Vpn.CustomerGateway("fooCustomerGateway", new()
        {
            IpAddress = "192.0.1.3",
            CustomerGatewayName = "acc-test",
            Description = "acc-test",
            ProjectName = "default",
        });
    
        var fooConnection = new Volcengine.Vpn.Connection("fooConnection", new()
        {
            VpnConnectionName = "acc-tf-test",
            Description = "acc-tf-test",
            VpnGatewayId = fooGateway.Id,
            CustomerGatewayId = fooCustomerGateway.Id,
            LocalSubnets = new[]
            {
                "192.168.0.0/22",
            },
            RemoteSubnets = new[]
            {
                "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",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpn"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String("cn-beijing-a"),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooGateway, err := vpn.NewGateway(ctx, "fooGateway", &vpn.GatewayArgs{
    			VpcId:          fooVpc.ID(),
    			SubnetId:       fooSubnet.ID(),
    			Bandwidth:      pulumi.Int(20),
    			VpnGatewayName: pulumi.String("acc-test"),
    			Description:    pulumi.String("acc-test"),
    			Period:         pulumi.Int(2),
    			ProjectName:    pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		fooCustomerGateway, err := vpn.NewCustomerGateway(ctx, "fooCustomerGateway", &vpn.CustomerGatewayArgs{
    			IpAddress:           pulumi.String("192.0.1.3"),
    			CustomerGatewayName: pulumi.String("acc-test"),
    			Description:         pulumi.String("acc-test"),
    			ProjectName:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpn.NewConnection(ctx, "fooConnection", &vpn.ConnectionArgs{
    			VpnConnectionName: pulumi.String("acc-tf-test"),
    			Description:       pulumi.String("acc-tf-test"),
    			VpnGatewayId:      fooGateway.ID(),
    			CustomerGatewayId: fooCustomerGateway.ID(),
    			LocalSubnets: pulumi.StringArray{
    				pulumi.String("192.168.0.0/22"),
    			},
    			RemoteSubnets: pulumi.StringArray{
    				pulumi.String("192.161.0.0/20"),
    			},
    			DpdAction:           pulumi.String("none"),
    			NatTraversal:        pulumi.Bool(true),
    			IkeConfigPsk:        pulumi.String("acctest@!3"),
    			IkeConfigVersion:    pulumi.String("ikev1"),
    			IkeConfigMode:       pulumi.String("main"),
    			IkeConfigEncAlg:     pulumi.String("aes"),
    			IkeConfigAuthAlg:    pulumi.String("md5"),
    			IkeConfigDhGroup:    pulumi.String("group2"),
    			IkeConfigLifetime:   pulumi.Int(9000),
    			IkeConfigLocalId:    pulumi.String("acc_test"),
    			IkeConfigRemoteId:   pulumi.String("acc_test"),
    			IpsecConfigEncAlg:   pulumi.String("aes"),
    			IpsecConfigAuthAlg:  pulumi.String("sha256"),
    			IpsecConfigDhGroup:  pulumi.String("group2"),
    			IpsecConfigLifetime: pulumi.Int(9000),
    			ProjectName:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.vpn.Gateway;
    import com.pulumi.volcengine.vpn.GatewayArgs;
    import com.pulumi.volcengine.vpn.CustomerGateway;
    import com.pulumi.volcengine.vpn.CustomerGatewayArgs;
    import com.pulumi.volcengine.vpn.Connection;
    import com.pulumi.volcengine.vpn.ConnectionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId("cn-beijing-a")
                .vpcId(fooVpc.id())
                .build());
    
            var fooGateway = new Gateway("fooGateway", GatewayArgs.builder()        
                .vpcId(fooVpc.id())
                .subnetId(fooSubnet.id())
                .bandwidth(20)
                .vpnGatewayName("acc-test")
                .description("acc-test")
                .period(2)
                .projectName("default")
                .build());
    
            var fooCustomerGateway = new CustomerGateway("fooCustomerGateway", CustomerGatewayArgs.builder()        
                .ipAddress("192.0.1.3")
                .customerGatewayName("acc-test")
                .description("acc-test")
                .projectName("default")
                .build());
    
            var fooConnection = new Connection("fooConnection", ConnectionArgs.builder()        
                .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")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id="cn-beijing-a",
        vpc_id=foo_vpc.id)
    foo_gateway = volcengine.vpn.Gateway("fooGateway",
        vpc_id=foo_vpc.id,
        subnet_id=foo_subnet.id,
        bandwidth=20,
        vpn_gateway_name="acc-test",
        description="acc-test",
        period=2,
        project_name="default")
    foo_customer_gateway = volcengine.vpn.CustomerGateway("fooCustomerGateway",
        ip_address="192.0.1.3",
        customer_gateway_name="acc-test",
        description="acc-test",
        project_name="default")
    foo_connection = volcengine.vpn.Connection("fooConnection",
        vpn_connection_name="acc-tf-test",
        description="acc-tf-test",
        vpn_gateway_id=foo_gateway.id,
        customer_gateway_id=foo_customer_gateway.id,
        local_subnets=["192.168.0.0/22"],
        remote_subnets=["192.161.0.0/20"],
        dpd_action="none",
        nat_traversal=True,
        ike_config_psk="acctest@!3",
        ike_config_version="ikev1",
        ike_config_mode="main",
        ike_config_enc_alg="aes",
        ike_config_auth_alg="md5",
        ike_config_dh_group="group2",
        ike_config_lifetime=9000,
        ike_config_local_id="acc_test",
        ike_config_remote_id="acc_test",
        ipsec_config_enc_alg="aes",
        ipsec_config_auth_alg="sha256",
        ipsec_config_dh_group="group2",
        ipsec_config_lifetime=9000,
        project_name="default")
    
    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",
    });
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: cn-beijing-a
          vpcId: ${fooVpc.id}
      fooGateway:
        type: volcengine:vpn:Gateway
        properties:
          vpcId: ${fooVpc.id}
          subnetId: ${fooSubnet.id}
          bandwidth: 20
          vpnGatewayName: acc-test
          description: acc-test
          period: 2
          projectName: default
      fooCustomerGateway:
        type: volcengine:vpn:CustomerGateway
        properties:
          ipAddress: 192.0.1.3
          customerGatewayName: acc-test
          description: acc-test
          projectName: default
      fooConnection:
        type: volcengine:vpn:Connection
        properties:
          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
    

    Create Connection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def Connection(resource_name: str,
                   args: ConnectionArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Connection(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   ike_config_psk: Optional[str] = None,
                   customer_gateway_id: Optional[str] = None,
                   remote_subnets: Optional[Sequence[str]] = None,
                   local_subnets: Optional[Sequence[str]] = None,
                   ike_config_version: Optional[str] = None,
                   ipsec_config_enc_alg: Optional[str] = None,
                   ike_config_enc_alg: Optional[str] = None,
                   ike_config_lifetime: Optional[int] = None,
                   ike_config_local_id: Optional[str] = None,
                   ike_config_mode: Optional[str] = None,
                   ike_config_auth_alg: Optional[str] = None,
                   ike_config_remote_id: Optional[str] = None,
                   attach_type: Optional[str] = None,
                   ipsec_config_auth_alg: Optional[str] = None,
                   ipsec_config_dh_group: Optional[str] = None,
                   ike_config_dh_group: Optional[str] = None,
                   ipsec_config_lifetime: Optional[int] = None,
                   dpd_action: Optional[str] = None,
                   log_enabled: Optional[bool] = None,
                   nat_traversal: Optional[bool] = None,
                   negotiate_instantly: Optional[bool] = None,
                   project_name: Optional[str] = None,
                   description: Optional[str] = None,
                   vpn_connection_name: Optional[str] = None,
                   vpn_gateway_id: Optional[str] = None)
    func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
    public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
    public Connection(String name, ConnectionArgs args)
    public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
    
    type: volcengine:vpn:Connection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var volcengineConnectionResource = new Volcengine.Vpn.Connection("volcengineConnectionResource", new()
    {
        IkeConfigPsk = "string",
        CustomerGatewayId = "string",
        RemoteSubnets = new[]
        {
            "string",
        },
        LocalSubnets = new[]
        {
            "string",
        },
        IkeConfigVersion = "string",
        IpsecConfigEncAlg = "string",
        IkeConfigEncAlg = "string",
        IkeConfigLifetime = 0,
        IkeConfigLocalId = "string",
        IkeConfigMode = "string",
        IkeConfigAuthAlg = "string",
        IkeConfigRemoteId = "string",
        AttachType = "string",
        IpsecConfigAuthAlg = "string",
        IpsecConfigDhGroup = "string",
        IkeConfigDhGroup = "string",
        IpsecConfigLifetime = 0,
        DpdAction = "string",
        LogEnabled = false,
        NatTraversal = false,
        NegotiateInstantly = false,
        ProjectName = "string",
        Description = "string",
        VpnConnectionName = "string",
        VpnGatewayId = "string",
    });
    
    example, err := vpn.NewConnection(ctx, "volcengineConnectionResource", &vpn.ConnectionArgs{
    	IkeConfigPsk:      pulumi.String("string"),
    	CustomerGatewayId: pulumi.String("string"),
    	RemoteSubnets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LocalSubnets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IkeConfigVersion:    pulumi.String("string"),
    	IpsecConfigEncAlg:   pulumi.String("string"),
    	IkeConfigEncAlg:     pulumi.String("string"),
    	IkeConfigLifetime:   pulumi.Int(0),
    	IkeConfigLocalId:    pulumi.String("string"),
    	IkeConfigMode:       pulumi.String("string"),
    	IkeConfigAuthAlg:    pulumi.String("string"),
    	IkeConfigRemoteId:   pulumi.String("string"),
    	AttachType:          pulumi.String("string"),
    	IpsecConfigAuthAlg:  pulumi.String("string"),
    	IpsecConfigDhGroup:  pulumi.String("string"),
    	IkeConfigDhGroup:    pulumi.String("string"),
    	IpsecConfigLifetime: pulumi.Int(0),
    	DpdAction:           pulumi.String("string"),
    	LogEnabled:          pulumi.Bool(false),
    	NatTraversal:        pulumi.Bool(false),
    	NegotiateInstantly:  pulumi.Bool(false),
    	ProjectName:         pulumi.String("string"),
    	Description:         pulumi.String("string"),
    	VpnConnectionName:   pulumi.String("string"),
    	VpnGatewayId:        pulumi.String("string"),
    })
    
    var volcengineConnectionResource = new Connection("volcengineConnectionResource", ConnectionArgs.builder()
        .ikeConfigPsk("string")
        .customerGatewayId("string")
        .remoteSubnets("string")
        .localSubnets("string")
        .ikeConfigVersion("string")
        .ipsecConfigEncAlg("string")
        .ikeConfigEncAlg("string")
        .ikeConfigLifetime(0)
        .ikeConfigLocalId("string")
        .ikeConfigMode("string")
        .ikeConfigAuthAlg("string")
        .ikeConfigRemoteId("string")
        .attachType("string")
        .ipsecConfigAuthAlg("string")
        .ipsecConfigDhGroup("string")
        .ikeConfigDhGroup("string")
        .ipsecConfigLifetime(0)
        .dpdAction("string")
        .logEnabled(false)
        .natTraversal(false)
        .negotiateInstantly(false)
        .projectName("string")
        .description("string")
        .vpnConnectionName("string")
        .vpnGatewayId("string")
        .build());
    
    volcengine_connection_resource = volcengine.vpn.Connection("volcengineConnectionResource",
        ike_config_psk="string",
        customer_gateway_id="string",
        remote_subnets=["string"],
        local_subnets=["string"],
        ike_config_version="string",
        ipsec_config_enc_alg="string",
        ike_config_enc_alg="string",
        ike_config_lifetime=0,
        ike_config_local_id="string",
        ike_config_mode="string",
        ike_config_auth_alg="string",
        ike_config_remote_id="string",
        attach_type="string",
        ipsec_config_auth_alg="string",
        ipsec_config_dh_group="string",
        ike_config_dh_group="string",
        ipsec_config_lifetime=0,
        dpd_action="string",
        log_enabled=False,
        nat_traversal=False,
        negotiate_instantly=False,
        project_name="string",
        description="string",
        vpn_connection_name="string",
        vpn_gateway_id="string")
    
    const volcengineConnectionResource = new volcengine.vpn.Connection("volcengineConnectionResource", {
        ikeConfigPsk: "string",
        customerGatewayId: "string",
        remoteSubnets: ["string"],
        localSubnets: ["string"],
        ikeConfigVersion: "string",
        ipsecConfigEncAlg: "string",
        ikeConfigEncAlg: "string",
        ikeConfigLifetime: 0,
        ikeConfigLocalId: "string",
        ikeConfigMode: "string",
        ikeConfigAuthAlg: "string",
        ikeConfigRemoteId: "string",
        attachType: "string",
        ipsecConfigAuthAlg: "string",
        ipsecConfigDhGroup: "string",
        ikeConfigDhGroup: "string",
        ipsecConfigLifetime: 0,
        dpdAction: "string",
        logEnabled: false,
        natTraversal: false,
        negotiateInstantly: false,
        projectName: "string",
        description: "string",
        vpnConnectionName: "string",
        vpnGatewayId: "string",
    });
    
    type: volcengine:vpn:Connection
    properties:
        attachType: string
        customerGatewayId: string
        description: string
        dpdAction: string
        ikeConfigAuthAlg: string
        ikeConfigDhGroup: string
        ikeConfigEncAlg: string
        ikeConfigLifetime: 0
        ikeConfigLocalId: string
        ikeConfigMode: string
        ikeConfigPsk: string
        ikeConfigRemoteId: string
        ikeConfigVersion: string
        ipsecConfigAuthAlg: string
        ipsecConfigDhGroup: string
        ipsecConfigEncAlg: string
        ipsecConfigLifetime: 0
        localSubnets:
            - string
        logEnabled: false
        natTraversal: false
        negotiateInstantly: false
        projectName: string
        remoteSubnets:
            - string
        vpnConnectionName: string
        vpnGatewayId: string
    

    Connection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Connection resource accepts the following input properties:

    CustomerGatewayId string
    The ID of the customer gateway.
    IkeConfigPsk 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.
    LocalSubnets List<string>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    RemoteSubnets List<string>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    AttachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    Description string
    The description of the VPN connection.
    DpdAction string
    The dpd action of the VPN connection.
    IkeConfigAuthAlg 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.
    IkeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    IkeConfigEncAlg 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.
    IkeConfigLifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    IkeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    IkeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    IkeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    IkeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    IpsecConfigAuthAlg 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.
    IpsecConfigDhGroup 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.
    IpsecConfigEncAlg 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.
    IpsecConfigLifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    LogEnabled bool
    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.
    NatTraversal bool
    The nat traversal of the VPN connection.
    NegotiateInstantly bool
    Whether to initiate negotiation mode immediately.
    ProjectName string
    The project name of the VPN connection.
    VpnConnectionName string
    The name of the VPN connection.
    VpnGatewayId 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.
    CustomerGatewayId string
    The ID of the customer gateway.
    IkeConfigPsk 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.
    LocalSubnets []string
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    RemoteSubnets []string
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    AttachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    Description string
    The description of the VPN connection.
    DpdAction string
    The dpd action of the VPN connection.
    IkeConfigAuthAlg 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.
    IkeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    IkeConfigEncAlg 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.
    IkeConfigLifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    IkeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    IkeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    IkeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    IkeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    IpsecConfigAuthAlg 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.
    IpsecConfigDhGroup 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.
    IpsecConfigEncAlg 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.
    IpsecConfigLifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    LogEnabled bool
    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.
    NatTraversal bool
    The nat traversal of the VPN connection.
    NegotiateInstantly bool
    Whether to initiate negotiation mode immediately.
    ProjectName string
    The project name of the VPN connection.
    VpnConnectionName string
    The name of the VPN connection.
    VpnGatewayId 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.
    customerGatewayId String
    The ID of the customer gateway.
    ikeConfigPsk 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.
    localSubnets List<String>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    remoteSubnets List<String>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    attachType String
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    description String
    The description of the VPN connection.
    dpdAction String
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup String
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime Integer
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId String
    The local_id of the ike config of the VPN connection.
    ikeConfigMode String
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigRemoteId String
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion String
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime Integer
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    logEnabled Boolean
    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.
    natTraversal Boolean
    The nat traversal of the VPN connection.
    negotiateInstantly Boolean
    Whether to initiate negotiation mode immediately.
    projectName String
    The project name of the VPN connection.
    vpnConnectionName String
    The name of the VPN connection.
    vpnGatewayId 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.
    customerGatewayId string
    The ID of the customer gateway.
    ikeConfigPsk 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.
    localSubnets string[]
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    remoteSubnets string[]
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    attachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    description string
    The description of the VPN connection.
    dpdAction string
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime number
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    ikeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime number
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    logEnabled boolean
    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.
    natTraversal boolean
    The nat traversal of the VPN connection.
    negotiateInstantly boolean
    Whether to initiate negotiation mode immediately.
    projectName string
    The project name of the VPN connection.
    vpnConnectionName string
    The name of the VPN connection.
    vpnGatewayId 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.
    customer_gateway_id str
    The ID of the customer gateway.
    ike_config_psk str
    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.
    local_subnets Sequence[str]
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    remote_subnets Sequence[str]
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    attach_type str
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    description str
    The description of the VPN connection.
    dpd_action str
    The dpd action of the VPN connection.
    ike_config_auth_alg str
    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.
    ike_config_dh_group str
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ike_config_enc_alg str
    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.
    ike_config_lifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ike_config_local_id str
    The local_id of the ike config of the VPN connection.
    ike_config_mode str
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ike_config_remote_id str
    The remote id of the ike config of the VPN connection.
    ike_config_version str
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipsec_config_auth_alg str
    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.
    ipsec_config_dh_group str
    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.
    ipsec_config_enc_alg str
    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.
    ipsec_config_lifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    log_enabled bool
    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.
    nat_traversal bool
    The nat traversal of the VPN connection.
    negotiate_instantly bool
    Whether to initiate negotiation mode immediately.
    project_name str
    The project name of the VPN connection.
    vpn_connection_name str
    The name of the VPN connection.
    vpn_gateway_id str
    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.
    customerGatewayId String
    The ID of the customer gateway.
    ikeConfigPsk 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.
    localSubnets List<String>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    remoteSubnets List<String>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    attachType String
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    description String
    The description of the VPN connection.
    dpdAction String
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup String
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime Number
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId String
    The local_id of the ike config of the VPN connection.
    ikeConfigMode String
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigRemoteId String
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion String
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime Number
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    logEnabled Boolean
    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.
    natTraversal Boolean
    The nat traversal of the VPN connection.
    negotiateInstantly Boolean
    Whether to initiate negotiation mode immediately.
    projectName String
    The project name of the VPN connection.
    vpnConnectionName String
    The name of the VPN connection.
    vpnGatewayId 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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

    AccountId string
    The account ID of the VPN connection.
    AttachStatus string
    The IPsec attach status.
    BusinessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    ConnectStatus string
    The connect status of the VPN connection.
    CreationTime string
    The create time of VPN connection.
    DeletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    OverdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    Status string
    The status of the VPN connection.
    TransitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    UpdateTime string
    The update time of VPN connection.
    VpnConnectionId string
    The ID of the VPN connection.
    ZoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    AccountId string
    The account ID of the VPN connection.
    AttachStatus string
    The IPsec attach status.
    BusinessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    ConnectStatus string
    The connect status of the VPN connection.
    CreationTime string
    The create time of VPN connection.
    DeletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    OverdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    Status string
    The status of the VPN connection.
    TransitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    UpdateTime string
    The update time of VPN connection.
    VpnConnectionId string
    The ID of the VPN connection.
    ZoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId String
    The account ID of the VPN connection.
    attachStatus String
    The IPsec attach status.
    businessStatus String
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus String
    The connect status of the VPN connection.
    creationTime String
    The create time of VPN connection.
    deletedTime String
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    overdueTime String
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    status String
    The status of the VPN connection.
    transitRouterId String
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime String
    The update time of VPN connection.
    vpnConnectionId String
    The ID of the VPN connection.
    zoneId String
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId string
    The account ID of the VPN connection.
    attachStatus string
    The IPsec attach status.
    businessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus string
    The connect status of the VPN connection.
    creationTime string
    The create time of VPN connection.
    deletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    overdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    status string
    The status of the VPN connection.
    transitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime string
    The update time of VPN connection.
    vpnConnectionId string
    The ID of the VPN connection.
    zoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    account_id str
    The account ID of the VPN connection.
    attach_status str
    The IPsec attach status.
    business_status str
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connect_status str
    The connect status of the VPN connection.
    creation_time str
    The create time of VPN connection.
    deleted_time str
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    overdue_time str
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    status str
    The status of the VPN connection.
    transit_router_id str
    The id of transit router, valid when the attach type is 'TransitRouter'.
    update_time str
    The update time of VPN connection.
    vpn_connection_id str
    The ID of the VPN connection.
    zone_id str
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId String
    The account ID of the VPN connection.
    attachStatus String
    The IPsec attach status.
    businessStatus String
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus String
    The connect status of the VPN connection.
    creationTime String
    The create time of VPN connection.
    deletedTime String
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    overdueTime String
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    status String
    The status of the VPN connection.
    transitRouterId String
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime String
    The update time of VPN connection.
    vpnConnectionId String
    The ID of the VPN connection.
    zoneId String
    The zone id of transit router, valid when the attach type is 'TransitRouter'.

    Look up Existing Connection Resource

    Get an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConnectionState, opts?: CustomResourceOptions): Connection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            attach_status: Optional[str] = None,
            attach_type: Optional[str] = None,
            business_status: Optional[str] = None,
            connect_status: Optional[str] = None,
            creation_time: Optional[str] = None,
            customer_gateway_id: Optional[str] = None,
            deleted_time: Optional[str] = None,
            description: Optional[str] = None,
            dpd_action: Optional[str] = None,
            ike_config_auth_alg: Optional[str] = None,
            ike_config_dh_group: Optional[str] = None,
            ike_config_enc_alg: Optional[str] = None,
            ike_config_lifetime: Optional[int] = None,
            ike_config_local_id: Optional[str] = None,
            ike_config_mode: Optional[str] = None,
            ike_config_psk: Optional[str] = None,
            ike_config_remote_id: Optional[str] = None,
            ike_config_version: Optional[str] = None,
            ip_address: Optional[str] = None,
            ipsec_config_auth_alg: Optional[str] = None,
            ipsec_config_dh_group: Optional[str] = None,
            ipsec_config_enc_alg: Optional[str] = None,
            ipsec_config_lifetime: Optional[int] = None,
            local_subnets: Optional[Sequence[str]] = None,
            log_enabled: Optional[bool] = None,
            nat_traversal: Optional[bool] = None,
            negotiate_instantly: Optional[bool] = None,
            overdue_time: Optional[str] = None,
            project_name: Optional[str] = None,
            remote_subnets: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            transit_router_id: Optional[str] = None,
            update_time: Optional[str] = None,
            vpn_connection_id: Optional[str] = None,
            vpn_connection_name: Optional[str] = None,
            vpn_gateway_id: Optional[str] = None,
            zone_id: Optional[str] = None) -> Connection
    func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
    public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
    public static Connection get(String name, Output<String> id, ConnectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The account ID of the VPN connection.
    AttachStatus string
    The IPsec attach status.
    AttachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    BusinessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    ConnectStatus string
    The connect status of the VPN connection.
    CreationTime string
    The create time of VPN connection.
    CustomerGatewayId string
    The ID of the customer gateway.
    DeletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    Description string
    The description of the VPN connection.
    DpdAction string
    The dpd action of the VPN connection.
    IkeConfigAuthAlg 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.
    IkeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    IkeConfigEncAlg 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.
    IkeConfigLifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    IkeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    IkeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    IkeConfigPsk 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.
    IkeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    IkeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    IpAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    IpsecConfigAuthAlg 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.
    IpsecConfigDhGroup 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.
    IpsecConfigEncAlg 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.
    IpsecConfigLifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    LocalSubnets List<string>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    LogEnabled bool
    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.
    NatTraversal bool
    The nat traversal of the VPN connection.
    NegotiateInstantly bool
    Whether to initiate negotiation mode immediately.
    OverdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    ProjectName string
    The project name of the VPN connection.
    RemoteSubnets List<string>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    Status string
    The status of the VPN connection.
    TransitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    UpdateTime string
    The update time of VPN connection.
    VpnConnectionId string
    The ID of the VPN connection.
    VpnConnectionName string
    The name of the VPN connection.
    VpnGatewayId 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.
    ZoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    AccountId string
    The account ID of the VPN connection.
    AttachStatus string
    The IPsec attach status.
    AttachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    BusinessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    ConnectStatus string
    The connect status of the VPN connection.
    CreationTime string
    The create time of VPN connection.
    CustomerGatewayId string
    The ID of the customer gateway.
    DeletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    Description string
    The description of the VPN connection.
    DpdAction string
    The dpd action of the VPN connection.
    IkeConfigAuthAlg 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.
    IkeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    IkeConfigEncAlg 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.
    IkeConfigLifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    IkeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    IkeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    IkeConfigPsk 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.
    IkeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    IkeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    IpAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    IpsecConfigAuthAlg 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.
    IpsecConfigDhGroup 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.
    IpsecConfigEncAlg 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.
    IpsecConfigLifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    LocalSubnets []string
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    LogEnabled bool
    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.
    NatTraversal bool
    The nat traversal of the VPN connection.
    NegotiateInstantly bool
    Whether to initiate negotiation mode immediately.
    OverdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    ProjectName string
    The project name of the VPN connection.
    RemoteSubnets []string
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    Status string
    The status of the VPN connection.
    TransitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    UpdateTime string
    The update time of VPN connection.
    VpnConnectionId string
    The ID of the VPN connection.
    VpnConnectionName string
    The name of the VPN connection.
    VpnGatewayId 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.
    ZoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId String
    The account ID of the VPN connection.
    attachStatus String
    The IPsec attach status.
    attachType String
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    businessStatus String
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus String
    The connect status of the VPN connection.
    creationTime String
    The create time of VPN connection.
    customerGatewayId String
    The ID of the customer gateway.
    deletedTime String
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    description String
    The description of the VPN connection.
    dpdAction String
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup String
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime Integer
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId String
    The local_id of the ike config of the VPN connection.
    ikeConfigMode String
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigPsk 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.
    ikeConfigRemoteId String
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion String
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipAddress String
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime Integer
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    localSubnets List<String>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    logEnabled Boolean
    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.
    natTraversal Boolean
    The nat traversal of the VPN connection.
    negotiateInstantly Boolean
    Whether to initiate negotiation mode immediately.
    overdueTime String
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    projectName String
    The project name of the VPN connection.
    remoteSubnets List<String>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    status String
    The status of the VPN connection.
    transitRouterId String
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime String
    The update time of VPN connection.
    vpnConnectionId String
    The ID of the VPN connection.
    vpnConnectionName String
    The name of the VPN connection.
    vpnGatewayId 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.
    zoneId String
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId string
    The account ID of the VPN connection.
    attachStatus string
    The IPsec attach status.
    attachType string
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    businessStatus string
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus string
    The connect status of the VPN connection.
    creationTime string
    The create time of VPN connection.
    customerGatewayId string
    The ID of the customer gateway.
    deletedTime string
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    description string
    The description of the VPN connection.
    dpdAction string
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup string
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime number
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId string
    The local_id of the ike config of the VPN connection.
    ikeConfigMode string
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigPsk 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.
    ikeConfigRemoteId string
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion string
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipAddress string
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime number
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    localSubnets string[]
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    logEnabled boolean
    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.
    natTraversal boolean
    The nat traversal of the VPN connection.
    negotiateInstantly boolean
    Whether to initiate negotiation mode immediately.
    overdueTime string
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    projectName string
    The project name of the VPN connection.
    remoteSubnets string[]
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    status string
    The status of the VPN connection.
    transitRouterId string
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime string
    The update time of VPN connection.
    vpnConnectionId string
    The ID of the VPN connection.
    vpnConnectionName string
    The name of the VPN connection.
    vpnGatewayId 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.
    zoneId string
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    account_id str
    The account ID of the VPN connection.
    attach_status str
    The IPsec attach status.
    attach_type str
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    business_status str
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connect_status str
    The connect status of the VPN connection.
    creation_time str
    The create time of VPN connection.
    customer_gateway_id str
    The ID of the customer gateway.
    deleted_time str
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    description str
    The description of the VPN connection.
    dpd_action str
    The dpd action of the VPN connection.
    ike_config_auth_alg str
    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.
    ike_config_dh_group str
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ike_config_enc_alg str
    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.
    ike_config_lifetime int
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ike_config_local_id str
    The local_id of the ike config of the VPN connection.
    ike_config_mode str
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ike_config_psk str
    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.
    ike_config_remote_id str
    The remote id of the ike config of the VPN connection.
    ike_config_version str
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ip_address str
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    ipsec_config_auth_alg str
    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.
    ipsec_config_dh_group str
    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.
    ipsec_config_enc_alg str
    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.
    ipsec_config_lifetime int
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    local_subnets Sequence[str]
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    log_enabled bool
    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.
    nat_traversal bool
    The nat traversal of the VPN connection.
    negotiate_instantly bool
    Whether to initiate negotiation mode immediately.
    overdue_time str
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    project_name str
    The project name of the VPN connection.
    remote_subnets Sequence[str]
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    status str
    The status of the VPN connection.
    transit_router_id str
    The id of transit router, valid when the attach type is 'TransitRouter'.
    update_time str
    The update time of VPN connection.
    vpn_connection_id str
    The ID of the VPN connection.
    vpn_connection_name str
    The name of the VPN connection.
    vpn_gateway_id str
    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.
    zone_id str
    The zone id of transit router, valid when the attach type is 'TransitRouter'.
    accountId String
    The account ID of the VPN connection.
    attachStatus String
    The IPsec attach status.
    attachType String
    The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
    businessStatus String
    The business status of IPsec connection, valid when the attach type is 'TransitRouter'.
    connectStatus String
    The connect status of the VPN connection.
    creationTime String
    The create time of VPN connection.
    customerGatewayId String
    The ID of the customer gateway.
    deletedTime String
    The delete time of resource, valid when the attach type is 'TransitRouter'.
    description String
    The description of the VPN connection.
    dpdAction String
    The dpd action of the VPN connection.
    ikeConfigAuthAlg 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.
    ikeConfigDhGroup String
    The dk group of the ike config of the VPN connection. Valid value are group1, group2, group5, group14. The default value is group2.
    ikeConfigEncAlg 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.
    ikeConfigLifetime Number
    The lifetime of the ike config of the VPN connection. Value: 900~86400.
    ikeConfigLocalId String
    The local_id of the ike config of the VPN connection.
    ikeConfigMode String
    The mode of the ike config of the VPN connection. Valid values are main, aggressive, and default value is main.
    ikeConfigPsk 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.
    ikeConfigRemoteId String
    The remote id of the ike config of the VPN connection.
    ikeConfigVersion String
    The version of the ike config of the VPN connection. The value can be ikev1 or ikev2. The default value is ikev1.
    ipAddress String
    The ip address of transit router, valid when the attach type is 'TransitRouter'.
    ipsecConfigAuthAlg 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.
    ipsecConfigDhGroup 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.
    ipsecConfigEncAlg 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.
    ipsecConfigLifetime Number
    The ipsec config of the ike config of the VPN connection. Value: 900~86400.
    localSubnets List<String>
    The local subnet of the VPN connection. Up to 5 network segments are supported.
    logEnabled Boolean
    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.
    natTraversal Boolean
    The nat traversal of the VPN connection.
    negotiateInstantly Boolean
    Whether to initiate negotiation mode immediately.
    overdueTime String
    The overdue time of resource, valid when the attach type is 'TransitRouter'.
    projectName String
    The project name of the VPN connection.
    remoteSubnets List<String>
    The remote subnet of the VPN connection. Up to 5 network segments are supported.
    status String
    The status of the VPN connection.
    transitRouterId String
    The id of transit router, valid when the attach type is 'TransitRouter'.
    updateTime String
    The update time of VPN connection.
    vpnConnectionId String
    The ID of the VPN connection.
    vpnConnectionName String
    The name of the VPN connection.
    vpnGatewayId 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.
    zoneId String
    The zone id of transit router, valid when the attach type is 'TransitRouter'.

    Import

    VpnConnection can be imported using the id, e.g.

     $ pulumi import volcengine:vpn/connection:Connection default vgc-3tex2x1cwd4c6c0v****
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.25 published on Tuesday, Jul 2, 2024 by Volcengine