1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. CfwClusterNatFwSwitch
Viewing docs for tencentcloud 1.83.2
published on Monday, Jun 15, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.2
published on Monday, Jun 15, 2026 by tencentcloudstack

    Provides a resource to create a CFW cluster NAT firewall switch

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.CfwClusterNatFwSwitch("example", {natCcnSwitch: {
        natInsId: "nat-h1i1mf4n",
        ccnId: "ccn-p3mlp0tj",
        switchMode: 1,
        routingMode: 1,
        accessInstanceLists: [
            {
                instanceId: "vpc-8za5vlpc",
                instanceType: "VPC",
                instanceRegion: "ap-shanghai",
                accessCidrMode: 1,
                accessCidrLists: ["10.51.0.0/16"],
            },
            {
                instanceId: "vpc-ec6krnpp",
                instanceType: "VPC",
                instanceRegion: "ap-guangzhou",
                accessCidrMode: 1,
                accessCidrLists: ["172.17.0.0/16"],
            },
        ],
    }});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.CfwClusterNatFwSwitch("example", nat_ccn_switch={
        "nat_ins_id": "nat-h1i1mf4n",
        "ccn_id": "ccn-p3mlp0tj",
        "switch_mode": 1,
        "routing_mode": 1,
        "access_instance_lists": [
            {
                "instance_id": "vpc-8za5vlpc",
                "instance_type": "VPC",
                "instance_region": "ap-shanghai",
                "access_cidr_mode": 1,
                "access_cidr_lists": ["10.51.0.0/16"],
            },
            {
                "instance_id": "vpc-ec6krnpp",
                "instance_type": "VPC",
                "instance_region": "ap-guangzhou",
                "access_cidr_mode": 1,
                "access_cidr_lists": ["172.17.0.0/16"],
            },
        ],
    })
    
    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.NewCfwClusterNatFwSwitch(ctx, "example", &tencentcloud.CfwClusterNatFwSwitchArgs{
    			NatCcnSwitch: &tencentcloud.CfwClusterNatFwSwitchNatCcnSwitchArgs{
    				NatInsId:    pulumi.String("nat-h1i1mf4n"),
    				CcnId:       pulumi.String("ccn-p3mlp0tj"),
    				SwitchMode:  pulumi.Float64(1),
    				RoutingMode: pulumi.Float64(1),
    				AccessInstanceLists: tencentcloud.CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArray{
    					&tencentcloud.CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs{
    						InstanceId:     pulumi.String("vpc-8za5vlpc"),
    						InstanceType:   pulumi.String("VPC"),
    						InstanceRegion: pulumi.String("ap-shanghai"),
    						AccessCidrMode: pulumi.Float64(1),
    						AccessCidrLists: pulumi.StringArray{
    							pulumi.String("10.51.0.0/16"),
    						},
    					},
    					&tencentcloud.CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs{
    						InstanceId:     pulumi.String("vpc-ec6krnpp"),
    						InstanceType:   pulumi.String("VPC"),
    						InstanceRegion: pulumi.String("ap-guangzhou"),
    						AccessCidrMode: pulumi.Float64(1),
    						AccessCidrLists: pulumi.StringArray{
    							pulumi.String("172.17.0.0/16"),
    						},
    					},
    				},
    			},
    		})
    		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.CfwClusterNatFwSwitch("example", new()
        {
            NatCcnSwitch = new Tencentcloud.Inputs.CfwClusterNatFwSwitchNatCcnSwitchArgs
            {
                NatInsId = "nat-h1i1mf4n",
                CcnId = "ccn-p3mlp0tj",
                SwitchMode = 1,
                RoutingMode = 1,
                AccessInstanceLists = new[]
                {
                    new Tencentcloud.Inputs.CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs
                    {
                        InstanceId = "vpc-8za5vlpc",
                        InstanceType = "VPC",
                        InstanceRegion = "ap-shanghai",
                        AccessCidrMode = 1,
                        AccessCidrLists = new[]
                        {
                            "10.51.0.0/16",
                        },
                    },
                    new Tencentcloud.Inputs.CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs
                    {
                        InstanceId = "vpc-ec6krnpp",
                        InstanceType = "VPC",
                        InstanceRegion = "ap-guangzhou",
                        AccessCidrMode = 1,
                        AccessCidrLists = new[]
                        {
                            "172.17.0.0/16",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CfwClusterNatFwSwitch;
    import com.pulumi.tencentcloud.CfwClusterNatFwSwitchArgs;
    import com.pulumi.tencentcloud.inputs.CfwClusterNatFwSwitchNatCcnSwitchArgs;
    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 CfwClusterNatFwSwitch("example", CfwClusterNatFwSwitchArgs.builder()
                .natCcnSwitch(CfwClusterNatFwSwitchNatCcnSwitchArgs.builder()
                    .natInsId("nat-h1i1mf4n")
                    .ccnId("ccn-p3mlp0tj")
                    .switchMode(1.0)
                    .routingMode(1.0)
                    .accessInstanceLists(                
                        CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs.builder()
                            .instanceId("vpc-8za5vlpc")
                            .instanceType("VPC")
                            .instanceRegion("ap-shanghai")
                            .accessCidrMode(1.0)
                            .accessCidrLists("10.51.0.0/16")
                            .build(),
                        CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs.builder()
                            .instanceId("vpc-ec6krnpp")
                            .instanceType("VPC")
                            .instanceRegion("ap-guangzhou")
                            .accessCidrMode(1.0)
                            .accessCidrLists("172.17.0.0/16")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:CfwClusterNatFwSwitch
        properties:
          natCcnSwitch:
            natInsId: nat-h1i1mf4n
            ccnId: ccn-p3mlp0tj
            switchMode: 1
            routingMode: 1
            accessInstanceLists:
              - instanceId: vpc-8za5vlpc
                instanceType: VPC
                instanceRegion: ap-shanghai
                accessCidrMode: 1
                accessCidrLists:
                  - 10.51.0.0/16
              - instanceId: vpc-ec6krnpp
                instanceType: VPC
                instanceRegion: ap-guangzhou
                accessCidrMode: 1
                accessCidrLists:
                  - 172.17.0.0/16
    
    Example coming soon!
    

    Create CfwClusterNatFwSwitch Resource

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

    Constructor syntax

    new CfwClusterNatFwSwitch(name: string, args: CfwClusterNatFwSwitchArgs, opts?: CustomResourceOptions);
    @overload
    def CfwClusterNatFwSwitch(resource_name: str,
                              args: CfwClusterNatFwSwitchArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def CfwClusterNatFwSwitch(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              nat_ccn_switch: Optional[CfwClusterNatFwSwitchNatCcnSwitchArgs] = None,
                              cfw_cluster_nat_fw_switch_id: Optional[str] = None)
    func NewCfwClusterNatFwSwitch(ctx *Context, name string, args CfwClusterNatFwSwitchArgs, opts ...ResourceOption) (*CfwClusterNatFwSwitch, error)
    public CfwClusterNatFwSwitch(string name, CfwClusterNatFwSwitchArgs args, CustomResourceOptions? opts = null)
    public CfwClusterNatFwSwitch(String name, CfwClusterNatFwSwitchArgs args)
    public CfwClusterNatFwSwitch(String name, CfwClusterNatFwSwitchArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CfwClusterNatFwSwitch
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_cfwclusternatfwswitch" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args CfwClusterNatFwSwitchArgs
    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 CfwClusterNatFwSwitchArgs
    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 CfwClusterNatFwSwitchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CfwClusterNatFwSwitchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CfwClusterNatFwSwitchArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    NatCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    CfwClusterNatFwSwitchId string
    ID of the resource.
    NatCcnSwitch CfwClusterNatFwSwitchNatCcnSwitchArgs
    NAT CCN switch configuration.
    CfwClusterNatFwSwitchId string
    ID of the resource.
    nat_ccn_switch object
    NAT CCN switch configuration.
    cfw_cluster_nat_fw_switch_id string
    ID of the resource.
    natCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId String
    ID of the resource.
    natCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId string
    ID of the resource.
    nat_ccn_switch CfwClusterNatFwSwitchNatCcnSwitchArgs
    NAT CCN switch configuration.
    cfw_cluster_nat_fw_switch_id str
    ID of the resource.
    natCcnSwitch Property Map
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId String
    ID of the resource.

    Outputs

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

    Get an existing CfwClusterNatFwSwitch 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?: CfwClusterNatFwSwitchState, opts?: CustomResourceOptions): CfwClusterNatFwSwitch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cfw_cluster_nat_fw_switch_id: Optional[str] = None,
            nat_ccn_switch: Optional[CfwClusterNatFwSwitchNatCcnSwitchArgs] = None) -> CfwClusterNatFwSwitch
    func GetCfwClusterNatFwSwitch(ctx *Context, name string, id IDInput, state *CfwClusterNatFwSwitchState, opts ...ResourceOption) (*CfwClusterNatFwSwitch, error)
    public static CfwClusterNatFwSwitch Get(string name, Input<string> id, CfwClusterNatFwSwitchState? state, CustomResourceOptions? opts = null)
    public static CfwClusterNatFwSwitch get(String name, Output<String> id, CfwClusterNatFwSwitchState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CfwClusterNatFwSwitch    get:      id: ${id}
    import {
      to = tencentcloud_cfwclusternatfwswitch.example
      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:
    CfwClusterNatFwSwitchId string
    ID of the resource.
    NatCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    CfwClusterNatFwSwitchId string
    ID of the resource.
    NatCcnSwitch CfwClusterNatFwSwitchNatCcnSwitchArgs
    NAT CCN switch configuration.
    cfw_cluster_nat_fw_switch_id string
    ID of the resource.
    nat_ccn_switch object
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId String
    ID of the resource.
    natCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId string
    ID of the resource.
    natCcnSwitch CfwClusterNatFwSwitchNatCcnSwitch
    NAT CCN switch configuration.
    cfw_cluster_nat_fw_switch_id str
    ID of the resource.
    nat_ccn_switch CfwClusterNatFwSwitchNatCcnSwitchArgs
    NAT CCN switch configuration.
    cfwClusterNatFwSwitchId String
    ID of the resource.
    natCcnSwitch Property Map
    NAT CCN switch configuration.

    Supporting Types

    CfwClusterNatFwSwitchNatCcnSwitch, CfwClusterNatFwSwitchNatCcnSwitchArgs

    CcnId string
    CCN instance ID.
    NatInsId string
    NAT firewall instance ID.
    SwitchMode double
    Switch access mode, 1: automatic access, 2: manual access.
    AccessInstanceLists List<CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList>
    List of access instances.
    LeadVpcCidr string
    CIDR of the lead VPC.
    RoutingMode double
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    CcnId string
    CCN instance ID.
    NatInsId string
    NAT firewall instance ID.
    SwitchMode float64
    Switch access mode, 1: automatic access, 2: manual access.
    AccessInstanceLists []CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList
    List of access instances.
    LeadVpcCidr string
    CIDR of the lead VPC.
    RoutingMode float64
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    ccn_id string
    CCN instance ID.
    nat_ins_id string
    NAT firewall instance ID.
    switch_mode number
    Switch access mode, 1: automatic access, 2: manual access.
    access_instance_lists list(object)
    List of access instances.
    lead_vpc_cidr string
    CIDR of the lead VPC.
    routing_mode number
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    ccnId String
    CCN instance ID.
    natInsId String
    NAT firewall instance ID.
    switchMode Double
    Switch access mode, 1: automatic access, 2: manual access.
    accessInstanceLists List<CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList>
    List of access instances.
    leadVpcCidr String
    CIDR of the lead VPC.
    routingMode Double
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    ccnId string
    CCN instance ID.
    natInsId string
    NAT firewall instance ID.
    switchMode number
    Switch access mode, 1: automatic access, 2: manual access.
    accessInstanceLists CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList[]
    List of access instances.
    leadVpcCidr string
    CIDR of the lead VPC.
    routingMode number
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    ccn_id str
    CCN instance ID.
    nat_ins_id str
    NAT firewall instance ID.
    switch_mode float
    Switch access mode, 1: automatic access, 2: manual access.
    access_instance_lists Sequence[CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList]
    List of access instances.
    lead_vpc_cidr str
    CIDR of the lead VPC.
    routing_mode float
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).
    ccnId String
    CCN instance ID.
    natInsId String
    NAT firewall instance ID.
    switchMode Number
    Switch access mode, 1: automatic access, 2: manual access.
    accessInstanceLists List<Property Map>
    List of access instances.
    leadVpcCidr String
    CIDR of the lead VPC.
    routingMode Number
    Traffic steering routing method, 0: multi-route table, 1: policy routing. Automatic access mode only supports policy routing (1); manual access mode supports both multi-route table (0) and policy routing (1).

    CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList, CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs

    AccessCidrMode double
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    InstanceId string
    Instance ID.
    InstanceRegion string
    Region where the instance is located.
    InstanceType string
    Instance type such as VPC or DIRECTCONNECT.
    AccessCidrLists List<string>
    List of network segments for accessing firewall.
    AccessCidrMode float64
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    InstanceId string
    Instance ID.
    InstanceRegion string
    Region where the instance is located.
    InstanceType string
    Instance type such as VPC or DIRECTCONNECT.
    AccessCidrLists []string
    List of network segments for accessing firewall.
    access_cidr_mode number
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    instance_id string
    Instance ID.
    instance_region string
    Region where the instance is located.
    instance_type string
    Instance type such as VPC or DIRECTCONNECT.
    access_cidr_lists list(string)
    List of network segments for accessing firewall.
    accessCidrMode Double
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    instanceId String
    Instance ID.
    instanceRegion String
    Region where the instance is located.
    instanceType String
    Instance type such as VPC or DIRECTCONNECT.
    accessCidrLists List<String>
    List of network segments for accessing firewall.
    accessCidrMode number
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    instanceId string
    Instance ID.
    instanceRegion string
    Region where the instance is located.
    instanceType string
    Instance type such as VPC or DIRECTCONNECT.
    accessCidrLists string[]
    List of network segments for accessing firewall.
    access_cidr_mode float
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    instance_id str
    Instance ID.
    instance_region str
    Region where the instance is located.
    instance_type str
    Instance type such as VPC or DIRECTCONNECT.
    access_cidr_lists Sequence[str]
    List of network segments for accessing firewall.
    accessCidrMode Number
    Network segment mode for accessing firewall: 0-no access, 1-access all network segments associated with the instance, 2-access user-defined network segments.
    instanceId String
    Instance ID.
    instanceRegion String
    Region where the instance is located.
    instanceType String
    Instance type such as VPC or DIRECTCONNECT.
    accessCidrLists List<String>
    List of network segments for accessing firewall.

    Import

    CFW cluster NAT firewall switch can be imported using the composite id nat_ins_id#ccn_id, e.g.

    $ pulumi import tencentcloud:index/cfwClusterNatFwSwitch:CfwClusterNatFwSwitch example nat-h1i1mf4n#ccn-p3mlp0tj
    

    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.
    Viewing docs for tencentcloud 1.83.2
    published on Monday, Jun 15, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial