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

tencentcloud.SecurityGroupRuleSet

Explore with Pulumi AI

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

    Provides a resource to create security group rule. This resource is similar with tencentcloud_security_group_lite_rule, rules can be ordered and configure descriptions.

    NOTE: This resource must exclusive in one security group, do not declare additional rule resources of this security group elsewhere.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const baseSecurityGroup = new tencentcloud.SecurityGroup("baseSecurityGroup", {description: "Testing Rule Set Security"});
    const relative = new tencentcloud.SecurityGroup("relative", {description: "Used for attach security policy"});
    const fooAddressTemplate = new tencentcloud.AddressTemplate("fooAddressTemplate", {addresses: [
        "10.0.0.1",
        "10.0.1.0/24",
        "10.0.0.1-10.0.0.100",
    ]});
    const fooAddressTemplateGroup = new tencentcloud.AddressTemplateGroup("fooAddressTemplateGroup", {templateIds: [fooAddressTemplate.addressTemplateId]});
    const baseSecurityGroupRuleSet = new tencentcloud.SecurityGroupRuleSet("baseSecurityGroupRuleSet", {
        securityGroupId: baseSecurityGroup.securityGroupId,
        ingresses: [
            {
                action: "ACCEPT",
                cidrBlock: "10.0.0.0/22",
                protocol: "TCP",
                port: "80-90",
                description: "A:Allow Ips and 80-90",
            },
            {
                action: "ACCEPT",
                cidrBlock: "10.0.2.1",
                protocol: "UDP",
                port: "8080",
                description: "B:Allow UDP 8080",
            },
            {
                action: "ACCEPT",
                cidrBlock: "10.0.2.1",
                protocol: "UDP",
                port: "8080",
                description: "C:Allow UDP 8080",
            },
            {
                action: "ACCEPT",
                cidrBlock: "172.18.1.2",
                protocol: "ALL",
                port: "ALL",
                description: "D:Allow ALL",
            },
            {
                action: "DROP",
                protocol: "TCP",
                port: "80",
                sourceSecurityId: relative.securityGroupId,
                description: "E:Block relative",
            },
        ],
        egresses: [
            {
                action: "DROP",
                cidrBlock: "10.0.0.0/16",
                protocol: "ICMP",
                description: "A:Block ping3",
            },
            {
                action: "DROP",
                addressTemplateId: fooAddressTemplate.addressTemplateId,
                description: "B:Allow template",
            },
            {
                action: "DROP",
                addressTemplateGroup: fooAddressTemplateGroup.addressTemplateGroupId,
                description: "C:DROP template group",
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    base_security_group = tencentcloud.SecurityGroup("baseSecurityGroup", description="Testing Rule Set Security")
    relative = tencentcloud.SecurityGroup("relative", description="Used for attach security policy")
    foo_address_template = tencentcloud.AddressTemplate("fooAddressTemplate", addresses=[
        "10.0.0.1",
        "10.0.1.0/24",
        "10.0.0.1-10.0.0.100",
    ])
    foo_address_template_group = tencentcloud.AddressTemplateGroup("fooAddressTemplateGroup", template_ids=[foo_address_template.address_template_id])
    base_security_group_rule_set = tencentcloud.SecurityGroupRuleSet("baseSecurityGroupRuleSet",
        security_group_id=base_security_group.security_group_id,
        ingresses=[
            {
                "action": "ACCEPT",
                "cidr_block": "10.0.0.0/22",
                "protocol": "TCP",
                "port": "80-90",
                "description": "A:Allow Ips and 80-90",
            },
            {
                "action": "ACCEPT",
                "cidr_block": "10.0.2.1",
                "protocol": "UDP",
                "port": "8080",
                "description": "B:Allow UDP 8080",
            },
            {
                "action": "ACCEPT",
                "cidr_block": "10.0.2.1",
                "protocol": "UDP",
                "port": "8080",
                "description": "C:Allow UDP 8080",
            },
            {
                "action": "ACCEPT",
                "cidr_block": "172.18.1.2",
                "protocol": "ALL",
                "port": "ALL",
                "description": "D:Allow ALL",
            },
            {
                "action": "DROP",
                "protocol": "TCP",
                "port": "80",
                "source_security_id": relative.security_group_id,
                "description": "E:Block relative",
            },
        ],
        egresses=[
            {
                "action": "DROP",
                "cidr_block": "10.0.0.0/16",
                "protocol": "ICMP",
                "description": "A:Block ping3",
            },
            {
                "action": "DROP",
                "address_template_id": foo_address_template.address_template_id,
                "description": "B:Allow template",
            },
            {
                "action": "DROP",
                "address_template_group": foo_address_template_group.address_template_group_id,
                "description": "C:DROP template group",
            },
        ])
    
    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 {
    		baseSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "baseSecurityGroup", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("Testing Rule Set Security"),
    		})
    		if err != nil {
    			return err
    		}
    		relative, err := tencentcloud.NewSecurityGroup(ctx, "relative", &tencentcloud.SecurityGroupArgs{
    			Description: pulumi.String("Used for attach security policy"),
    		})
    		if err != nil {
    			return err
    		}
    		fooAddressTemplate, err := tencentcloud.NewAddressTemplate(ctx, "fooAddressTemplate", &tencentcloud.AddressTemplateArgs{
    			Addresses: pulumi.StringArray{
    				pulumi.String("10.0.0.1"),
    				pulumi.String("10.0.1.0/24"),
    				pulumi.String("10.0.0.1-10.0.0.100"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooAddressTemplateGroup, err := tencentcloud.NewAddressTemplateGroup(ctx, "fooAddressTemplateGroup", &tencentcloud.AddressTemplateGroupArgs{
    			TemplateIds: pulumi.StringArray{
    				fooAddressTemplate.AddressTemplateId,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewSecurityGroupRuleSet(ctx, "baseSecurityGroupRuleSet", &tencentcloud.SecurityGroupRuleSetArgs{
    			SecurityGroupId: baseSecurityGroup.SecurityGroupId,
    			Ingresses: tencentcloud.SecurityGroupRuleSetIngressArray{
    				&tencentcloud.SecurityGroupRuleSetIngressArgs{
    					Action:      pulumi.String("ACCEPT"),
    					CidrBlock:   pulumi.String("10.0.0.0/22"),
    					Protocol:    pulumi.String("TCP"),
    					Port:        pulumi.String("80-90"),
    					Description: pulumi.String("A:Allow Ips and 80-90"),
    				},
    				&tencentcloud.SecurityGroupRuleSetIngressArgs{
    					Action:      pulumi.String("ACCEPT"),
    					CidrBlock:   pulumi.String("10.0.2.1"),
    					Protocol:    pulumi.String("UDP"),
    					Port:        pulumi.String("8080"),
    					Description: pulumi.String("B:Allow UDP 8080"),
    				},
    				&tencentcloud.SecurityGroupRuleSetIngressArgs{
    					Action:      pulumi.String("ACCEPT"),
    					CidrBlock:   pulumi.String("10.0.2.1"),
    					Protocol:    pulumi.String("UDP"),
    					Port:        pulumi.String("8080"),
    					Description: pulumi.String("C:Allow UDP 8080"),
    				},
    				&tencentcloud.SecurityGroupRuleSetIngressArgs{
    					Action:      pulumi.String("ACCEPT"),
    					CidrBlock:   pulumi.String("172.18.1.2"),
    					Protocol:    pulumi.String("ALL"),
    					Port:        pulumi.String("ALL"),
    					Description: pulumi.String("D:Allow ALL"),
    				},
    				&tencentcloud.SecurityGroupRuleSetIngressArgs{
    					Action:           pulumi.String("DROP"),
    					Protocol:         pulumi.String("TCP"),
    					Port:             pulumi.String("80"),
    					SourceSecurityId: relative.SecurityGroupId,
    					Description:      pulumi.String("E:Block relative"),
    				},
    			},
    			Egresses: tencentcloud.SecurityGroupRuleSetEgressArray{
    				&tencentcloud.SecurityGroupRuleSetEgressArgs{
    					Action:      pulumi.String("DROP"),
    					CidrBlock:   pulumi.String("10.0.0.0/16"),
    					Protocol:    pulumi.String("ICMP"),
    					Description: pulumi.String("A:Block ping3"),
    				},
    				&tencentcloud.SecurityGroupRuleSetEgressArgs{
    					Action:            pulumi.String("DROP"),
    					AddressTemplateId: fooAddressTemplate.AddressTemplateId,
    					Description:       pulumi.String("B:Allow template"),
    				},
    				&tencentcloud.SecurityGroupRuleSetEgressArgs{
    					Action:               pulumi.String("DROP"),
    					AddressTemplateGroup: fooAddressTemplateGroup.AddressTemplateGroupId,
    					Description:          pulumi.String("C:DROP template group"),
    				},
    			},
    		})
    		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 baseSecurityGroup = new Tencentcloud.SecurityGroup("baseSecurityGroup", new()
        {
            Description = "Testing Rule Set Security",
        });
    
        var relative = new Tencentcloud.SecurityGroup("relative", new()
        {
            Description = "Used for attach security policy",
        });
    
        var fooAddressTemplate = new Tencentcloud.AddressTemplate("fooAddressTemplate", new()
        {
            Addresses = new[]
            {
                "10.0.0.1",
                "10.0.1.0/24",
                "10.0.0.1-10.0.0.100",
            },
        });
    
        var fooAddressTemplateGroup = new Tencentcloud.AddressTemplateGroup("fooAddressTemplateGroup", new()
        {
            TemplateIds = new[]
            {
                fooAddressTemplate.AddressTemplateId,
            },
        });
    
        var baseSecurityGroupRuleSet = new Tencentcloud.SecurityGroupRuleSet("baseSecurityGroupRuleSet", new()
        {
            SecurityGroupId = baseSecurityGroup.SecurityGroupId,
            Ingresses = new[]
            {
                new Tencentcloud.Inputs.SecurityGroupRuleSetIngressArgs
                {
                    Action = "ACCEPT",
                    CidrBlock = "10.0.0.0/22",
                    Protocol = "TCP",
                    Port = "80-90",
                    Description = "A:Allow Ips and 80-90",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetIngressArgs
                {
                    Action = "ACCEPT",
                    CidrBlock = "10.0.2.1",
                    Protocol = "UDP",
                    Port = "8080",
                    Description = "B:Allow UDP 8080",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetIngressArgs
                {
                    Action = "ACCEPT",
                    CidrBlock = "10.0.2.1",
                    Protocol = "UDP",
                    Port = "8080",
                    Description = "C:Allow UDP 8080",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetIngressArgs
                {
                    Action = "ACCEPT",
                    CidrBlock = "172.18.1.2",
                    Protocol = "ALL",
                    Port = "ALL",
                    Description = "D:Allow ALL",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetIngressArgs
                {
                    Action = "DROP",
                    Protocol = "TCP",
                    Port = "80",
                    SourceSecurityId = relative.SecurityGroupId,
                    Description = "E:Block relative",
                },
            },
            Egresses = new[]
            {
                new Tencentcloud.Inputs.SecurityGroupRuleSetEgressArgs
                {
                    Action = "DROP",
                    CidrBlock = "10.0.0.0/16",
                    Protocol = "ICMP",
                    Description = "A:Block ping3",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetEgressArgs
                {
                    Action = "DROP",
                    AddressTemplateId = fooAddressTemplate.AddressTemplateId,
                    Description = "B:Allow template",
                },
                new Tencentcloud.Inputs.SecurityGroupRuleSetEgressArgs
                {
                    Action = "DROP",
                    AddressTemplateGroup = fooAddressTemplateGroup.AddressTemplateGroupId,
                    Description = "C:DROP template group",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.SecurityGroup;
    import com.pulumi.tencentcloud.SecurityGroupArgs;
    import com.pulumi.tencentcloud.AddressTemplate;
    import com.pulumi.tencentcloud.AddressTemplateArgs;
    import com.pulumi.tencentcloud.AddressTemplateGroup;
    import com.pulumi.tencentcloud.AddressTemplateGroupArgs;
    import com.pulumi.tencentcloud.SecurityGroupRuleSet;
    import com.pulumi.tencentcloud.SecurityGroupRuleSetArgs;
    import com.pulumi.tencentcloud.inputs.SecurityGroupRuleSetIngressArgs;
    import com.pulumi.tencentcloud.inputs.SecurityGroupRuleSetEgressArgs;
    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 baseSecurityGroup = new SecurityGroup("baseSecurityGroup", SecurityGroupArgs.builder()
                .description("Testing Rule Set Security")
                .build());
    
            var relative = new SecurityGroup("relative", SecurityGroupArgs.builder()
                .description("Used for attach security policy")
                .build());
    
            var fooAddressTemplate = new AddressTemplate("fooAddressTemplate", AddressTemplateArgs.builder()
                .addresses(            
                    "10.0.0.1",
                    "10.0.1.0/24",
                    "10.0.0.1-10.0.0.100")
                .build());
    
            var fooAddressTemplateGroup = new AddressTemplateGroup("fooAddressTemplateGroup", AddressTemplateGroupArgs.builder()
                .templateIds(fooAddressTemplate.addressTemplateId())
                .build());
    
            var baseSecurityGroupRuleSet = new SecurityGroupRuleSet("baseSecurityGroupRuleSet", SecurityGroupRuleSetArgs.builder()
                .securityGroupId(baseSecurityGroup.securityGroupId())
                .ingresses(            
                    SecurityGroupRuleSetIngressArgs.builder()
                        .action("ACCEPT")
                        .cidrBlock("10.0.0.0/22")
                        .protocol("TCP")
                        .port("80-90")
                        .description("A:Allow Ips and 80-90")
                        .build(),
                    SecurityGroupRuleSetIngressArgs.builder()
                        .action("ACCEPT")
                        .cidrBlock("10.0.2.1")
                        .protocol("UDP")
                        .port("8080")
                        .description("B:Allow UDP 8080")
                        .build(),
                    SecurityGroupRuleSetIngressArgs.builder()
                        .action("ACCEPT")
                        .cidrBlock("10.0.2.1")
                        .protocol("UDP")
                        .port("8080")
                        .description("C:Allow UDP 8080")
                        .build(),
                    SecurityGroupRuleSetIngressArgs.builder()
                        .action("ACCEPT")
                        .cidrBlock("172.18.1.2")
                        .protocol("ALL")
                        .port("ALL")
                        .description("D:Allow ALL")
                        .build(),
                    SecurityGroupRuleSetIngressArgs.builder()
                        .action("DROP")
                        .protocol("TCP")
                        .port("80")
                        .sourceSecurityId(relative.securityGroupId())
                        .description("E:Block relative")
                        .build())
                .egresses(            
                    SecurityGroupRuleSetEgressArgs.builder()
                        .action("DROP")
                        .cidrBlock("10.0.0.0/16")
                        .protocol("ICMP")
                        .description("A:Block ping3")
                        .build(),
                    SecurityGroupRuleSetEgressArgs.builder()
                        .action("DROP")
                        .addressTemplateId(fooAddressTemplate.addressTemplateId())
                        .description("B:Allow template")
                        .build(),
                    SecurityGroupRuleSetEgressArgs.builder()
                        .action("DROP")
                        .addressTemplateGroup(fooAddressTemplateGroup.addressTemplateGroupId())
                        .description("C:DROP template group")
                        .build())
                .build());
    
        }
    }
    
    resources:
      baseSecurityGroup:
        type: tencentcloud:SecurityGroup
        properties:
          description: Testing Rule Set Security
      relative:
        type: tencentcloud:SecurityGroup
        properties:
          description: Used for attach security policy
      fooAddressTemplate:
        type: tencentcloud:AddressTemplate
        properties:
          addresses:
            - 10.0.0.1
            - 10.0.1.0/24
            - 10.0.0.1-10.0.0.100
      fooAddressTemplateGroup:
        type: tencentcloud:AddressTemplateGroup
        properties:
          templateIds:
            - ${fooAddressTemplate.addressTemplateId}
      baseSecurityGroupRuleSet:
        type: tencentcloud:SecurityGroupRuleSet
        properties:
          securityGroupId: ${baseSecurityGroup.securityGroupId}
          ingresses:
            - action: ACCEPT
              cidrBlock: 10.0.0.0/22
              protocol: TCP
              port: 80-90
              description: A:Allow Ips and 80-90
            - action: ACCEPT
              cidrBlock: 10.0.2.1
              protocol: UDP
              port: '8080'
              description: B:Allow UDP 8080
            - action: ACCEPT
              cidrBlock: 10.0.2.1
              protocol: UDP
              port: '8080'
              description: C:Allow UDP 8080
            - action: ACCEPT
              cidrBlock: 172.18.1.2
              protocol: ALL
              port: ALL
              description: D:Allow ALL
            - action: DROP
              protocol: TCP
              port: '80'
              sourceSecurityId: ${relative.securityGroupId}
              description: E:Block relative
          egresses:
            - action: DROP
              cidrBlock: 10.0.0.0/16
              protocol: ICMP
              description: A:Block ping3
            - action: DROP
              addressTemplateId: ${fooAddressTemplate.addressTemplateId}
              description: B:Allow template
            - action: DROP
              addressTemplateGroup: ${fooAddressTemplateGroup.addressTemplateGroupId}
              description: C:DROP template group
    

    Create SecurityGroupRuleSet Resource

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

    Constructor syntax

    new SecurityGroupRuleSet(name: string, args: SecurityGroupRuleSetArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroupRuleSet(resource_name: str,
                             args: SecurityGroupRuleSetArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityGroupRuleSet(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             security_group_id: Optional[str] = None,
                             egresses: Optional[Sequence[SecurityGroupRuleSetEgressArgs]] = None,
                             ingresses: Optional[Sequence[SecurityGroupRuleSetIngressArgs]] = None,
                             security_group_rule_set_id: Optional[str] = None)
    func NewSecurityGroupRuleSet(ctx *Context, name string, args SecurityGroupRuleSetArgs, opts ...ResourceOption) (*SecurityGroupRuleSet, error)
    public SecurityGroupRuleSet(string name, SecurityGroupRuleSetArgs args, CustomResourceOptions? opts = null)
    public SecurityGroupRuleSet(String name, SecurityGroupRuleSetArgs args)
    public SecurityGroupRuleSet(String name, SecurityGroupRuleSetArgs args, CustomResourceOptions options)
    
    type: tencentcloud:SecurityGroupRuleSet
    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 SecurityGroupRuleSetArgs
    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 SecurityGroupRuleSetArgs
    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 SecurityGroupRuleSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityGroupRuleSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityGroupRuleSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    SecurityGroupId string
    ID of the security group to be queried.
    Egresses List<SecurityGroupRuleSetEgress>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    Ingresses List<SecurityGroupRuleSetIngress>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    SecurityGroupRuleSetId string
    ID of the resource.
    SecurityGroupId string
    ID of the security group to be queried.
    Egresses []SecurityGroupRuleSetEgressArgs
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    Ingresses []SecurityGroupRuleSetIngressArgs
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    SecurityGroupRuleSetId string
    ID of the resource.
    securityGroupId String
    ID of the security group to be queried.
    egresses List<SecurityGroupRuleSetEgress>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses List<SecurityGroupRuleSetIngress>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupRuleSetId String
    ID of the resource.
    securityGroupId string
    ID of the security group to be queried.
    egresses SecurityGroupRuleSetEgress[]
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses SecurityGroupRuleSetIngress[]
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupRuleSetId string
    ID of the resource.
    security_group_id str
    ID of the security group to be queried.
    egresses Sequence[SecurityGroupRuleSetEgressArgs]
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses Sequence[SecurityGroupRuleSetIngressArgs]
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    security_group_rule_set_id str
    ID of the resource.
    securityGroupId String
    ID of the security group to be queried.
    egresses List<Property Map>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses List<Property Map>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupRuleSetId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityGroupRuleSet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    Security policies version, auto increment for every update.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version string
    Security policies version, auto increment for every update.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    Security policies version, auto increment for every update.
    id string
    The provider-assigned unique ID for this managed resource.
    version string
    Security policies version, auto increment for every update.
    id str
    The provider-assigned unique ID for this managed resource.
    version str
    Security policies version, auto increment for every update.
    id String
    The provider-assigned unique ID for this managed resource.
    version String
    Security policies version, auto increment for every update.

    Look up Existing SecurityGroupRuleSet Resource

    Get an existing SecurityGroupRuleSet 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?: SecurityGroupRuleSetState, opts?: CustomResourceOptions): SecurityGroupRuleSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            egresses: Optional[Sequence[SecurityGroupRuleSetEgressArgs]] = None,
            ingresses: Optional[Sequence[SecurityGroupRuleSetIngressArgs]] = None,
            security_group_id: Optional[str] = None,
            security_group_rule_set_id: Optional[str] = None,
            version: Optional[str] = None) -> SecurityGroupRuleSet
    func GetSecurityGroupRuleSet(ctx *Context, name string, id IDInput, state *SecurityGroupRuleSetState, opts ...ResourceOption) (*SecurityGroupRuleSet, error)
    public static SecurityGroupRuleSet Get(string name, Input<string> id, SecurityGroupRuleSetState? state, CustomResourceOptions? opts = null)
    public static SecurityGroupRuleSet get(String name, Output<String> id, SecurityGroupRuleSetState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:SecurityGroupRuleSet    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:
    Egresses List<SecurityGroupRuleSetEgress>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    Ingresses List<SecurityGroupRuleSetIngress>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    SecurityGroupId string
    ID of the security group to be queried.
    SecurityGroupRuleSetId string
    ID of the resource.
    Version string
    Security policies version, auto increment for every update.
    Egresses []SecurityGroupRuleSetEgressArgs
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    Ingresses []SecurityGroupRuleSetIngressArgs
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    SecurityGroupId string
    ID of the security group to be queried.
    SecurityGroupRuleSetId string
    ID of the resource.
    Version string
    Security policies version, auto increment for every update.
    egresses List<SecurityGroupRuleSetEgress>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses List<SecurityGroupRuleSetIngress>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupId String
    ID of the security group to be queried.
    securityGroupRuleSetId String
    ID of the resource.
    version String
    Security policies version, auto increment for every update.
    egresses SecurityGroupRuleSetEgress[]
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses SecurityGroupRuleSetIngress[]
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupId string
    ID of the security group to be queried.
    securityGroupRuleSetId string
    ID of the resource.
    version string
    Security policies version, auto increment for every update.
    egresses Sequence[SecurityGroupRuleSetEgressArgs]
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses Sequence[SecurityGroupRuleSetIngressArgs]
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    security_group_id str
    ID of the security group to be queried.
    security_group_rule_set_id str
    ID of the resource.
    version str
    Security policies version, auto increment for every update.
    egresses List<Property Map>
    List of egress rule. NOTE: this block is ordered, the first rule has the highest priority.
    ingresses List<Property Map>
    List of ingress rule. NOTE: this block is ordered, the first rule has the highest priority.
    securityGroupId String
    ID of the security group to be queried.
    securityGroupRuleSetId String
    ID of the resource.
    version String
    Security policies version, auto increment for every update.

    Supporting Types

    SecurityGroupRuleSetEgress, SecurityGroupRuleSetEgressArgs

    Action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    AddressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    AddressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    CidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Description string
    Description of the security group rule.
    Ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    PolicyIndex double
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    Port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    Protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    ServiceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    ServiceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    SourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    AddressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    AddressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    CidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Description string
    Description of the security group rule.
    Ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    PolicyIndex float64
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    Port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    Protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    ServiceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    ServiceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    SourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action String
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup String
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId String
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock String
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description String
    Description of the security group rule.
    ipv6CidrBlock String
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex Double
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port String
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol String
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup String
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId String
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId String
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description string
    Description of the security group rule.
    ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex number
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action str
    Rule policy of security group. Valid values: ACCEPT and DROP.
    address_template_group str
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    address_template_id str
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidr_block str
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description str
    Description of the security group rule.
    ipv6_cidr_block str
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policy_index float
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port str
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol str
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    service_template_group str
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    service_template_id str
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    source_security_id str
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action String
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup String
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId String
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock String
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description String
    Description of the security group rule.
    ipv6CidrBlock String
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex Number
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port String
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol String
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup String
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId String
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId String
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.

    SecurityGroupRuleSetIngress, SecurityGroupRuleSetIngressArgs

    Action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    AddressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    AddressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    CidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Description string
    Description of the security group rule.
    Ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    PolicyIndex double
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    Port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    Protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    ServiceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    ServiceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    SourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    AddressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    AddressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    CidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    Description string
    Description of the security group rule.
    Ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    PolicyIndex float64
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    Port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    Protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    ServiceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    ServiceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    SourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action String
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup String
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId String
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock String
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description String
    Description of the security group rule.
    ipv6CidrBlock String
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex Double
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port String
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol String
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup String
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId String
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId String
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action string
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup string
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId string
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock string
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description string
    Description of the security group rule.
    ipv6CidrBlock string
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex number
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port string
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol string
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup string
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId string
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId string
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action str
    Rule policy of security group. Valid values: ACCEPT and DROP.
    address_template_group str
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    address_template_id str
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidr_block str
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description str
    Description of the security group rule.
    ipv6_cidr_block str
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policy_index float
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port str
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol str
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    service_template_group str
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    service_template_id str
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    source_security_id str
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    action String
    Rule policy of security group. Valid values: ACCEPT and DROP.
    addressTemplateGroup String
    Specify Group ID of Address template like ipmg-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    addressTemplateId String
    Specify Address template ID like ipm-xxxxxxxx, conflict with source_security_id and cidr_block. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    cidrBlock String
    An IP address network or CIDR segment. NOTE: cidr_block, ipv6_cidr_block, source_security_id and address_template_* are exclusive and cannot be set in the same time; One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    description String
    Description of the security group rule.
    ipv6CidrBlock String
    An IPV6 address network or CIDR segment, and conflict with source_security_id and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.
    policyIndex Number
    The security group rule index number, whose value dynamically changes with changes in security group rules.
    port String
    Range of the port. The available value can be one, multiple or one segment. E.g. 80, 80,90 and 80-90. Default to all ports, and conflicts with service_template_*.
    protocol String
    Type of IP protocol. Valid values: TCP, UDP, ICMP, ICMPv6 and ALL. Default to all types protocol, and conflicts with service_template_*.
    serviceTemplateGroup String
    Specify Group ID of Protocol template ID like ppmg-xxxxxxxx, conflict with protocol and port.
    serviceTemplateId String
    Specify Protocol template ID like ppm-xxxxxxxx, conflict with protocol and port.
    sourceSecurityId String
    ID of the nested security group, and conflicts with cidr_block and address_template_*. NOTE: One of cidr_block, ipv6_cidr_block, source_security_id and address_template_* must be set.

    Import

    Resource tencentcloud_security_group_rule_set can be imported by passing security grou id:

    $ pulumi import tencentcloud:index/securityGroupRuleSet:SecurityGroupRuleSet sglab_1 sg-xxxxxxxx
    

    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