published on Friday, Nov 6, 2026 by tencentcloudstack
published on Friday, Nov 6, 2026 by tencentcloudstack
Provides a resource to create a FWM NAT ACL rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.FwmNatAclRule("example", {
groupId: "fwmrg-in3q0qkq0n",
direction: 0,
sourceContent: "0.0.0.0/0",
sourceType: "net",
targetContent: "0.0.0.0/0",
targetType: "net",
protocol: "ANY",
ruleAction: "accept",
scope: "ALL",
port: "-1/-1",
description: "remark.",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.FwmNatAclRule("example",
group_id="fwmrg-in3q0qkq0n",
direction=0,
source_content="0.0.0.0/0",
source_type="net",
target_content="0.0.0.0/0",
target_type="net",
protocol="ANY",
rule_action="accept",
scope="ALL",
port="-1/-1",
description="remark.")
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.NewFwmNatAclRule(ctx, "example", &tencentcloud.FwmNatAclRuleArgs{
GroupId: pulumi.String("fwmrg-in3q0qkq0n"),
Direction: pulumi.Float64(0),
SourceContent: pulumi.String("0.0.0.0/0"),
SourceType: pulumi.String("net"),
TargetContent: pulumi.String("0.0.0.0/0"),
TargetType: pulumi.String("net"),
Protocol: pulumi.String("ANY"),
RuleAction: pulumi.String("accept"),
Scope: pulumi.String("ALL"),
Port: pulumi.String("-1/-1"),
Description: pulumi.String("remark."),
})
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.FwmNatAclRule("example", new()
{
GroupId = "fwmrg-in3q0qkq0n",
Direction = 0,
SourceContent = "0.0.0.0/0",
SourceType = "net",
TargetContent = "0.0.0.0/0",
TargetType = "net",
Protocol = "ANY",
RuleAction = "accept",
Scope = "ALL",
Port = "-1/-1",
Description = "remark.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.FwmNatAclRule;
import com.pulumi.tencentcloud.FwmNatAclRuleArgs;
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 FwmNatAclRule("example", FwmNatAclRuleArgs.builder()
.groupId("fwmrg-in3q0qkq0n")
.direction(0.0)
.sourceContent("0.0.0.0/0")
.sourceType("net")
.targetContent("0.0.0.0/0")
.targetType("net")
.protocol("ANY")
.ruleAction("accept")
.scope("ALL")
.port("-1/-1")
.description("remark.")
.build());
}
}
resources:
example:
type: tencentcloud:FwmNatAclRule
properties:
groupId: fwmrg-in3q0qkq0n
direction: 0
sourceContent: 0.0.0.0/0
sourceType: net
targetContent: 0.0.0.0/0
targetType: net
protocol: ANY
ruleAction: accept
scope: ALL
port: -1/-1
description: remark.
Example coming soon!
API Reference
This resource interacts with the following TencentCloud APIs:
- Create: CreateNatAclRule
- Read: DescribeNatAclRules
- Update: ModifyNatAclRule
- Delete: DeleteNatAclRule
Create FwmNatAclRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FwmNatAclRule(name: string, args: FwmNatAclRuleArgs, opts?: CustomResourceOptions);@overload
def FwmNatAclRule(resource_name: str,
args: FwmNatAclRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FwmNatAclRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
scope: Optional[str] = None,
target_type: Optional[str] = None,
direction: Optional[float] = None,
target_content: Optional[str] = None,
group_id: Optional[str] = None,
source_type: Optional[str] = None,
source_content: Optional[str] = None,
protocol: Optional[str] = None,
rule_action: Optional[str] = None,
fwm_nat_acl_rule_id: Optional[str] = None,
port: Optional[str] = None,
param_template_id: Optional[str] = None,
belong_member_id: Optional[str] = None,
description: Optional[str] = None)func NewFwmNatAclRule(ctx *Context, name string, args FwmNatAclRuleArgs, opts ...ResourceOption) (*FwmNatAclRule, error)public FwmNatAclRule(string name, FwmNatAclRuleArgs args, CustomResourceOptions? opts = null)
public FwmNatAclRule(String name, FwmNatAclRuleArgs args)
public FwmNatAclRule(String name, FwmNatAclRuleArgs args, CustomResourceOptions options)
type: tencentcloud:FwmNatAclRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_fwm_nat_acl_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FwmNatAclRuleArgs
- 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 FwmNatAclRuleArgs
- 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 FwmNatAclRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FwmNatAclRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FwmNatAclRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
FwmNatAclRule 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 FwmNatAclRule resource accepts the following input properties:
- Direction double
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- Group
Id string - Rule group ID.
- Protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- Rule
Action string - Action: accept/drop/log (lowercase).
- Scope string
- Effective range: ALL/region/nat-instance-id.
- Source
Content string - Source address content.
- Source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- Target
Content string - Target address content.
- Target
Type string - Target type (same enum as source_type).
- Belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- Description string
- Rule description.
- Fwm
Nat stringAcl Rule Id - ID of the resource.
- Param
Template stringId - Port template ID.
- Port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- Direction float64
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- Group
Id string - Rule group ID.
- Protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- Rule
Action string - Action: accept/drop/log (lowercase).
- Scope string
- Effective range: ALL/region/nat-instance-id.
- Source
Content string - Source address content.
- Source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- Target
Content string - Target address content.
- Target
Type string - Target type (same enum as source_type).
- Belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- Description string
- Rule description.
- Fwm
Nat stringAcl Rule Id - ID of the resource.
- Param
Template stringId - Port template ID.
- Port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- direction number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- group_
id string - Rule group ID.
- protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule_
action string - Action: accept/drop/log (lowercase).
- scope string
- Effective range: ALL/region/nat-instance-id.
- source_
content string - Source address content.
- source_
type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target_
content string - Target address content.
- target_
type string - Target type (same enum as source_type).
- belong_
member_ stringid - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description string
- Rule description.
- fwm_
nat_ stringacl_ rule_ id - ID of the resource.
- param_
template_ stringid - Port template ID.
- port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- direction Double
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- group
Id String - Rule group ID.
- protocol String
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action String - Action: accept/drop/log (lowercase).
- scope String
- Effective range: ALL/region/nat-instance-id.
- source
Content String - Source address content.
- source
Type String - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content String - Target address content.
- target
Type String - Target type (same enum as source_type).
- belong
Member StringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description String
- Rule description.
- fwm
Nat StringAcl Rule Id - ID of the resource.
- param
Template StringId - Port template ID.
- port String
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- direction number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- group
Id string - Rule group ID.
- protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action string - Action: accept/drop/log (lowercase).
- scope string
- Effective range: ALL/region/nat-instance-id.
- source
Content string - Source address content.
- source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content string - Target address content.
- target
Type string - Target type (same enum as source_type).
- belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description string
- Rule description.
- fwm
Nat stringAcl Rule Id - ID of the resource.
- param
Template stringId - Port template ID.
- port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- direction float
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- group_
id str - Rule group ID.
- protocol str
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule_
action str - Action: accept/drop/log (lowercase).
- scope str
- Effective range: ALL/region/nat-instance-id.
- source_
content str - Source address content.
- source_
type str - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target_
content str - Target address content.
- target_
type str - Target type (same enum as source_type).
- belong_
member_ strid - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description str
- Rule description.
- fwm_
nat_ stracl_ rule_ id - ID of the resource.
- param_
template_ strid - Port template ID.
- port str
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- direction Number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- group
Id String - Rule group ID.
- protocol String
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action String - Action: accept/drop/log (lowercase).
- scope String
- Effective range: ALL/region/nat-instance-id.
- source
Content String - Source address content.
- source
Type String - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content String - Target address content.
- target
Type String - Target type (same enum as source_type).
- belong
Member StringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description String
- Rule description.
- fwm
Nat StringAcl Rule Id - ID of the resource.
- param
Template StringId - Port template ID.
- port String
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
Outputs
All input properties are implicitly available as output properties. Additionally, the FwmNatAclRule resource produces the following output properties:
Look up Existing FwmNatAclRule Resource
Get an existing FwmNatAclRule 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?: FwmNatAclRuleState, opts?: CustomResourceOptions): FwmNatAclRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
belong_member_id: Optional[str] = None,
description: Optional[str] = None,
direction: Optional[float] = None,
fwm_nat_acl_rule_id: Optional[str] = None,
group_id: Optional[str] = None,
param_template_id: Optional[str] = None,
port: Optional[str] = None,
protocol: Optional[str] = None,
rule_action: Optional[str] = None,
rule_id: Optional[str] = None,
scope: Optional[str] = None,
sequence: Optional[float] = None,
source_content: Optional[str] = None,
source_type: Optional[str] = None,
target_content: Optional[str] = None,
target_type: Optional[str] = None) -> FwmNatAclRulefunc GetFwmNatAclRule(ctx *Context, name string, id IDInput, state *FwmNatAclRuleState, opts ...ResourceOption) (*FwmNatAclRule, error)public static FwmNatAclRule Get(string name, Input<string> id, FwmNatAclRuleState? state, CustomResourceOptions? opts = null)public static FwmNatAclRule get(String name, Output<String> id, FwmNatAclRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:FwmNatAclRule get: id: ${id}import {
to = tencentcloud_fwm_nat_acl_rule.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.
- Belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- Description string
- Rule description.
- Direction double
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- Fwm
Nat stringAcl Rule Id - ID of the resource.
- Group
Id string - Rule group ID.
- Param
Template stringId - Port template ID.
- Port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- Protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- Rule
Action string - Action: accept/drop/log (lowercase).
- Rule
Id string - Rule ID, it is part of the resource id
group_id#rule_id#direction. - Scope string
- Effective range: ALL/region/nat-instance-id.
- Sequence double
- Rule priority sequence returned by the server.
- Source
Content string - Source address content.
- Source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- Target
Content string - Target address content.
- Target
Type string - Target type (same enum as source_type).
- Belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- Description string
- Rule description.
- Direction float64
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- Fwm
Nat stringAcl Rule Id - ID of the resource.
- Group
Id string - Rule group ID.
- Param
Template stringId - Port template ID.
- Port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- Protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- Rule
Action string - Action: accept/drop/log (lowercase).
- Rule
Id string - Rule ID, it is part of the resource id
group_id#rule_id#direction. - Scope string
- Effective range: ALL/region/nat-instance-id.
- Sequence float64
- Rule priority sequence returned by the server.
- Source
Content string - Source address content.
- Source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- Target
Content string - Target address content.
- Target
Type string - Target type (same enum as source_type).
- belong_
member_ stringid - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description string
- Rule description.
- direction number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- fwm_
nat_ stringacl_ rule_ id - ID of the resource.
- group_
id string - Rule group ID.
- param_
template_ stringid - Port template ID.
- port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule_
action string - Action: accept/drop/log (lowercase).
- rule_
id string - Rule ID, it is part of the resource id
group_id#rule_id#direction. - scope string
- Effective range: ALL/region/nat-instance-id.
- sequence number
- Rule priority sequence returned by the server.
- source_
content string - Source address content.
- source_
type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target_
content string - Target address content.
- target_
type string - Target type (same enum as source_type).
- belong
Member StringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description String
- Rule description.
- direction Double
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- fwm
Nat StringAcl Rule Id - ID of the resource.
- group
Id String - Rule group ID.
- param
Template StringId - Port template ID.
- port String
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- protocol String
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action String - Action: accept/drop/log (lowercase).
- rule
Id String - Rule ID, it is part of the resource id
group_id#rule_id#direction. - scope String
- Effective range: ALL/region/nat-instance-id.
- sequence Double
- Rule priority sequence returned by the server.
- source
Content String - Source address content.
- source
Type String - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content String - Target address content.
- target
Type String - Target type (same enum as source_type).
- belong
Member stringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description string
- Rule description.
- direction number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- fwm
Nat stringAcl Rule Id - ID of the resource.
- group
Id string - Rule group ID.
- param
Template stringId - Port template ID.
- port string
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- protocol string
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action string - Action: accept/drop/log (lowercase).
- rule
Id string - Rule ID, it is part of the resource id
group_id#rule_id#direction. - scope string
- Effective range: ALL/region/nat-instance-id.
- sequence number
- Rule priority sequence returned by the server.
- source
Content string - Source address content.
- source
Type string - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content string - Target address content.
- target
Type string - Target type (same enum as source_type).
- belong_
member_ strid - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description str
- Rule description.
- direction float
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- fwm_
nat_ stracl_ rule_ id - ID of the resource.
- group_
id str - Rule group ID.
- param_
template_ strid - Port template ID.
- port str
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- protocol str
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule_
action str - Action: accept/drop/log (lowercase).
- rule_
id str - Rule ID, it is part of the resource id
group_id#rule_id#direction. - scope str
- Effective range: ALL/region/nat-instance-id.
- sequence float
- Rule priority sequence returned by the server.
- source_
content str - Source address content.
- source_
type str - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target_
content str - Target address content.
- target_
type str - Target type (same enum as source_type).
- belong
Member StringId - Member account ID (required when source/target type in instance/tag/template/addressbook).
- description String
- Rule description.
- direction Number
- Rule direction: 0-outbound, 1-inbound. It is also part of the resource id, so changing it will recreate the rule.
- fwm
Nat StringAcl Rule Id - ID of the resource.
- group
Id String - Rule group ID.
- param
Template StringId - Port template ID.
- port String
- Port e.g. 80, 80,443, 80-90; ANY = -1/-1.
- protocol String
- Protocol: TCP/UDP/ICMP/ANY/HTTP/HTTPS/DNS/FTP...
- rule
Action String - Action: accept/drop/log (lowercase).
- rule
Id String - Rule ID, it is part of the resource id
group_id#rule_id#direction. - scope String
- Effective range: ALL/region/nat-instance-id.
- sequence Number
- Rule priority sequence returned by the server.
- source
Content String - Source address content.
- source
Type String - Source type: ip/net/url/domain/template/addressbook/instance/tag/location/vendor/dnsparse.
- target
Content String - Target address content.
- target
Type String - Target type (same enum as source_type).
Import
FWM NAT ACL rule can be imported using the groupId#ruleId#direction, e.g.
$ pulumi import tencentcloud:index/fwmNatAclRule:FwmNatAclRule example fwmrg-in3q0qkq0n#7520b898-30ba-415d-ab27-ff4542071ea9#0
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 Friday, Nov 6, 2026 by tencentcloudstack