1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. Dnat
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.Dnat

Explore with Pulumi AI

Provides a resource to create a NAT forwarding.

Example Usage

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

const zones = tencentcloud.getAvailabilityZones({});
const exampleImages = tencentcloud.getImages({
    imageTypes: ["PUBLIC_IMAGE"],
    osName: "TencentOS Server 3.2 (Final)",
});
const instanceTypes = zones.then(zones => tencentcloud.getInstanceTypes({
    filters: [
        {
            name: "zone",
            values: [zones.zones?.[0]?.name],
        },
        {
            name: "instance-family",
            values: ["S5"],
        },
    ],
    cpuCoreCount: 2,
    excludeSoldOut: true,
}));
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
    availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
    vpcId: vpc.vpcId,
    cidrBlock: "10.0.0.0/16",
    isMulticast: false,
});
const eipExample = new tencentcloud.Eip("eipExample", {});
const exampleNatGateway = new tencentcloud.NatGateway("exampleNatGateway", {
    vpcId: vpc.vpcId,
    bandwidth: 100,
    maxConcurrent: 1000000,
    assignedEipSets: [eipExample.publicIp],
    tags: {
        tf_tag_key: "tf_tag_value",
    },
});
const exampleInstance = new tencentcloud.Instance("exampleInstance", {
    instanceName: "tf_example_instance",
    availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
    imageId: exampleImages.then(exampleImages => exampleImages.images?.[0]?.imageId),
    instanceType: instanceTypes.then(instanceTypes => instanceTypes.instanceTypes?.[0]?.instanceType),
    systemDiskType: "CLOUD_PREMIUM",
    systemDiskSize: 50,
    allocatePublicIp: true,
    internetMaxBandwidthOut: 10,
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
});
const exampleDnat = new tencentcloud.Dnat("exampleDnat", {
    vpcId: vpc.vpcId,
    natId: exampleNatGateway.natGatewayId,
    protocol: "TCP",
    elasticIp: eipExample.publicIp,
    elasticPort: "80",
    privateIp: exampleInstance.privateIp,
    privatePort: "9090",
    description: "desc.",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

zones = tencentcloud.get_availability_zones()
example_images = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
    os_name="TencentOS Server 3.2 (Final)")
instance_types = tencentcloud.get_instance_types(filters=[
        {
            "name": "zone",
            "values": [zones.zones[0].name],
        },
        {
            "name": "instance-family",
            "values": ["S5"],
        },
    ],
    cpu_core_count=2,
    exclude_sold_out=True)
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
    availability_zone=zones.zones[0].name,
    vpc_id=vpc.vpc_id,
    cidr_block="10.0.0.0/16",
    is_multicast=False)
eip_example = tencentcloud.Eip("eipExample")
example_nat_gateway = tencentcloud.NatGateway("exampleNatGateway",
    vpc_id=vpc.vpc_id,
    bandwidth=100,
    max_concurrent=1000000,
    assigned_eip_sets=[eip_example.public_ip],
    tags={
        "tf_tag_key": "tf_tag_value",
    })
example_instance = tencentcloud.Instance("exampleInstance",
    instance_name="tf_example_instance",
    availability_zone=zones.zones[0].name,
    image_id=example_images.images[0].image_id,
    instance_type=instance_types.instance_types[0].instance_type,
    system_disk_type="CLOUD_PREMIUM",
    system_disk_size=50,
    allocate_public_ip=True,
    internet_max_bandwidth_out=10,
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id)
example_dnat = tencentcloud.Dnat("exampleDnat",
    vpc_id=vpc.vpc_id,
    nat_id=example_nat_gateway.nat_gateway_id,
    protocol="TCP",
    elastic_ip=eip_example.public_ip,
    elastic_port="80",
    private_ip=example_instance.private_ip,
    private_port="9090",
    description="desc.")
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 {
zones, err := tencentcloud.GetAvailabilityZones(ctx, &tencentcloud.GetAvailabilityZonesArgs{
}, nil);
if err != nil {
return err
}
exampleImages, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
OsName: pulumi.StringRef("TencentOS Server 3.2 (Final)"),
}, nil);
if err != nil {
return err
}
instanceTypes, err := tencentcloud.GetInstanceTypes(ctx, &tencentcloud.GetInstanceTypesArgs{
Filters: []tencentcloud.GetInstanceTypesFilter{
{
Name: "zone",
Values: interface{}{
zones.Zones[0].Name,
},
},
{
Name: "instance-family",
Values: []string{
"S5",
},
},
},
CpuCoreCount: pulumi.Float64Ref(2),
ExcludeSoldOut: pulumi.BoolRef(true),
}, nil);
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
eipExample, err := tencentcloud.NewEip(ctx, "eipExample", nil)
if err != nil {
return err
}
exampleNatGateway, err := tencentcloud.NewNatGateway(ctx, "exampleNatGateway", &tencentcloud.NatGatewayArgs{
VpcId: vpc.VpcId,
Bandwidth: pulumi.Float64(100),
MaxConcurrent: pulumi.Float64(1000000),
AssignedEipSets: pulumi.StringArray{
eipExample.PublicIp,
},
Tags: pulumi.StringMap{
"tf_tag_key": pulumi.String("tf_tag_value"),
},
})
if err != nil {
return err
}
exampleInstance, err := tencentcloud.NewInstance(ctx, "exampleInstance", &tencentcloud.InstanceArgs{
InstanceName: pulumi.String("tf_example_instance"),
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
ImageId: pulumi.String(exampleImages.Images[0].ImageId),
InstanceType: pulumi.String(instanceTypes.InstanceTypes[0].InstanceType),
SystemDiskType: pulumi.String("CLOUD_PREMIUM"),
SystemDiskSize: pulumi.Float64(50),
AllocatePublicIp: pulumi.Bool(true),
InternetMaxBandwidthOut: pulumi.Float64(10),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
})
if err != nil {
return err
}
_, err = tencentcloud.NewDnat(ctx, "exampleDnat", &tencentcloud.DnatArgs{
VpcId: vpc.VpcId,
NatId: exampleNatGateway.NatGatewayId,
Protocol: pulumi.String("TCP"),
ElasticIp: eipExample.PublicIp,
ElasticPort: pulumi.String("80"),
PrivateIp: exampleInstance.PrivateIp,
PrivatePort: pulumi.String("9090"),
Description: pulumi.String("desc."),
})
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 zones = Tencentcloud.GetAvailabilityZones.Invoke();

    var exampleImages = Tencentcloud.GetImages.Invoke(new()
    {
        ImageTypes = new[]
        {
            "PUBLIC_IMAGE",
        },
        OsName = "TencentOS Server 3.2 (Final)",
    });

    var instanceTypes = Tencentcloud.GetInstanceTypes.Invoke(new()
    {
        Filters = new[]
        {
            new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
            {
                Name = "zone",
                Values = new[]
                {
                    zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
                },
            },
            new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
            {
                Name = "instance-family",
                Values = new[]
                {
                    "S5",
                },
            },
        },
        CpuCoreCount = 2,
        ExcludeSoldOut = true,
    });

    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        AvailabilityZone = zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
        VpcId = vpc.VpcId,
        CidrBlock = "10.0.0.0/16",
        IsMulticast = false,
    });

    var eipExample = new Tencentcloud.Eip("eipExample");

    var exampleNatGateway = new Tencentcloud.NatGateway("exampleNatGateway", new()
    {
        VpcId = vpc.VpcId,
        Bandwidth = 100,
        MaxConcurrent = 1000000,
        AssignedEipSets = new[]
        {
            eipExample.PublicIp,
        },
        Tags = 
        {
            { "tf_tag_key", "tf_tag_value" },
        },
    });

    var exampleInstance = new Tencentcloud.Instance("exampleInstance", new()
    {
        InstanceName = "tf_example_instance",
        AvailabilityZone = zones.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Zones[0]?.Name),
        ImageId = exampleImages.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
        InstanceType = instanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType),
        SystemDiskType = "CLOUD_PREMIUM",
        SystemDiskSize = 50,
        AllocatePublicIp = true,
        InternetMaxBandwidthOut = 10,
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
    });

    var exampleDnat = new Tencentcloud.Dnat("exampleDnat", new()
    {
        VpcId = vpc.VpcId,
        NatId = exampleNatGateway.NatGatewayId,
        Protocol = "TCP",
        ElasticIp = eipExample.PublicIp,
        ElasticPort = "80",
        PrivateIp = exampleInstance.PrivateIp,
        PrivatePort = "9090",
        Description = "desc.",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesArgs;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Eip;
import com.pulumi.tencentcloud.NatGateway;
import com.pulumi.tencentcloud.NatGatewayArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.Dnat;
import com.pulumi.tencentcloud.DnatArgs;
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) {
        final var zones = TencentcloudFunctions.getAvailabilityZones();

        final var exampleImages = TencentcloudFunctions.getImages(GetImagesArgs.builder()
            .imageTypes("PUBLIC_IMAGE")
            .osName("TencentOS Server 3.2 (Final)")
            .build());

        final var instanceTypes = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .filters(            
                GetInstanceTypesFilterArgs.builder()
                    .name("zone")
                    .values(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
                    .build(),
                GetInstanceTypesFilterArgs.builder()
                    .name("instance-family")
                    .values("S5")
                    .build())
            .cpuCoreCount(2)
            .excludeSoldOut(true)
            .build());

        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .availabilityZone(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
            .vpcId(vpc.vpcId())
            .cidrBlock("10.0.0.0/16")
            .isMulticast(false)
            .build());

        var eipExample = new Eip("eipExample");

        var exampleNatGateway = new NatGateway("exampleNatGateway", NatGatewayArgs.builder()
            .vpcId(vpc.vpcId())
            .bandwidth(100)
            .maxConcurrent(1000000)
            .assignedEipSets(eipExample.publicIp())
            .tags(Map.of("tf_tag_key", "tf_tag_value"))
            .build());

        var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
            .instanceName("tf_example_instance")
            .availabilityZone(zones.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.zones()[0].name()))
            .imageId(exampleImages.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
            .instanceType(instanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
            .systemDiskType("CLOUD_PREMIUM")
            .systemDiskSize(50)
            .allocatePublicIp(true)
            .internetMaxBandwidthOut(10)
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .build());

        var exampleDnat = new Dnat("exampleDnat", DnatArgs.builder()
            .vpcId(vpc.vpcId())
            .natId(exampleNatGateway.natGatewayId())
            .protocol("TCP")
            .elasticIp(eipExample.publicIp())
            .elasticPort(80)
            .privateIp(exampleInstance.privateIp())
            .privatePort(9090)
            .description("desc.")
            .build());

    }
}
Copy
resources:
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  subnet:
    type: tencentcloud:Subnet
    properties:
      availabilityZone: ${zones.zones[0].name}
      vpcId: ${vpc.vpcId}
      cidrBlock: 10.0.0.0/16
      isMulticast: false
  eipExample:
    type: tencentcloud:Eip
  exampleNatGateway:
    type: tencentcloud:NatGateway
    properties:
      vpcId: ${vpc.vpcId}
      bandwidth: 100
      maxConcurrent: 1e+06
      assignedEipSets:
        - ${eipExample.publicIp}
      tags:
        tf_tag_key: tf_tag_value
  exampleInstance:
    type: tencentcloud:Instance
    properties:
      instanceName: tf_example_instance
      availabilityZone: ${zones.zones[0].name}
      imageId: ${exampleImages.images[0].imageId}
      instanceType: ${instanceTypes.instanceTypes[0].instanceType}
      systemDiskType: CLOUD_PREMIUM
      systemDiskSize: 50
      allocatePublicIp: true
      internetMaxBandwidthOut: 10
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
  exampleDnat:
    type: tencentcloud:Dnat
    properties:
      vpcId: ${vpc.vpcId}
      natId: ${exampleNatGateway.natGatewayId}
      protocol: TCP
      elasticIp: ${eipExample.publicIp}
      elasticPort: 80
      privateIp: ${exampleInstance.privateIp}
      privatePort: 9090
      description: desc.
variables:
  zones:
    fn::invoke:
      function: tencentcloud:getAvailabilityZones
      arguments: {}
  exampleImages:
    fn::invoke:
      function: tencentcloud:getImages
      arguments:
        imageTypes:
          - PUBLIC_IMAGE
        osName: TencentOS Server 3.2 (Final)
  instanceTypes:
    fn::invoke:
      function: tencentcloud:getInstanceTypes
      arguments:
        filters:
          - name: zone
            values:
              - ${zones.zones[0].name}
          - name: instance-family
            values:
              - S5
        cpuCoreCount: 2
        excludeSoldOut: true
Copy

Create Dnat Resource

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

Constructor syntax

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

@overload
def Dnat(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         elastic_ip: Optional[str] = None,
         elastic_port: Optional[str] = None,
         nat_id: Optional[str] = None,
         private_ip: Optional[str] = None,
         private_port: Optional[str] = None,
         protocol: Optional[str] = None,
         vpc_id: Optional[str] = None,
         description: Optional[str] = None,
         dnat_id: Optional[str] = None)
func NewDnat(ctx *Context, name string, args DnatArgs, opts ...ResourceOption) (*Dnat, error)
public Dnat(string name, DnatArgs args, CustomResourceOptions? opts = null)
public Dnat(String name, DnatArgs args)
public Dnat(String name, DnatArgs args, CustomResourceOptions options)
type: tencentcloud:Dnat
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. DnatArgs
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. DnatArgs
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. DnatArgs
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. DnatArgs
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. DnatArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ElasticIp This property is required. string
Network address of the EIP.
ElasticPort This property is required. string
Port of the EIP.
NatId This property is required. string
ID of the NAT gateway.
PrivateIp This property is required. string
Network address of the backend service.
PrivatePort This property is required. string
Port of intranet.
Protocol This property is required. string
Type of the network protocol. Valid value: TCP and UDP.
VpcId This property is required. string
ID of the VPC.
Description string
Description of the NAT forward.
DnatId string
ID of the resource.
ElasticIp This property is required. string
Network address of the EIP.
ElasticPort This property is required. string
Port of the EIP.
NatId This property is required. string
ID of the NAT gateway.
PrivateIp This property is required. string
Network address of the backend service.
PrivatePort This property is required. string
Port of intranet.
Protocol This property is required. string
Type of the network protocol. Valid value: TCP and UDP.
VpcId This property is required. string
ID of the VPC.
Description string
Description of the NAT forward.
DnatId string
ID of the resource.
elasticIp This property is required. String
Network address of the EIP.
elasticPort This property is required. String
Port of the EIP.
natId This property is required. String
ID of the NAT gateway.
privateIp This property is required. String
Network address of the backend service.
privatePort This property is required. String
Port of intranet.
protocol This property is required. String
Type of the network protocol. Valid value: TCP and UDP.
vpcId This property is required. String
ID of the VPC.
description String
Description of the NAT forward.
dnatId String
ID of the resource.
elasticIp This property is required. string
Network address of the EIP.
elasticPort This property is required. string
Port of the EIP.
natId This property is required. string
ID of the NAT gateway.
privateIp This property is required. string
Network address of the backend service.
privatePort This property is required. string
Port of intranet.
protocol This property is required. string
Type of the network protocol. Valid value: TCP and UDP.
vpcId This property is required. string
ID of the VPC.
description string
Description of the NAT forward.
dnatId string
ID of the resource.
elastic_ip This property is required. str
Network address of the EIP.
elastic_port This property is required. str
Port of the EIP.
nat_id This property is required. str
ID of the NAT gateway.
private_ip This property is required. str
Network address of the backend service.
private_port This property is required. str
Port of intranet.
protocol This property is required. str
Type of the network protocol. Valid value: TCP and UDP.
vpc_id This property is required. str
ID of the VPC.
description str
Description of the NAT forward.
dnat_id str
ID of the resource.
elasticIp This property is required. String
Network address of the EIP.
elasticPort This property is required. String
Port of the EIP.
natId This property is required. String
ID of the NAT gateway.
privateIp This property is required. String
Network address of the backend service.
privatePort This property is required. String
Port of intranet.
protocol This property is required. String
Type of the network protocol. Valid value: TCP and UDP.
vpcId This property is required. String
ID of the VPC.
description String
Description of the NAT forward.
dnatId String
ID of the resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Dnat Resource

Get an existing Dnat 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?: DnatState, opts?: CustomResourceOptions): Dnat
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        dnat_id: Optional[str] = None,
        elastic_ip: Optional[str] = None,
        elastic_port: Optional[str] = None,
        nat_id: Optional[str] = None,
        private_ip: Optional[str] = None,
        private_port: Optional[str] = None,
        protocol: Optional[str] = None,
        vpc_id: Optional[str] = None) -> Dnat
func GetDnat(ctx *Context, name string, id IDInput, state *DnatState, opts ...ResourceOption) (*Dnat, error)
public static Dnat Get(string name, Input<string> id, DnatState? state, CustomResourceOptions? opts = null)
public static Dnat get(String name, Output<String> id, DnatState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:Dnat    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:
Description string
Description of the NAT forward.
DnatId string
ID of the resource.
ElasticIp string
Network address of the EIP.
ElasticPort string
Port of the EIP.
NatId string
ID of the NAT gateway.
PrivateIp string
Network address of the backend service.
PrivatePort string
Port of intranet.
Protocol string
Type of the network protocol. Valid value: TCP and UDP.
VpcId string
ID of the VPC.
Description string
Description of the NAT forward.
DnatId string
ID of the resource.
ElasticIp string
Network address of the EIP.
ElasticPort string
Port of the EIP.
NatId string
ID of the NAT gateway.
PrivateIp string
Network address of the backend service.
PrivatePort string
Port of intranet.
Protocol string
Type of the network protocol. Valid value: TCP and UDP.
VpcId string
ID of the VPC.
description String
Description of the NAT forward.
dnatId String
ID of the resource.
elasticIp String
Network address of the EIP.
elasticPort String
Port of the EIP.
natId String
ID of the NAT gateway.
privateIp String
Network address of the backend service.
privatePort String
Port of intranet.
protocol String
Type of the network protocol. Valid value: TCP and UDP.
vpcId String
ID of the VPC.
description string
Description of the NAT forward.
dnatId string
ID of the resource.
elasticIp string
Network address of the EIP.
elasticPort string
Port of the EIP.
natId string
ID of the NAT gateway.
privateIp string
Network address of the backend service.
privatePort string
Port of intranet.
protocol string
Type of the network protocol. Valid value: TCP and UDP.
vpcId string
ID of the VPC.
description str
Description of the NAT forward.
dnat_id str
ID of the resource.
elastic_ip str
Network address of the EIP.
elastic_port str
Port of the EIP.
nat_id str
ID of the NAT gateway.
private_ip str
Network address of the backend service.
private_port str
Port of intranet.
protocol str
Type of the network protocol. Valid value: TCP and UDP.
vpc_id str
ID of the VPC.
description String
Description of the NAT forward.
dnatId String
ID of the resource.
elasticIp String
Network address of the EIP.
elasticPort String
Port of the EIP.
natId String
ID of the NAT gateway.
privateIp String
Network address of the backend service.
privatePort String
Port of intranet.
protocol String
Type of the network protocol. Valid value: TCP and UDP.
vpcId String
ID of the VPC.

Import

NAT forwarding can be imported using the id, e.g.

$ pulumi import tencentcloud:index/dnat:Dnat foo tcp://vpc-asg3sfa3:nat-1asg3t63@127.15.2.3:8080
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.