1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CfwNatInstance
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CfwNatInstance

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cfw nat_instance

    Example Usage

    If mode is 0

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CfwNatInstance("example", {
        crossAZone: 0,
        mode: 0,
        newModeItems: {
            eips: ["152.136.168.192"],
            vpcLists: ["vpc-5063ta4i"],
        },
        width: 20,
        zoneSets: ["ap-guangzhou-7"],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CfwNatInstance("example",
        cross_a_zone=0,
        mode=0,
        new_mode_items={
            "eips": ["152.136.168.192"],
            "vpc_lists": ["vpc-5063ta4i"],
        },
        width=20,
        zone_sets=["ap-guangzhou-7"])
    
    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.NewCfwNatInstance(ctx, "example", &tencentcloud.CfwNatInstanceArgs{
    			CrossAZone: pulumi.Float64(0),
    			Mode:       pulumi.Float64(0),
    			NewModeItems: &tencentcloud.CfwNatInstanceNewModeItemsArgs{
    				Eips: pulumi.StringArray{
    					pulumi.String("152.136.168.192"),
    				},
    				VpcLists: pulumi.StringArray{
    					pulumi.String("vpc-5063ta4i"),
    				},
    			},
    			Width: pulumi.Float64(20),
    			ZoneSets: pulumi.StringArray{
    				pulumi.String("ap-guangzhou-7"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.CfwNatInstance("example", new()
        {
            CrossAZone = 0,
            Mode = 0,
            NewModeItems = new Tencentcloud.Inputs.CfwNatInstanceNewModeItemsArgs
            {
                Eips = new[]
                {
                    "152.136.168.192",
                },
                VpcLists = new[]
                {
                    "vpc-5063ta4i",
                },
            },
            Width = 20,
            ZoneSets = new[]
            {
                "ap-guangzhou-7",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CfwNatInstance;
    import com.pulumi.tencentcloud.CfwNatInstanceArgs;
    import com.pulumi.tencentcloud.inputs.CfwNatInstanceNewModeItemsArgs;
    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 CfwNatInstance("example", CfwNatInstanceArgs.builder()
                .crossAZone(0)
                .mode(0)
                .newModeItems(CfwNatInstanceNewModeItemsArgs.builder()
                    .eips("152.136.168.192")
                    .vpcLists("vpc-5063ta4i")
                    .build())
                .width(20)
                .zoneSets("ap-guangzhou-7")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CfwNatInstance
        properties:
          crossAZone: 0
          mode: 0
          newModeItems:
            eips:
              - 152.136.168.192
            vpcLists:
              - vpc-5063ta4i
          width: 20
          zoneSets:
            - ap-guangzhou-7
    

    If mode is 1

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CfwNatInstance("example", {
        crossAZone: 0,
        mode: 1,
        natGwLists: ["nat-9wwkz1kr"],
        width: 20,
        zoneSets: [
            "ap-guangzhou-6",
            "ap-guangzhou-7",
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CfwNatInstance("example",
        cross_a_zone=0,
        mode=1,
        nat_gw_lists=["nat-9wwkz1kr"],
        width=20,
        zone_sets=[
            "ap-guangzhou-6",
            "ap-guangzhou-7",
        ])
    
    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.NewCfwNatInstance(ctx, "example", &tencentcloud.CfwNatInstanceArgs{
    			CrossAZone: pulumi.Float64(0),
    			Mode:       pulumi.Float64(1),
    			NatGwLists: pulumi.StringArray{
    				pulumi.String("nat-9wwkz1kr"),
    			},
    			Width: pulumi.Float64(20),
    			ZoneSets: pulumi.StringArray{
    				pulumi.String("ap-guangzhou-6"),
    				pulumi.String("ap-guangzhou-7"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.CfwNatInstance("example", new()
        {
            CrossAZone = 0,
            Mode = 1,
            NatGwLists = new[]
            {
                "nat-9wwkz1kr",
            },
            Width = 20,
            ZoneSets = new[]
            {
                "ap-guangzhou-6",
                "ap-guangzhou-7",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CfwNatInstance;
    import com.pulumi.tencentcloud.CfwNatInstanceArgs;
    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 CfwNatInstance("example", CfwNatInstanceArgs.builder()
                .crossAZone(0)
                .mode(1)
                .natGwLists("nat-9wwkz1kr")
                .width(20)
                .zoneSets(            
                    "ap-guangzhou-6",
                    "ap-guangzhou-7")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CfwNatInstance
        properties:
          crossAZone: 0
          mode: 1
          natGwLists:
            - nat-9wwkz1kr
          width: 20
          zoneSets:
            - ap-guangzhou-6
            - ap-guangzhou-7
    

    Create CfwNatInstance Resource

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

    Constructor syntax

    new CfwNatInstance(name: string, args: CfwNatInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def CfwNatInstance(resource_name: str,
                       args: CfwNatInstanceArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CfwNatInstance(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       mode: Optional[float] = None,
                       width: Optional[float] = None,
                       zone_sets: Optional[Sequence[str]] = None,
                       cfw_nat_instance_id: Optional[str] = None,
                       cross_a_zone: Optional[float] = None,
                       name: Optional[str] = None,
                       nat_gw_lists: Optional[Sequence[str]] = None,
                       new_mode_items: Optional[CfwNatInstanceNewModeItemsArgs] = None)
    func NewCfwNatInstance(ctx *Context, name string, args CfwNatInstanceArgs, opts ...ResourceOption) (*CfwNatInstance, error)
    public CfwNatInstance(string name, CfwNatInstanceArgs args, CustomResourceOptions? opts = null)
    public CfwNatInstance(String name, CfwNatInstanceArgs args)
    public CfwNatInstance(String name, CfwNatInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CfwNatInstance
    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 CfwNatInstanceArgs
    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 CfwNatInstanceArgs
    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 CfwNatInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CfwNatInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CfwNatInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Mode double
    Mode 1: access mode; 0: new mode.
    Width double
    Bandwidth.
    ZoneSets List<string>
    Zone list.
    CfwNatInstanceId string
    ID of the resource.
    CrossAZone double
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    Name string
    Firewall instance name.
    NatGwLists List<string>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    NewModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    Mode float64
    Mode 1: access mode; 0: new mode.
    Width float64
    Bandwidth.
    ZoneSets []string
    Zone list.
    CfwNatInstanceId string
    ID of the resource.
    CrossAZone float64
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    Name string
    Firewall instance name.
    NatGwLists []string
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    NewModeItems CfwNatInstanceNewModeItemsArgs
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    mode Double
    Mode 1: access mode; 0: new mode.
    width Double
    Bandwidth.
    zoneSets List<String>
    Zone list.
    cfwNatInstanceId String
    ID of the resource.
    crossAZone Double
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    name String
    Firewall instance name.
    natGwLists List<String>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    mode number
    Mode 1: access mode; 0: new mode.
    width number
    Bandwidth.
    zoneSets string[]
    Zone list.
    cfwNatInstanceId string
    ID of the resource.
    crossAZone number
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    name string
    Firewall instance name.
    natGwLists string[]
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    mode float
    Mode 1: access mode; 0: new mode.
    width float
    Bandwidth.
    zone_sets Sequence[str]
    Zone list.
    cfw_nat_instance_id str
    ID of the resource.
    cross_a_zone float
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    name str
    Firewall instance name.
    nat_gw_lists Sequence[str]
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    new_mode_items CfwNatInstanceNewModeItemsArgs
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    mode Number
    Mode 1: access mode; 0: new mode.
    width Number
    Bandwidth.
    zoneSets List<String>
    Zone list.
    cfwNatInstanceId String
    ID of the resource.
    crossAZone Number
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    name String
    Firewall instance name.
    natGwLists List<String>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems Property Map
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CfwNatInstance 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 CfwNatInstance Resource

    Get an existing CfwNatInstance 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?: CfwNatInstanceState, opts?: CustomResourceOptions): CfwNatInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cfw_nat_instance_id: Optional[str] = None,
            cross_a_zone: Optional[float] = None,
            mode: Optional[float] = None,
            name: Optional[str] = None,
            nat_gw_lists: Optional[Sequence[str]] = None,
            new_mode_items: Optional[CfwNatInstanceNewModeItemsArgs] = None,
            width: Optional[float] = None,
            zone_sets: Optional[Sequence[str]] = None) -> CfwNatInstance
    func GetCfwNatInstance(ctx *Context, name string, id IDInput, state *CfwNatInstanceState, opts ...ResourceOption) (*CfwNatInstance, error)
    public static CfwNatInstance Get(string name, Input<string> id, CfwNatInstanceState? state, CustomResourceOptions? opts = null)
    public static CfwNatInstance get(String name, Output<String> id, CfwNatInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CfwNatInstance    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.
    The following state arguments are supported:
    CfwNatInstanceId string
    ID of the resource.
    CrossAZone double
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    Mode double
    Mode 1: access mode; 0: new mode.
    Name string
    Firewall instance name.
    NatGwLists List<string>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    NewModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    Width double
    Bandwidth.
    ZoneSets List<string>
    Zone list.
    CfwNatInstanceId string
    ID of the resource.
    CrossAZone float64
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    Mode float64
    Mode 1: access mode; 0: new mode.
    Name string
    Firewall instance name.
    NatGwLists []string
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    NewModeItems CfwNatInstanceNewModeItemsArgs
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    Width float64
    Bandwidth.
    ZoneSets []string
    Zone list.
    cfwNatInstanceId String
    ID of the resource.
    crossAZone Double
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    mode Double
    Mode 1: access mode; 0: new mode.
    name String
    Firewall instance name.
    natGwLists List<String>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    width Double
    Bandwidth.
    zoneSets List<String>
    Zone list.
    cfwNatInstanceId string
    ID of the resource.
    crossAZone number
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    mode number
    Mode 1: access mode; 0: new mode.
    name string
    Firewall instance name.
    natGwLists string[]
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems CfwNatInstanceNewModeItems
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    width number
    Bandwidth.
    zoneSets string[]
    Zone list.
    cfw_nat_instance_id str
    ID of the resource.
    cross_a_zone float
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    mode float
    Mode 1: access mode; 0: new mode.
    name str
    Firewall instance name.
    nat_gw_lists Sequence[str]
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    new_mode_items CfwNatInstanceNewModeItemsArgs
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    width float
    Bandwidth.
    zone_sets Sequence[str]
    Zone list.
    cfwNatInstanceId String
    ID of the resource.
    crossAZone Number
    Off-site disaster recovery 1: use off-site disaster recovery; 0: do not use off-site disaster recovery; if empty, the default is not to use off-site disaster recovery.
    mode Number
    Mode 1: access mode; 0: new mode.
    name String
    Firewall instance name.
    natGwLists List<String>
    A list of nat gateways connected to the access mode, at least one of NewModeItems and NatgwList is passed.
    newModeItems Property Map
    New mode passing parameters are added, at least one of new_mode_items and nat_gw_list is passed.
    width Number
    Bandwidth.
    zoneSets List<String>
    Zone list.

    Supporting Types

    CfwNatInstanceNewModeItems, CfwNatInstanceNewModeItemsArgs

    Eips List<string>
    List of egress elastic public network IPs bound in the new mode.
    VpcLists List<string>
    List of vpcs connected in new mode.
    Eips []string
    List of egress elastic public network IPs bound in the new mode.
    VpcLists []string
    List of vpcs connected in new mode.
    eips List<String>
    List of egress elastic public network IPs bound in the new mode.
    vpcLists List<String>
    List of vpcs connected in new mode.
    eips string[]
    List of egress elastic public network IPs bound in the new mode.
    vpcLists string[]
    List of vpcs connected in new mode.
    eips Sequence[str]
    List of egress elastic public network IPs bound in the new mode.
    vpc_lists Sequence[str]
    List of vpcs connected in new mode.
    eips List<String>
    List of egress elastic public network IPs bound in the new mode.
    vpcLists List<String>
    List of vpcs connected in new mode.

    Import

    cfw nat_instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/cfwNatInstance:CfwNatInstance example cfwnat-54a21421
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack