published on Monday, Jun 15, 2026 by tencentcloudstack
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:
- Nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- Cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- Nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch Args - NAT CCN switch configuration.
- Cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- nat_
ccn_ objectswitch - NAT CCN switch configuration.
- cfw_
cluster_ stringnat_ fw_ switch_ id - ID of the resource.
- nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- cfw
Cluster StringNat Fw Switch Id - ID of the resource.
- nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- nat_
ccn_ Cfwswitch Cluster Nat Fw Switch Nat Ccn Switch Args - NAT CCN switch configuration.
- cfw_
cluster_ strnat_ fw_ switch_ id - ID of the resource.
- nat
Ccn Property MapSwitch - NAT CCN switch configuration.
- cfw
Cluster StringNat Fw Switch Id - 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) -> CfwClusterNatFwSwitchfunc 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.
- Cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- Nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- Cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- Nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch Args - NAT CCN switch configuration.
- cfw_
cluster_ stringnat_ fw_ switch_ id - ID of the resource.
- nat_
ccn_ objectswitch - NAT CCN switch configuration.
- cfw
Cluster StringNat Fw Switch Id - ID of the resource.
- nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- cfw
Cluster stringNat Fw Switch Id - ID of the resource.
- nat
Ccn CfwSwitch Cluster Nat Fw Switch Nat Ccn Switch - NAT CCN switch configuration.
- cfw_
cluster_ strnat_ fw_ switch_ id - ID of the resource.
- nat_
ccn_ Cfwswitch Cluster Nat Fw Switch Nat Ccn Switch Args - NAT CCN switch configuration.
- cfw
Cluster StringNat Fw Switch Id - ID of the resource.
- nat
Ccn Property MapSwitch - NAT CCN switch configuration.
Supporting Types
CfwClusterNatFwSwitchNatCcnSwitch, CfwClusterNatFwSwitchNatCcnSwitchArgs
- Ccn
Id string - CCN instance ID.
- Nat
Ins stringId - NAT firewall instance ID.
- Switch
Mode double - Switch access mode, 1: automatic access, 2: manual access.
- Access
Instance List<CfwLists Cluster Nat Fw Switch Nat Ccn Switch Access Instance List> - List of access instances.
- Lead
Vpc stringCidr - CIDR of the lead VPC.
- Routing
Mode 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).
- Ccn
Id string - CCN instance ID.
- Nat
Ins stringId - NAT firewall instance ID.
- Switch
Mode float64 - Switch access mode, 1: automatic access, 2: manual access.
- Access
Instance []CfwLists Cluster Nat Fw Switch Nat Ccn Switch Access Instance List - List of access instances.
- Lead
Vpc stringCidr - CIDR of the lead VPC.
- Routing
Mode 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_ stringid - NAT firewall instance ID.
- switch_
mode number - Switch access mode, 1: automatic access, 2: manual access.
- access_
instance_ list(object)lists - List of access instances.
- lead_
vpc_ stringcidr - 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).
- ccn
Id String - CCN instance ID.
- nat
Ins StringId - NAT firewall instance ID.
- switch
Mode Double - Switch access mode, 1: automatic access, 2: manual access.
- access
Instance List<CfwLists Cluster Nat Fw Switch Nat Ccn Switch Access Instance List> - List of access instances.
- lead
Vpc StringCidr - CIDR of the lead VPC.
- routing
Mode 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).
- ccn
Id string - CCN instance ID.
- nat
Ins stringId - NAT firewall instance ID.
- switch
Mode number - Switch access mode, 1: automatic access, 2: manual access.
- access
Instance CfwLists Cluster Nat Fw Switch Nat Ccn Switch Access Instance List[] - List of access instances.
- lead
Vpc stringCidr - 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).
- ccn_
id str - CCN instance ID.
- nat_
ins_ strid - NAT firewall instance ID.
- switch_
mode float - Switch access mode, 1: automatic access, 2: manual access.
- access_
instance_ Sequence[Cfwlists Cluster Nat Fw Switch Nat Ccn Switch Access Instance List] - List of access instances.
- lead_
vpc_ strcidr - 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).
- ccn
Id String - CCN instance ID.
- nat
Ins StringId - NAT firewall instance ID.
- switch
Mode Number - Switch access mode, 1: automatic access, 2: manual access.
- access
Instance List<Property Map>Lists - List of access instances.
- lead
Vpc StringCidr - 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).
CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceList, CfwClusterNatFwSwitchNatCcnSwitchAccessInstanceListArgs
- Access
Cidr doubleMode - 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 List<string>Lists - List of network segments for accessing firewall.
- Access
Cidr float64Mode - 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 []stringLists - List of network segments for accessing firewall.
- access_
cidr_ numbermode - 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_ list(string)lists - List of network segments for accessing firewall.
- access
Cidr DoubleMode - 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 List<String>Lists - List of network segments for accessing firewall.
- access
Cidr numberMode - 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 string[]Lists - List of network segments for accessing firewall.
- access_
cidr_ floatmode - 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_ Sequence[str]lists - List of network segments for accessing firewall.
- access
Cidr NumberMode - 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 List<String>Lists - 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
tencentcloudTerraform Provider.
published on Monday, Jun 15, 2026 by tencentcloudstack