ucloud.VpnConnection
Explore with Pulumi AI
Provides a IPSec VPN Gateway Connection resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const fooVpc = new ucloud.Vpc("fooVpc", {
tag: "tf-acc",
cidrBlocks: ["192.168.0.0/16"],
});
const fooSubnet = new ucloud.Subnet("fooSubnet", {
tag: "tf-acc",
cidrBlock: "192.168.1.0/24",
vpcId: fooVpc.vpcId,
});
const fooEip = new ucloud.Eip("fooEip", {
bandwidth: 1,
internetType: "bgp",
chargeMode: "bandwidth",
tag: "tf-acc",
});
const fooVpnGateway = new ucloud.VpnGateway("fooVpnGateway", {
vpcId: fooVpc.vpcId,
grade: "standard",
eipId: fooEip.eipId,
tag: "tf-acc",
});
const fooVpnCustomerGateway = new ucloud.VpnCustomerGateway("fooVpnCustomerGateway", {
ipAddress: "10.0.0.1",
tag: "tf-acc",
});
const fooVpnConnection = new ucloud.VpnConnection("fooVpnConnection", {
vpnGatewayId: fooVpnGateway.vpnGatewayId,
customerGatewayId: fooVpnCustomerGateway.vpnCustomerGatewayId,
vpcId: fooVpc.vpcId,
tag: "tf-acc",
remark: "test",
ikeConfig: {
preSharedKey: "test_2019",
},
ipsecConfig: {
localSubnetIds: [fooSubnet.subnetId],
remoteSubnets: ["10.0.0.0/24"],
},
});
import pulumi
import pulumi_ucloud as ucloud
foo_vpc = ucloud.Vpc("fooVpc",
tag="tf-acc",
cidr_blocks=["192.168.0.0/16"])
foo_subnet = ucloud.Subnet("fooSubnet",
tag="tf-acc",
cidr_block="192.168.1.0/24",
vpc_id=foo_vpc.vpc_id)
foo_eip = ucloud.Eip("fooEip",
bandwidth=1,
internet_type="bgp",
charge_mode="bandwidth",
tag="tf-acc")
foo_vpn_gateway = ucloud.VpnGateway("fooVpnGateway",
vpc_id=foo_vpc.vpc_id,
grade="standard",
eip_id=foo_eip.eip_id,
tag="tf-acc")
foo_vpn_customer_gateway = ucloud.VpnCustomerGateway("fooVpnCustomerGateway",
ip_address="10.0.0.1",
tag="tf-acc")
foo_vpn_connection = ucloud.VpnConnection("fooVpnConnection",
vpn_gateway_id=foo_vpn_gateway.vpn_gateway_id,
customer_gateway_id=foo_vpn_customer_gateway.vpn_customer_gateway_id,
vpc_id=foo_vpc.vpc_id,
tag="tf-acc",
remark="test",
ike_config={
"pre_shared_key": "test_2019",
},
ipsec_config={
"local_subnet_ids": [foo_subnet.subnet_id],
"remote_subnets": ["10.0.0.0/24"],
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooVpc, err := ucloud.NewVpc(ctx, "fooVpc", &ucloud.VpcArgs{
Tag: pulumi.String("tf-acc"),
CidrBlocks: pulumi.StringArray{
pulumi.String("192.168.0.0/16"),
},
})
if err != nil {
return err
}
fooSubnet, err := ucloud.NewSubnet(ctx, "fooSubnet", &ucloud.SubnetArgs{
Tag: pulumi.String("tf-acc"),
CidrBlock: pulumi.String("192.168.1.0/24"),
VpcId: fooVpc.VpcId,
})
if err != nil {
return err
}
fooEip, err := ucloud.NewEip(ctx, "fooEip", &ucloud.EipArgs{
Bandwidth: pulumi.Float64(1),
InternetType: pulumi.String("bgp"),
ChargeMode: pulumi.String("bandwidth"),
Tag: pulumi.String("tf-acc"),
})
if err != nil {
return err
}
fooVpnGateway, err := ucloud.NewVpnGateway(ctx, "fooVpnGateway", &ucloud.VpnGatewayArgs{
VpcId: fooVpc.VpcId,
Grade: pulumi.String("standard"),
EipId: fooEip.EipId,
Tag: pulumi.String("tf-acc"),
})
if err != nil {
return err
}
fooVpnCustomerGateway, err := ucloud.NewVpnCustomerGateway(ctx, "fooVpnCustomerGateway", &ucloud.VpnCustomerGatewayArgs{
IpAddress: pulumi.String("10.0.0.1"),
Tag: pulumi.String("tf-acc"),
})
if err != nil {
return err
}
_, err = ucloud.NewVpnConnection(ctx, "fooVpnConnection", &ucloud.VpnConnectionArgs{
VpnGatewayId: fooVpnGateway.VpnGatewayId,
CustomerGatewayId: fooVpnCustomerGateway.VpnCustomerGatewayId,
VpcId: fooVpc.VpcId,
Tag: pulumi.String("tf-acc"),
Remark: pulumi.String("test"),
IkeConfig: &ucloud.VpnConnectionIkeConfigArgs{
PreSharedKey: pulumi.String("test_2019"),
},
IpsecConfig: &ucloud.VpnConnectionIpsecConfigArgs{
LocalSubnetIds: pulumi.StringArray{
fooSubnet.SubnetId,
},
RemoteSubnets: pulumi.StringArray{
pulumi.String("10.0.0.0/24"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var fooVpc = new Ucloud.Vpc("fooVpc", new()
{
Tag = "tf-acc",
CidrBlocks = new[]
{
"192.168.0.0/16",
},
});
var fooSubnet = new Ucloud.Subnet("fooSubnet", new()
{
Tag = "tf-acc",
CidrBlock = "192.168.1.0/24",
VpcId = fooVpc.VpcId,
});
var fooEip = new Ucloud.Eip("fooEip", new()
{
Bandwidth = 1,
InternetType = "bgp",
ChargeMode = "bandwidth",
Tag = "tf-acc",
});
var fooVpnGateway = new Ucloud.VpnGateway("fooVpnGateway", new()
{
VpcId = fooVpc.VpcId,
Grade = "standard",
EipId = fooEip.EipId,
Tag = "tf-acc",
});
var fooVpnCustomerGateway = new Ucloud.VpnCustomerGateway("fooVpnCustomerGateway", new()
{
IpAddress = "10.0.0.1",
Tag = "tf-acc",
});
var fooVpnConnection = new Ucloud.VpnConnection("fooVpnConnection", new()
{
VpnGatewayId = fooVpnGateway.VpnGatewayId,
CustomerGatewayId = fooVpnCustomerGateway.VpnCustomerGatewayId,
VpcId = fooVpc.VpcId,
Tag = "tf-acc",
Remark = "test",
IkeConfig = new Ucloud.Inputs.VpnConnectionIkeConfigArgs
{
PreSharedKey = "test_2019",
},
IpsecConfig = new Ucloud.Inputs.VpnConnectionIpsecConfigArgs
{
LocalSubnetIds = new[]
{
fooSubnet.SubnetId,
},
RemoteSubnets = new[]
{
"10.0.0.0/24",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.Vpc;
import com.pulumi.ucloud.VpcArgs;
import com.pulumi.ucloud.Subnet;
import com.pulumi.ucloud.SubnetArgs;
import com.pulumi.ucloud.Eip;
import com.pulumi.ucloud.EipArgs;
import com.pulumi.ucloud.VpnGateway;
import com.pulumi.ucloud.VpnGatewayArgs;
import com.pulumi.ucloud.VpnCustomerGateway;
import com.pulumi.ucloud.VpnCustomerGatewayArgs;
import com.pulumi.ucloud.VpnConnection;
import com.pulumi.ucloud.VpnConnectionArgs;
import com.pulumi.ucloud.inputs.VpnConnectionIkeConfigArgs;
import com.pulumi.ucloud.inputs.VpnConnectionIpsecConfigArgs;
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()
.tag("tf-acc")
.cidrBlocks("192.168.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.tag("tf-acc")
.cidrBlock("192.168.1.0/24")
.vpcId(fooVpc.vpcId())
.build());
var fooEip = new Eip("fooEip", EipArgs.builder()
.bandwidth(1)
.internetType("bgp")
.chargeMode("bandwidth")
.tag("tf-acc")
.build());
var fooVpnGateway = new VpnGateway("fooVpnGateway", VpnGatewayArgs.builder()
.vpcId(fooVpc.vpcId())
.grade("standard")
.eipId(fooEip.eipId())
.tag("tf-acc")
.build());
var fooVpnCustomerGateway = new VpnCustomerGateway("fooVpnCustomerGateway", VpnCustomerGatewayArgs.builder()
.ipAddress("10.0.0.1")
.tag("tf-acc")
.build());
var fooVpnConnection = new VpnConnection("fooVpnConnection", VpnConnectionArgs.builder()
.vpnGatewayId(fooVpnGateway.vpnGatewayId())
.customerGatewayId(fooVpnCustomerGateway.vpnCustomerGatewayId())
.vpcId(fooVpc.vpcId())
.tag("tf-acc")
.remark("test")
.ikeConfig(VpnConnectionIkeConfigArgs.builder()
.preSharedKey("test_2019")
.build())
.ipsecConfig(VpnConnectionIpsecConfigArgs.builder()
.localSubnetIds(fooSubnet.subnetId())
.remoteSubnets("10.0.0.0/24")
.build())
.build());
}
}
resources:
fooVpc:
type: ucloud:Vpc
properties:
tag: tf-acc
cidrBlocks:
- 192.168.0.0/16
fooSubnet:
type: ucloud:Subnet
properties:
tag: tf-acc
cidrBlock: 192.168.1.0/24
vpcId: ${fooVpc.vpcId}
fooEip:
type: ucloud:Eip
properties:
bandwidth: 1
internetType: bgp
chargeMode: bandwidth
tag: tf-acc
fooVpnGateway:
type: ucloud:VpnGateway
properties:
vpcId: ${fooVpc.vpcId}
grade: standard
eipId: ${fooEip.eipId}
tag: tf-acc
fooVpnCustomerGateway:
type: ucloud:VpnCustomerGateway
properties:
ipAddress: 10.0.0.1
tag: tf-acc
fooVpnConnection:
type: ucloud:VpnConnection
properties:
vpnGatewayId: ${fooVpnGateway.vpnGatewayId}
customerGatewayId: ${fooVpnCustomerGateway.vpnCustomerGatewayId}
vpcId: ${fooVpc.vpcId}
tag: tf-acc
remark: test
ikeConfig:
preSharedKey: test_2019
ipsecConfig:
localSubnetIds:
- ${fooSubnet.subnetId}
remoteSubnets:
- 10.0.0.0/24
Create VpnConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnConnection(name: string, args: VpnConnectionArgs, opts?: CustomResourceOptions);
@overload
def VpnConnection(resource_name: str,
args: VpnConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpnConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
customer_gateway_id: Optional[str] = None,
ike_config: Optional[VpnConnectionIkeConfigArgs] = None,
ipsec_config: Optional[VpnConnectionIpsecConfigArgs] = None,
vpc_id: Optional[str] = None,
vpn_gateway_id: Optional[str] = None,
name: Optional[str] = None,
remark: Optional[str] = None,
tag: Optional[str] = None,
vpn_connection_id: Optional[str] = None)
func NewVpnConnection(ctx *Context, name string, args VpnConnectionArgs, opts ...ResourceOption) (*VpnConnection, error)
public VpnConnection(string name, VpnConnectionArgs args, CustomResourceOptions? opts = null)
public VpnConnection(String name, VpnConnectionArgs args)
public VpnConnection(String name, VpnConnectionArgs args, CustomResourceOptions options)
type: ucloud:VpnConnection
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 VpnConnectionArgs
- 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 VpnConnectionArgs
- 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 VpnConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnConnectionArgs
- 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 vpnConnectionResource = new Ucloud.VpnConnection("vpnConnectionResource", new()
{
CustomerGatewayId = "string",
IkeConfig = new Ucloud.Inputs.VpnConnectionIkeConfigArgs
{
PreSharedKey = "string",
AuthenticationAlgorithm = "string",
DhGroup = "string",
EncryptionAlgorithm = "string",
ExchangeMode = "string",
IkeVersion = "string",
LocalId = "string",
RemoteId = "string",
SaLifeTime = 0,
},
IpsecConfig = new Ucloud.Inputs.VpnConnectionIpsecConfigArgs
{
LocalSubnetIds = new[]
{
"string",
},
RemoteSubnets = new[]
{
"string",
},
AuthenticationAlgorithm = "string",
EncryptionAlgorithm = "string",
PfsDhGroup = "string",
Protocol = "string",
SaLifeTime = 0,
SaLifeTimeBytes = 0,
},
VpcId = "string",
VpnGatewayId = "string",
Name = "string",
Remark = "string",
Tag = "string",
VpnConnectionId = "string",
});
example, err := ucloud.NewVpnConnection(ctx, "vpnConnectionResource", &ucloud.VpnConnectionArgs{
CustomerGatewayId: pulumi.String("string"),
IkeConfig: &.VpnConnectionIkeConfigArgs{
PreSharedKey: pulumi.String("string"),
AuthenticationAlgorithm: pulumi.String("string"),
DhGroup: pulumi.String("string"),
EncryptionAlgorithm: pulumi.String("string"),
ExchangeMode: pulumi.String("string"),
IkeVersion: pulumi.String("string"),
LocalId: pulumi.String("string"),
RemoteId: pulumi.String("string"),
SaLifeTime: pulumi.Float64(0),
},
IpsecConfig: &.VpnConnectionIpsecConfigArgs{
LocalSubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
RemoteSubnets: pulumi.StringArray{
pulumi.String("string"),
},
AuthenticationAlgorithm: pulumi.String("string"),
EncryptionAlgorithm: pulumi.String("string"),
PfsDhGroup: pulumi.String("string"),
Protocol: pulumi.String("string"),
SaLifeTime: pulumi.Float64(0),
SaLifeTimeBytes: pulumi.Float64(0),
},
VpcId: pulumi.String("string"),
VpnGatewayId: pulumi.String("string"),
Name: pulumi.String("string"),
Remark: pulumi.String("string"),
Tag: pulumi.String("string"),
VpnConnectionId: pulumi.String("string"),
})
var vpnConnectionResource = new VpnConnection("vpnConnectionResource", VpnConnectionArgs.builder()
.customerGatewayId("string")
.ikeConfig(VpnConnectionIkeConfigArgs.builder()
.preSharedKey("string")
.authenticationAlgorithm("string")
.dhGroup("string")
.encryptionAlgorithm("string")
.exchangeMode("string")
.ikeVersion("string")
.localId("string")
.remoteId("string")
.saLifeTime(0)
.build())
.ipsecConfig(VpnConnectionIpsecConfigArgs.builder()
.localSubnetIds("string")
.remoteSubnets("string")
.authenticationAlgorithm("string")
.encryptionAlgorithm("string")
.pfsDhGroup("string")
.protocol("string")
.saLifeTime(0)
.saLifeTimeBytes(0)
.build())
.vpcId("string")
.vpnGatewayId("string")
.name("string")
.remark("string")
.tag("string")
.vpnConnectionId("string")
.build());
vpn_connection_resource = ucloud.VpnConnection("vpnConnectionResource",
customer_gateway_id="string",
ike_config={
"pre_shared_key": "string",
"authentication_algorithm": "string",
"dh_group": "string",
"encryption_algorithm": "string",
"exchange_mode": "string",
"ike_version": "string",
"local_id": "string",
"remote_id": "string",
"sa_life_time": 0,
},
ipsec_config={
"local_subnet_ids": ["string"],
"remote_subnets": ["string"],
"authentication_algorithm": "string",
"encryption_algorithm": "string",
"pfs_dh_group": "string",
"protocol": "string",
"sa_life_time": 0,
"sa_life_time_bytes": 0,
},
vpc_id="string",
vpn_gateway_id="string",
name="string",
remark="string",
tag="string",
vpn_connection_id="string")
const vpnConnectionResource = new ucloud.VpnConnection("vpnConnectionResource", {
customerGatewayId: "string",
ikeConfig: {
preSharedKey: "string",
authenticationAlgorithm: "string",
dhGroup: "string",
encryptionAlgorithm: "string",
exchangeMode: "string",
ikeVersion: "string",
localId: "string",
remoteId: "string",
saLifeTime: 0,
},
ipsecConfig: {
localSubnetIds: ["string"],
remoteSubnets: ["string"],
authenticationAlgorithm: "string",
encryptionAlgorithm: "string",
pfsDhGroup: "string",
protocol: "string",
saLifeTime: 0,
saLifeTimeBytes: 0,
},
vpcId: "string",
vpnGatewayId: "string",
name: "string",
remark: "string",
tag: "string",
vpnConnectionId: "string",
});
type: ucloud:VpnConnection
properties:
customerGatewayId: string
ikeConfig:
authenticationAlgorithm: string
dhGroup: string
encryptionAlgorithm: string
exchangeMode: string
ikeVersion: string
localId: string
preSharedKey: string
remoteId: string
saLifeTime: 0
ipsecConfig:
authenticationAlgorithm: string
encryptionAlgorithm: string
localSubnetIds:
- string
pfsDhGroup: string
protocol: string
remoteSubnets:
- string
saLifeTime: 0
saLifeTimeBytes: 0
name: string
remark: string
tag: string
vpcId: string
vpnConnectionId: string
vpnGatewayId: string
VpnConnection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpnConnection resource accepts the following input properties:
- Customer
Gateway stringId - The grade of the VPN Gateway
- Ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- Ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- Vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- Vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- Name string
- Remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - Tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- Customer
Gateway stringId - The grade of the VPN Gateway
- Ike
Config VpnConnection Ike Config Args - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- Ipsec
Config VpnConnection Ipsec Config Args - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- Vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- Vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- Name string
- Remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - Tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- customer
Gateway StringId - The grade of the VPN Gateway
- ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- vpc
Id String - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Gateway StringId - The ID of the VPN Customer Gateway.
- name String
- remark String
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag String
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpn
Connection StringId - The ID of the resource VPN Gateway Connection.
- customer
Gateway stringId - The grade of the VPN Gateway
- ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- name string
- remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- customer_
gateway_ strid - The grade of the VPN Gateway
- ike_
config VpnConnection Ike Config Args - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec_
config VpnConnection Ipsec Config Args - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- vpc_
id str - The ID of VPC linked to the VPN Gateway Connection.
- vpn_
gateway_ strid - The ID of the VPN Customer Gateway.
- name str
- remark str
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag str
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpn_
connection_ strid - The ID of the resource VPN Gateway Connection.
- customer
Gateway StringId - The grade of the VPN Gateway
- ike
Config Property Map - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config Property Map - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- vpc
Id String - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Gateway StringId - The ID of the VPN Customer Gateway.
- name String
- remark String
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag String
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpn
Connection StringId - The ID of the resource VPN Gateway Connection.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnConnection resource produces the following output properties:
- Create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VpnConnection Resource
Get an existing VpnConnection 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?: VpnConnectionState, opts?: CustomResourceOptions): VpnConnection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
customer_gateway_id: Optional[str] = None,
ike_config: Optional[VpnConnectionIkeConfigArgs] = None,
ipsec_config: Optional[VpnConnectionIpsecConfigArgs] = None,
name: Optional[str] = None,
remark: Optional[str] = None,
tag: Optional[str] = None,
vpc_id: Optional[str] = None,
vpn_connection_id: Optional[str] = None,
vpn_gateway_id: Optional[str] = None) -> VpnConnection
func GetVpnConnection(ctx *Context, name string, id IDInput, state *VpnConnectionState, opts ...ResourceOption) (*VpnConnection, error)
public static VpnConnection Get(string name, Input<string> id, VpnConnectionState? state, CustomResourceOptions? opts = null)
public static VpnConnection get(String name, Output<String> id, VpnConnectionState state, CustomResourceOptions options)
resources: _: type: ucloud:VpnConnection get: id: ${id}
- 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.
- Create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- Customer
Gateway stringId - The grade of the VPN Gateway
- Ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- Ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- Name string
- Remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - Tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- Vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- Vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- Create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- Customer
Gateway stringId - The grade of the VPN Gateway
- Ike
Config VpnConnection Ike Config Args - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- Ipsec
Config VpnConnection Ipsec Config Args - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- Name string
- Remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - Tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - Vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- Vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- Vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- create
Time String - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- customer
Gateway StringId - The grade of the VPN Gateway
- ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- name String
- remark String
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag String
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpc
Id String - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Connection StringId - The ID of the resource VPN Gateway Connection.
- vpn
Gateway StringId - The ID of the VPN Customer Gateway.
- create
Time string - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- customer
Gateway stringId - The grade of the VPN Gateway
- ike
Config VpnConnection Ike Config - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config VpnConnection Ipsec Config - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- name string
- remark string
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag string
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpc
Id string - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Connection stringId - The ID of the resource VPN Gateway Connection.
- vpn
Gateway stringId - The ID of the VPN Customer Gateway.
- create_
time str - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- customer_
gateway_ strid - The grade of the VPN Gateway
- ike_
config VpnConnection Ike Config Args - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec_
config VpnConnection Ipsec Config Args - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- name str
- remark str
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag str
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpc_
id str - The ID of VPC linked to the VPN Gateway Connection.
- vpn_
connection_ strid - The ID of the resource VPN Gateway Connection.
- vpn_
gateway_ strid - The ID of the VPN Customer Gateway.
- create
Time String - The creation time for VPN Gateway Connection, formatted in RFC3339 time string.
- customer
Gateway StringId - The grade of the VPN Gateway
- ike
Config Property Map - The configurations of IKE negotiation. Each ike_config supports fields documented below.
- ipsec
Config Property Map - The configurations of IPSec negotiation. Each ipsec_config supports fields documented below.
- name String
- remark String
- The remarks of the VPN Gateway Connection. (Default:
""
). - tag String
- A tag assigned to VPN Gateway Connection, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:
Default
). - vpc
Id String - The ID of VPC linked to the VPN Gateway Connection.
- vpn
Connection StringId - The ID of the resource VPN Gateway Connection.
- vpn
Gateway StringId - The ID of the VPN Customer Gateway.
Supporting Types
VpnConnectionIkeConfig, VpnConnectionIkeConfigArgs
- string
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - Authentication
Algorithm string - Dh
Group string - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - Encryption
Algorithm string - Exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - Ike
Version string - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- Local
Id string - The identification of the VPN gateway.
- Remote
Id string - The identification of the Customer gateway.
- Sa
Life doubleTime
- string
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - Authentication
Algorithm string - Dh
Group string - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - Encryption
Algorithm string - Exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - Ike
Version string - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- Local
Id string - The identification of the VPN gateway.
- Remote
Id string - The identification of the Customer gateway.
- Sa
Life float64Time
- String
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - authentication
Algorithm String - dh
Group String - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - encryption
Algorithm String - exchange
Mode String - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - ike
Version String - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- local
Id String - The identification of the VPN gateway.
- remote
Id String - The identification of the Customer gateway.
- sa
Life DoubleTime
- string
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - authentication
Algorithm string - dh
Group string - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - encryption
Algorithm string - exchange
Mode string - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - ike
Version string - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- local
Id string - The identification of the VPN gateway.
- remote
Id string - The identification of the Customer gateway.
- sa
Life numberTime
- str
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - authentication_
algorithm str - dh_
group str - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - encryption_
algorithm str - exchange_
mode str - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - ike_
version str - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- local_
id str - The identification of the VPN gateway.
- remote_
id str - The identification of the Customer gateway.
- sa_
life_ floattime
- String
- The key used for authentication between the VPN gateway and the Customer gateway which contains 1-128 characters and only support English, numbers and special characters:
!@#$%^&*()_+-=[]:,./'~
. - authentication
Algorithm String - dh
Group String - The Diffie-Hellman group used by IKE negotiation. Possible values:
1
,2
,5
,14
,15
,16
. (Default:15
) - encryption
Algorithm String - exchange
Mode String - The negotiation exchange mode of IKE V1 of VPN gateway. Possible values:
main
(main mode),aggressive
(aggressive mode). (Default:main
) - ike
Version String - The version of the IKE protocol which only be supported IKE V1 protocol at present. Possible values: ikev1. (Default: ikev1)
- local
Id String - The identification of the VPN gateway.
- remote
Id String - The identification of the Customer gateway.
- sa
Life NumberTime
VpnConnectionIpsecConfig, VpnConnectionIpsecConfigArgs
- Local
Subnet List<string>Ids - The id list of Local subnet.
- Remote
Subnets List<string> - The ip address list of remote subnet.
- Authentication
Algorithm string - Encryption
Algorithm string - Pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - Protocol string
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - Sa
Life doubleTime - Sa
Life doubleTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
- Local
Subnet []stringIds - The id list of Local subnet.
- Remote
Subnets []string - The ip address list of remote subnet.
- Authentication
Algorithm string - Encryption
Algorithm string - Pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - Protocol string
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - Sa
Life float64Time - Sa
Life float64Time Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
- local
Subnet List<String>Ids - The id list of Local subnet.
- remote
Subnets List<String> - The ip address list of remote subnet.
- authentication
Algorithm String - encryption
Algorithm String - pfs
Dh StringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - protocol String
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - sa
Life DoubleTime - sa
Life DoubleTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
- local
Subnet string[]Ids - The id list of Local subnet.
- remote
Subnets string[] - The ip address list of remote subnet.
- authentication
Algorithm string - encryption
Algorithm string - pfs
Dh stringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - protocol string
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - sa
Life numberTime - sa
Life numberTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
- local_
subnet_ Sequence[str]ids - The id list of Local subnet.
- remote_
subnets Sequence[str] - The ip address list of remote subnet.
- authentication_
algorithm str - encryption_
algorithm str - pfs_
dh_ strgroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - protocol str
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - sa_
life_ floattime - sa_
life_ floattime_ bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
- local
Subnet List<String>Ids - The id list of Local subnet.
- remote
Subnets List<String> - The ip address list of remote subnet.
- authentication
Algorithm String - encryption
Algorithm String - pfs
Dh StringGroup - Whether the PFS of IPSec negotiation is on or off,
disable
as off, The Diffie-Hellman group as open. Possible values:disable
,1
,2
,5
,14
,15
,16
. (Default:disable
) - protocol String
- The security protocol of IPSec negotiation. Possible values:
esp
,ah
. (Default:esp
) - sa
Life NumberTime - sa
Life NumberTime Bytes - The Security Association lifecycle in bytes as the result of IPSec negotiation. Unit: second. Range: 1200-604800. (Default:
3600
)
Import
VPN Connection can be imported using the id
, e.g.
$ pulumi import ucloud:index/vpnConnection:VpnConnection example vpntunnel-abc123456
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.