published on Friday, Aug 14, 2026 by tencentcloudstack
published on Friday, Aug 14, 2026 by tencentcloudstack
Provides a resource to create a Tencent Cloud Global Accelerator V2 (GA2) ACL rule.
NOTE: If batch operations on
acl_ruleare required, it is recommended to use resourcetencentcloud.Ga2GlobalAcceleratorAclRuleSet.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.Ga2GlobalAccelerator("example", {
name: "tf-example",
instanceChargeType: "POSTPAID",
description: "tf example global accelerator",
tags: {
createdBy: "Terraform",
},
});
const exampleGa2GlobalAcceleratorAclPolicy = new tencentcloud.Ga2GlobalAcceleratorAclPolicy("example", {
globalAcceleratorId: example.ga2GlobalAcceleratorId,
defaultAction: "ACCEPT",
status: "OPEN",
});
const exampleGa2GlobalAcceleratorAclRule = new tencentcloud.Ga2GlobalAcceleratorAclRule("example", {
globalAcceleratorId: example.ga2GlobalAcceleratorId,
globalAcceleratorAclPolicyId: exampleGa2GlobalAcceleratorAclPolicy.globalAcceleratorAclPolicyId,
protocol: "TCP",
port: "80",
sourceCidrBlock: "10.0.0.0/24",
policy: "ACCEPT",
description: "tf example acl rule",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.Ga2GlobalAccelerator("example",
name="tf-example",
instance_charge_type="POSTPAID",
description="tf example global accelerator",
tags={
"createdBy": "Terraform",
})
example_ga2_global_accelerator_acl_policy = tencentcloud.Ga2GlobalAcceleratorAclPolicy("example",
global_accelerator_id=example.ga2_global_accelerator_id,
default_action="ACCEPT",
status="OPEN")
example_ga2_global_accelerator_acl_rule = tencentcloud.Ga2GlobalAcceleratorAclRule("example",
global_accelerator_id=example.ga2_global_accelerator_id,
global_accelerator_acl_policy_id=example_ga2_global_accelerator_acl_policy.global_accelerator_acl_policy_id,
protocol="TCP",
port="80",
source_cidr_block="10.0.0.0/24",
policy="ACCEPT",
description="tf example acl rule")
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 {
example, err := tencentcloud.NewGa2GlobalAccelerator(ctx, "example", &tencentcloud.Ga2GlobalAcceleratorArgs{
Name: pulumi.String("tf-example"),
InstanceChargeType: pulumi.String("POSTPAID"),
Description: pulumi.String("tf example global accelerator"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
exampleGa2GlobalAcceleratorAclPolicy, err := tencentcloud.NewGa2GlobalAcceleratorAclPolicy(ctx, "example", &tencentcloud.Ga2GlobalAcceleratorAclPolicyArgs{
GlobalAcceleratorId: example.Ga2GlobalAcceleratorId,
DefaultAction: pulumi.String("ACCEPT"),
Status: pulumi.String("OPEN"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewGa2GlobalAcceleratorAclRule(ctx, "example", &tencentcloud.Ga2GlobalAcceleratorAclRuleArgs{
GlobalAcceleratorId: example.Ga2GlobalAcceleratorId,
GlobalAcceleratorAclPolicyId: exampleGa2GlobalAcceleratorAclPolicy.GlobalAcceleratorAclPolicyId,
Protocol: pulumi.String("TCP"),
Port: pulumi.String("80"),
SourceCidrBlock: pulumi.String("10.0.0.0/24"),
Policy: pulumi.String("ACCEPT"),
Description: pulumi.String("tf example acl rule"),
})
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.Ga2GlobalAccelerator("example", new()
{
Name = "tf-example",
InstanceChargeType = "POSTPAID",
Description = "tf example global accelerator",
Tags =
{
{ "createdBy", "Terraform" },
},
});
var exampleGa2GlobalAcceleratorAclPolicy = new Tencentcloud.Ga2GlobalAcceleratorAclPolicy("example", new()
{
GlobalAcceleratorId = example.Ga2GlobalAcceleratorId,
DefaultAction = "ACCEPT",
Status = "OPEN",
});
var exampleGa2GlobalAcceleratorAclRule = new Tencentcloud.Ga2GlobalAcceleratorAclRule("example", new()
{
GlobalAcceleratorId = example.Ga2GlobalAcceleratorId,
GlobalAcceleratorAclPolicyId = exampleGa2GlobalAcceleratorAclPolicy.GlobalAcceleratorAclPolicyId,
Protocol = "TCP",
Port = "80",
SourceCidrBlock = "10.0.0.0/24",
Policy = "ACCEPT",
Description = "tf example acl rule",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Ga2GlobalAccelerator;
import com.pulumi.tencentcloud.Ga2GlobalAcceleratorArgs;
import com.pulumi.tencentcloud.Ga2GlobalAcceleratorAclPolicy;
import com.pulumi.tencentcloud.Ga2GlobalAcceleratorAclPolicyArgs;
import com.pulumi.tencentcloud.Ga2GlobalAcceleratorAclRule;
import com.pulumi.tencentcloud.Ga2GlobalAcceleratorAclRuleArgs;
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 Ga2GlobalAccelerator("example", Ga2GlobalAcceleratorArgs.builder()
.name("tf-example")
.instanceChargeType("POSTPAID")
.description("tf example global accelerator")
.tags(Map.of("createdBy", "Terraform"))
.build());
var exampleGa2GlobalAcceleratorAclPolicy = new Ga2GlobalAcceleratorAclPolicy("exampleGa2GlobalAcceleratorAclPolicy", Ga2GlobalAcceleratorAclPolicyArgs.builder()
.globalAcceleratorId(example.ga2GlobalAcceleratorId())
.defaultAction("ACCEPT")
.status("OPEN")
.build());
var exampleGa2GlobalAcceleratorAclRule = new Ga2GlobalAcceleratorAclRule("exampleGa2GlobalAcceleratorAclRule", Ga2GlobalAcceleratorAclRuleArgs.builder()
.globalAcceleratorId(example.ga2GlobalAcceleratorId())
.globalAcceleratorAclPolicyId(exampleGa2GlobalAcceleratorAclPolicy.globalAcceleratorAclPolicyId())
.protocol("TCP")
.port("80")
.sourceCidrBlock("10.0.0.0/24")
.policy("ACCEPT")
.description("tf example acl rule")
.build());
}
}
resources:
example:
type: tencentcloud:Ga2GlobalAccelerator
properties:
name: tf-example
instanceChargeType: POSTPAID
description: tf example global accelerator
tags:
createdBy: Terraform
exampleGa2GlobalAcceleratorAclPolicy:
type: tencentcloud:Ga2GlobalAcceleratorAclPolicy
name: example
properties:
globalAcceleratorId: ${example.ga2GlobalAcceleratorId}
defaultAction: ACCEPT
status: OPEN
exampleGa2GlobalAcceleratorAclRule:
type: tencentcloud:Ga2GlobalAcceleratorAclRule
name: example
properties:
globalAcceleratorId: ${example.ga2GlobalAcceleratorId}
globalAcceleratorAclPolicyId: ${exampleGa2GlobalAcceleratorAclPolicy.globalAcceleratorAclPolicyId}
protocol: TCP
port: '80'
sourceCidrBlock: 10.0.0.0/24
policy: ACCEPT
description: tf example acl rule
Example coming soon!
Create Ga2GlobalAcceleratorAclRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Ga2GlobalAcceleratorAclRule(name: string, args: Ga2GlobalAcceleratorAclRuleArgs, opts?: CustomResourceOptions);@overload
def Ga2GlobalAcceleratorAclRule(resource_name: str,
args: Ga2GlobalAcceleratorAclRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Ga2GlobalAcceleratorAclRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_accelerator_acl_policy_id: Optional[str] = None,
global_accelerator_id: Optional[str] = None,
policy: Optional[str] = None,
port: Optional[str] = None,
protocol: Optional[str] = None,
source_cidr_block: Optional[str] = None,
description: Optional[str] = None,
ga2_global_accelerator_acl_rule_id: Optional[str] = None,
timeouts: Optional[Ga2GlobalAcceleratorAclRuleTimeoutsArgs] = None)func NewGa2GlobalAcceleratorAclRule(ctx *Context, name string, args Ga2GlobalAcceleratorAclRuleArgs, opts ...ResourceOption) (*Ga2GlobalAcceleratorAclRule, error)public Ga2GlobalAcceleratorAclRule(string name, Ga2GlobalAcceleratorAclRuleArgs args, CustomResourceOptions? opts = null)
public Ga2GlobalAcceleratorAclRule(String name, Ga2GlobalAcceleratorAclRuleArgs args)
public Ga2GlobalAcceleratorAclRule(String name, Ga2GlobalAcceleratorAclRuleArgs args, CustomResourceOptions options)
type: tencentcloud:Ga2GlobalAcceleratorAclRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_ga2_global_accelerator_acl_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args Ga2GlobalAcceleratorAclRuleArgs
- 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 Ga2GlobalAcceleratorAclRuleArgs
- 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 Ga2GlobalAcceleratorAclRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args Ga2GlobalAcceleratorAclRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args Ga2GlobalAcceleratorAclRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Ga2GlobalAcceleratorAclRule 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 Ga2GlobalAcceleratorAclRule resource accepts the following input properties:
- Global
Accelerator stringAcl Policy Id - ACL policy ID.
- Global
Accelerator stringId - Global accelerator instance ID.
- Policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - Port string
- Port.
- Protocol string
- Protocol. Valid values:
TCP,UDP. - Source
Cidr stringBlock - Source CIDR block.
- Description string
- Description. Maximum length is 100 bytes.
- Ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- Timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- Global
Accelerator stringAcl Policy Id - ACL policy ID.
- Global
Accelerator stringId - Global accelerator instance ID.
- Policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - Port string
- Port.
- Protocol string
- Protocol. Valid values:
TCP,UDP. - Source
Cidr stringBlock - Source CIDR block.
- Description string
- Description. Maximum length is 100 bytes.
- Ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- Timeouts
Ga2Global
Accelerator Acl Rule Timeouts Args
- global_
accelerator_ stringacl_ policy_ id - ACL policy ID.
- global_
accelerator_ stringid - Global accelerator instance ID.
- policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port string
- Port.
- protocol string
- Protocol. Valid values:
TCP,UDP. - source_
cidr_ stringblock - Source CIDR block.
- description string
- Description. Maximum length is 100 bytes.
- ga2_
global_ stringaccelerator_ acl_ rule_ id - ID of the resource.
- timeouts object
- global
Accelerator StringAcl Policy Id - ACL policy ID.
- global
Accelerator StringId - Global accelerator instance ID.
- policy String
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port String
- Port.
- protocol String
- Protocol. Valid values:
TCP,UDP. - source
Cidr StringBlock - Source CIDR block.
- description String
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator StringAcl Rule Id - ID of the resource.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- global
Accelerator stringAcl Policy Id - ACL policy ID.
- global
Accelerator stringId - Global accelerator instance ID.
- policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port string
- Port.
- protocol string
- Protocol. Valid values:
TCP,UDP. - source
Cidr stringBlock - Source CIDR block.
- description string
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- global_
accelerator_ stracl_ policy_ id - ACL policy ID.
- global_
accelerator_ strid - Global accelerator instance ID.
- policy str
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port str
- Port.
- protocol str
- Protocol. Valid values:
TCP,UDP. - source_
cidr_ strblock - Source CIDR block.
- description str
- Description. Maximum length is 100 bytes.
- ga2_
global_ straccelerator_ acl_ rule_ id - ID of the resource.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts Args
- global
Accelerator StringAcl Policy Id - ACL policy ID.
- global
Accelerator StringId - Global accelerator instance ID.
- policy String
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port String
- Port.
- protocol String
- Protocol. Valid values:
TCP,UDP. - source
Cidr StringBlock - Source CIDR block.
- description String
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator StringAcl Rule Id - ID of the resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Ga2GlobalAcceleratorAclRule resource produces the following output properties:
- Global
Accelerator stringAcl Rule Id - ACL rule ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Global
Accelerator stringAcl Rule Id - ACL rule ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- global_
accelerator_ stringacl_ rule_ id - ACL rule ID.
- id string
- The provider-assigned unique ID for this managed resource.
- global
Accelerator StringAcl Rule Id - ACL rule ID.
- id String
- The provider-assigned unique ID for this managed resource.
- global
Accelerator stringAcl Rule Id - ACL rule ID.
- id string
- The provider-assigned unique ID for this managed resource.
- global_
accelerator_ stracl_ rule_ id - ACL rule ID.
- id str
- The provider-assigned unique ID for this managed resource.
- global
Accelerator StringAcl Rule Id - ACL rule ID.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Ga2GlobalAcceleratorAclRule Resource
Get an existing Ga2GlobalAcceleratorAclRule 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?: Ga2GlobalAcceleratorAclRuleState, opts?: CustomResourceOptions): Ga2GlobalAcceleratorAclRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
ga2_global_accelerator_acl_rule_id: Optional[str] = None,
global_accelerator_acl_policy_id: Optional[str] = None,
global_accelerator_acl_rule_id: Optional[str] = None,
global_accelerator_id: Optional[str] = None,
policy: Optional[str] = None,
port: Optional[str] = None,
protocol: Optional[str] = None,
source_cidr_block: Optional[str] = None,
timeouts: Optional[Ga2GlobalAcceleratorAclRuleTimeoutsArgs] = None) -> Ga2GlobalAcceleratorAclRulefunc GetGa2GlobalAcceleratorAclRule(ctx *Context, name string, id IDInput, state *Ga2GlobalAcceleratorAclRuleState, opts ...ResourceOption) (*Ga2GlobalAcceleratorAclRule, error)public static Ga2GlobalAcceleratorAclRule Get(string name, Input<string> id, Ga2GlobalAcceleratorAclRuleState? state, CustomResourceOptions? opts = null)public static Ga2GlobalAcceleratorAclRule get(String name, Output<String> id, Ga2GlobalAcceleratorAclRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:Ga2GlobalAcceleratorAclRule get: id: ${id}import {
to = tencentcloud_ga2_global_accelerator_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.
- Description string
- Description. Maximum length is 100 bytes.
- Ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- Global
Accelerator stringAcl Policy Id - ACL policy ID.
- Global
Accelerator stringAcl Rule Id - ACL rule ID.
- Global
Accelerator stringId - Global accelerator instance ID.
- Policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - Port string
- Port.
- Protocol string
- Protocol. Valid values:
TCP,UDP. - Source
Cidr stringBlock - Source CIDR block.
- Timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- Description string
- Description. Maximum length is 100 bytes.
- Ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- Global
Accelerator stringAcl Policy Id - ACL policy ID.
- Global
Accelerator stringAcl Rule Id - ACL rule ID.
- Global
Accelerator stringId - Global accelerator instance ID.
- Policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - Port string
- Port.
- Protocol string
- Protocol. Valid values:
TCP,UDP. - Source
Cidr stringBlock - Source CIDR block.
- Timeouts
Ga2Global
Accelerator Acl Rule Timeouts Args
- description string
- Description. Maximum length is 100 bytes.
- ga2_
global_ stringaccelerator_ acl_ rule_ id - ID of the resource.
- global_
accelerator_ stringacl_ policy_ id - ACL policy ID.
- global_
accelerator_ stringacl_ rule_ id - ACL rule ID.
- global_
accelerator_ stringid - Global accelerator instance ID.
- policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port string
- Port.
- protocol string
- Protocol. Valid values:
TCP,UDP. - source_
cidr_ stringblock - Source CIDR block.
- timeouts object
- description String
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator StringAcl Rule Id - ID of the resource.
- global
Accelerator StringAcl Policy Id - ACL policy ID.
- global
Accelerator StringAcl Rule Id - ACL rule ID.
- global
Accelerator StringId - Global accelerator instance ID.
- policy String
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port String
- Port.
- protocol String
- Protocol. Valid values:
TCP,UDP. - source
Cidr StringBlock - Source CIDR block.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- description string
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator stringAcl Rule Id - ID of the resource.
- global
Accelerator stringAcl Policy Id - ACL policy ID.
- global
Accelerator stringAcl Rule Id - ACL rule ID.
- global
Accelerator stringId - Global accelerator instance ID.
- policy string
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port string
- Port.
- protocol string
- Protocol. Valid values:
TCP,UDP. - source
Cidr stringBlock - Source CIDR block.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts
- description str
- Description. Maximum length is 100 bytes.
- ga2_
global_ straccelerator_ acl_ rule_ id - ID of the resource.
- global_
accelerator_ stracl_ policy_ id - ACL policy ID.
- global_
accelerator_ stracl_ rule_ id - ACL rule ID.
- global_
accelerator_ strid - Global accelerator instance ID.
- policy str
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port str
- Port.
- protocol str
- Protocol. Valid values:
TCP,UDP. - source_
cidr_ strblock - Source CIDR block.
- timeouts
Ga2Global
Accelerator Acl Rule Timeouts Args
- description String
- Description. Maximum length is 100 bytes.
- ga2Global
Accelerator StringAcl Rule Id - ID of the resource.
- global
Accelerator StringAcl Policy Id - ACL policy ID.
- global
Accelerator StringAcl Rule Id - ACL rule ID.
- global
Accelerator StringId - Global accelerator instance ID.
- policy String
- Action. Valid values:
ACCEPT(allow),DROP(deny). - port String
- Port.
- protocol String
- Protocol. Valid values:
TCP,UDP. - source
Cidr StringBlock - Source CIDR block.
- timeouts Property Map
Supporting Types
Ga2GlobalAcceleratorAclRuleTimeouts, Ga2GlobalAcceleratorAclRuleTimeoutsArgs
Import
GA2 ACL rule can be imported using the composite id <global_accelerator_id>#<global_accelerator_acl_policy_id>#<global_accelerator_acl_rule_id>, e.g.
$ pulumi import tencentcloud:index/ga2GlobalAcceleratorAclRule:Ga2GlobalAcceleratorAclRule example ga-5hlomx9m#sp-8oc0ohct#sr-asa55vy5
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, Aug 14, 2026 by tencentcloudstack