1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. VpnCustomerGateway
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

tencentcloud.VpnCustomerGateway

Explore with Pulumi AI

Provides a resource to create a VPN customer gateway.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const example = new tencentcloud.VpnCustomerGateway("example", {
    publicIpAddress: "1.1.1.1",
    tags: {
        createBy: "Terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.VpnCustomerGateway("example",
    public_ip_address="1.1.1.1",
    tags={
        "createBy": "Terraform",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.NewVpnCustomerGateway(ctx, "example", &tencentcloud.VpnCustomerGatewayArgs{
			PublicIpAddress: pulumi.String("1.1.1.1"),
			Tags: pulumi.StringMap{
				"createBy": pulumi.String("Terraform"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.VpnCustomerGateway("example", new()
    {
        PublicIpAddress = "1.1.1.1",
        Tags = 
        {
            { "createBy", "Terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.VpnCustomerGateway;
import com.pulumi.tencentcloud.VpnCustomerGatewayArgs;
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 example = new VpnCustomerGateway("example", VpnCustomerGatewayArgs.builder()
            .publicIpAddress("1.1.1.1")
            .tags(Map.of("createBy", "Terraform"))
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:VpnCustomerGateway
    properties:
      publicIpAddress: 1.1.1.1
      tags:
        createBy: Terraform
Copy

Create VpnCustomerGateway Resource

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

Constructor syntax

new VpnCustomerGateway(name: string, args: VpnCustomerGatewayArgs, opts?: CustomResourceOptions);
@overload
def VpnCustomerGateway(resource_name: str,
                       args: VpnCustomerGatewayArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def VpnCustomerGateway(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       public_ip_address: Optional[str] = None,
                       bgp_asn: Optional[float] = None,
                       name: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       vpn_customer_gateway_id: Optional[str] = None)
func NewVpnCustomerGateway(ctx *Context, name string, args VpnCustomerGatewayArgs, opts ...ResourceOption) (*VpnCustomerGateway, error)
public VpnCustomerGateway(string name, VpnCustomerGatewayArgs args, CustomResourceOptions? opts = null)
public VpnCustomerGateway(String name, VpnCustomerGatewayArgs args)
public VpnCustomerGateway(String name, VpnCustomerGatewayArgs args, CustomResourceOptions options)
type: tencentcloud:VpnCustomerGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

VpnCustomerGateway 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 VpnCustomerGateway resource accepts the following input properties:

PublicIpAddress This property is required. string
Public IP of the customer gateway.
BgpAsn double
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
Name string
Name of the customer gateway. The length of character is limited to 1-60.
Tags Dictionary<string, string>
A list of tags used to associate different resources.
VpnCustomerGatewayId string
ID of the resource.
PublicIpAddress This property is required. string
Public IP of the customer gateway.
BgpAsn float64
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
Name string
Name of the customer gateway. The length of character is limited to 1-60.
Tags map[string]string
A list of tags used to associate different resources.
VpnCustomerGatewayId string
ID of the resource.
publicIpAddress This property is required. String
Public IP of the customer gateway.
bgpAsn Double
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
name String
Name of the customer gateway. The length of character is limited to 1-60.
tags Map<String,String>
A list of tags used to associate different resources.
vpnCustomerGatewayId String
ID of the resource.
publicIpAddress This property is required. string
Public IP of the customer gateway.
bgpAsn number
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
name string
Name of the customer gateway. The length of character is limited to 1-60.
tags {[key: string]: string}
A list of tags used to associate different resources.
vpnCustomerGatewayId string
ID of the resource.
public_ip_address This property is required. str
Public IP of the customer gateway.
bgp_asn float
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
name str
Name of the customer gateway. The length of character is limited to 1-60.
tags Mapping[str, str]
A list of tags used to associate different resources.
vpn_customer_gateway_id str
ID of the resource.
publicIpAddress This property is required. String
Public IP of the customer gateway.
bgpAsn Number
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
name String
Name of the customer gateway. The length of character is limited to 1-60.
tags Map<String>
A list of tags used to associate different resources.
vpnCustomerGatewayId String
ID of the resource.

Outputs

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

CreateTime string
Create time of the customer gateway.
Id string
The provider-assigned unique ID for this managed resource.
CreateTime string
Create time of the customer gateway.
Id string
The provider-assigned unique ID for this managed resource.
createTime String
Create time of the customer gateway.
id String
The provider-assigned unique ID for this managed resource.
createTime string
Create time of the customer gateway.
id string
The provider-assigned unique ID for this managed resource.
create_time str
Create time of the customer gateway.
id str
The provider-assigned unique ID for this managed resource.
createTime String
Create time of the customer gateway.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VpnCustomerGateway Resource

Get an existing VpnCustomerGateway 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?: VpnCustomerGatewayState, opts?: CustomResourceOptions): VpnCustomerGateway
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bgp_asn: Optional[float] = None,
        create_time: Optional[str] = None,
        name: Optional[str] = None,
        public_ip_address: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        vpn_customer_gateway_id: Optional[str] = None) -> VpnCustomerGateway
func GetVpnCustomerGateway(ctx *Context, name string, id IDInput, state *VpnCustomerGatewayState, opts ...ResourceOption) (*VpnCustomerGateway, error)
public static VpnCustomerGateway Get(string name, Input<string> id, VpnCustomerGatewayState? state, CustomResourceOptions? opts = null)
public static VpnCustomerGateway get(String name, Output<String> id, VpnCustomerGatewayState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:VpnCustomerGateway    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
BgpAsn double
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
CreateTime string
Create time of the customer gateway.
Name string
Name of the customer gateway. The length of character is limited to 1-60.
PublicIpAddress string
Public IP of the customer gateway.
Tags Dictionary<string, string>
A list of tags used to associate different resources.
VpnCustomerGatewayId string
ID of the resource.
BgpAsn float64
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
CreateTime string
Create time of the customer gateway.
Name string
Name of the customer gateway. The length of character is limited to 1-60.
PublicIpAddress string
Public IP of the customer gateway.
Tags map[string]string
A list of tags used to associate different resources.
VpnCustomerGatewayId string
ID of the resource.
bgpAsn Double
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
createTime String
Create time of the customer gateway.
name String
Name of the customer gateway. The length of character is limited to 1-60.
publicIpAddress String
Public IP of the customer gateway.
tags Map<String,String>
A list of tags used to associate different resources.
vpnCustomerGatewayId String
ID of the resource.
bgpAsn number
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
createTime string
Create time of the customer gateway.
name string
Name of the customer gateway. The length of character is limited to 1-60.
publicIpAddress string
Public IP of the customer gateway.
tags {[key: string]: string}
A list of tags used to associate different resources.
vpnCustomerGatewayId string
ID of the resource.
bgp_asn float
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
create_time str
Create time of the customer gateway.
name str
Name of the customer gateway. The length of character is limited to 1-60.
public_ip_address str
Public IP of the customer gateway.
tags Mapping[str, str]
A list of tags used to associate different resources.
vpn_customer_gateway_id str
ID of the resource.
bgpAsn Number
BGP ASN. Value range: 1 - 4294967295. Using BGP requires configuring ASN. 139341, 45090, and 58835 are not available.
createTime String
Create time of the customer gateway.
name String
Name of the customer gateway. The length of character is limited to 1-60.
publicIpAddress String
Public IP of the customer gateway.
tags Map<String>
A list of tags used to associate different resources.
vpnCustomerGatewayId String
ID of the resource.

Import

VPN customer gateway can be imported using the id, e.g.

$ pulumi import tencentcloud:index/vpnCustomerGateway:VpnCustomerGateway example cgw-xfqag
Copy

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

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.