published on Monday, Jul 27, 2026 by Byteplus
published on Monday, Jul 27, 2026 by Byteplus
A security group is a logical grouping that provides access policies for NICs within the same private network that share security requirements and mutual trust. You can control inbound and outbound traffic for associated NICs by configuring security group rules
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const securityGroupDemo = new bytepluscc.vpc.SecurityGroup("SecurityGroupDemo", {
vpcId: "vpc-xxxx",
securityGroupName: "SecurityGroupDemo",
description: "SecurityGroupDemo description",
projectName: "default",
ingressPermissions: [{
description: "test-rule",
policy: "drop",
port_end: 1,
port_start: 1,
priority: 11,
protocol: "tcp",
cidr_ip: "192.168.xx.0/26",
prefix_list_id: "",
source_group_id: "",
}],
egressPermissions: [{
description: "test-rule",
policy: "drop",
port_end: -1,
port_start: -1,
priority: 100,
protocol: "all",
cidr_ip: "192.168.xx.0/26",
prefix_list_id: "list-xxx",
source_group_id: "group-xxx",
}],
tags: [{
key: "env",
value: "test",
}],
});
import pulumi
import pulumi_bytepluscc as bytepluscc
security_group_demo = bytepluscc.vpc.SecurityGroup("SecurityGroupDemo",
vpc_id="vpc-xxxx",
security_group_name="SecurityGroupDemo",
description="SecurityGroupDemo description",
project_name="default",
ingress_permissions=[{
"description": "test-rule",
"policy": "drop",
"port_end": 1,
"port_start": 1,
"priority": 11,
"protocol": "tcp",
"cidr_ip": "192.168.xx.0/26",
"prefix_list_id": "",
"source_group_id": "",
}],
egress_permissions=[{
"description": "test-rule",
"policy": "drop",
"port_end": -1,
"port_start": -1,
"priority": 100,
"protocol": "all",
"cidr_ip": "192.168.xx.0/26",
"prefix_list_id": "list-xxx",
"source_group_id": "group-xxx",
}],
tags=[{
"key": "env",
"value": "test",
}])
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewSecurityGroup(ctx, "SecurityGroupDemo", &vpc.SecurityGroupArgs{
VpcId: pulumi.String("vpc-xxxx"),
SecurityGroupName: pulumi.String("SecurityGroupDemo"),
Description: pulumi.String("SecurityGroupDemo description"),
ProjectName: pulumi.String("default"),
IngressPermissions: vpc.SecurityGroupIngressPermissionArray{
&vpc.SecurityGroupIngressPermissionArgs{
Description: pulumi.String("test-rule"),
Policy: pulumi.String("drop"),
Port_end: 1,
Port_start: 1,
Priority: pulumi.Int(11),
Protocol: pulumi.String("tcp"),
Cidr_ip: "192.168.xx.0/26",
Prefix_list_id: "",
Source_group_id: "",
},
},
EgressPermissions: vpc.SecurityGroupEgressPermissionArray{
&vpc.SecurityGroupEgressPermissionArgs{
Description: pulumi.String("test-rule"),
Policy: pulumi.String("drop"),
Port_end: -1,
Port_start: -1,
Priority: pulumi.Int(100),
Protocol: pulumi.String("all"),
Cidr_ip: "192.168.xx.0/26",
Prefix_list_id: "list-xxx",
Source_group_id: "group-xxx",
},
},
Tags: vpc.SecurityGroupTagArray{
&vpc.SecurityGroupTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var securityGroupDemo = new Bytepluscc.Vpc.SecurityGroup("SecurityGroupDemo", new()
{
VpcId = "vpc-xxxx",
SecurityGroupName = "SecurityGroupDemo",
Description = "SecurityGroupDemo description",
ProjectName = "default",
IngressPermissions = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupIngressPermissionArgs
{
Description = "test-rule",
Policy = "drop",
Port_end = 1,
Port_start = 1,
Priority = 11,
Protocol = "tcp",
Cidr_ip = "192.168.xx.0/26",
Prefix_list_id = "",
Source_group_id = "",
},
},
EgressPermissions = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupEgressPermissionArgs
{
Description = "test-rule",
Policy = "drop",
Port_end = -1,
Port_start = -1,
Priority = 100,
Protocol = "all",
Cidr_ip = "192.168.xx.0/26",
Prefix_list_id = "list-xxx",
Source_group_id = "group-xxx",
},
},
Tags = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupTagArgs
{
Key = "env",
Value = "test",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.vpc.SecurityGroup;
import com.byteplus.bytepluscc.vpc.SecurityGroupArgs;
import com.pulumi.bytepluscc.vpc.inputs.SecurityGroupIngressPermissionArgs;
import com.pulumi.bytepluscc.vpc.inputs.SecurityGroupEgressPermissionArgs;
import com.pulumi.bytepluscc.vpc.inputs.SecurityGroupTagArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 securityGroupDemo = new SecurityGroup("securityGroupDemo", SecurityGroupArgs.builder()
.vpcId("vpc-xxxx")
.securityGroupName("SecurityGroupDemo")
.description("SecurityGroupDemo description")
.projectName("default")
.ingressPermissions(SecurityGroupIngressPermissionArgs.builder()
.description("test-rule")
.policy("drop")
.port_end(1)
.port_start(1)
.priority(11)
.protocol("tcp")
.cidr_ip("192.168.xx.0/26")
.prefix_list_id("")
.source_group_id("")
.build())
.egressPermissions(SecurityGroupEgressPermissionArgs.builder()
.description("test-rule")
.policy("drop")
.port_end(-1)
.port_start(-1)
.priority(100)
.protocol("all")
.cidr_ip("192.168.xx.0/26")
.prefix_list_id("list-xxx")
.source_group_id("group-xxx")
.build())
.tags(SecurityGroupTagArgs.builder()
.key("env")
.value("test")
.build())
.build());
}
}
resources:
securityGroupDemo:
type: bytepluscc:vpc:SecurityGroup
name: SecurityGroupDemo
properties:
vpcId: vpc-xxxx
securityGroupName: SecurityGroupDemo
description: SecurityGroupDemo description
projectName: default
ingressPermissions:
- description: test-rule
policy: drop
port_end: 1
port_start: 1
priority: 11
protocol: tcp
cidr_ip: 192.168.xx.0/26
prefix_list_id: ""
source_group_id: ""
egressPermissions:
- description: test-rule
policy: drop
port_end: -1
port_start: -1
priority: 100
protocol: all
cidr_ip: 192.168.xx.0/26
prefix_list_id: list-xxx
source_group_id: group-xxx
tags:
- key: env
value: test
pulumi {
required_providers {
bytepluscc = {
source = "pulumi/bytepluscc"
}
}
}
resource "bytepluscc_vpc_securitygroup" "SecurityGroupDemo" {
vpc_id = "vpc-xxxx"
security_group_name = "SecurityGroupDemo"
description = "SecurityGroupDemo description"
project_name = "default"
ingress_permissions {
description = "test-rule"
policy = "drop"
port_end = 1
port_start = 1
priority = 11
protocol = "tcp"
cidr_ip = "192.168.xx.0/26"
prefix_list_id = ""
source_group_id = ""
}
egress_permissions {
description = "test-rule"
policy = "drop"
port_end = -1
port_start = -1
priority = 100
protocol = "all"
cidr_ip = "192.168.xx.0/26"
prefix_list_id = "list-xxx"
source_group_id = "group-xxx"
}
tags {
key = "env"
value = "test"
}
}
Create SecurityGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityGroup(name: string, args: SecurityGroupArgs, opts?: CustomResourceOptions);@overload
def SecurityGroup(resource_name: str,
args: SecurityGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
vpc_id: Optional[str] = None,
description: Optional[str] = None,
egress_permissions: Optional[Sequence[SecurityGroupEgressPermissionArgs]] = None,
ingress_permissions: Optional[Sequence[SecurityGroupIngressPermissionArgs]] = None,
project_name: Optional[str] = None,
security_group_name: Optional[str] = None,
tags: Optional[Sequence[SecurityGroupTagArgs]] = None)func NewSecurityGroup(ctx *Context, name string, args SecurityGroupArgs, opts ...ResourceOption) (*SecurityGroup, error)public SecurityGroup(string name, SecurityGroupArgs args, CustomResourceOptions? opts = null)
public SecurityGroup(String name, SecurityGroupArgs args)
public SecurityGroup(String name, SecurityGroupArgs args, CustomResourceOptions options)
type: bytepluscc:vpc:SecurityGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "bytepluscc_vpc_security_group" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SecurityGroupArgs
- 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 SecurityGroupArgs
- 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 SecurityGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securityGroupResource = new Bytepluscc.Vpc.SecurityGroup("securityGroupResource", new()
{
VpcId = "string",
Description = "string",
EgressPermissions = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupEgressPermissionArgs
{
CidrIp = "string",
Description = "string",
Direction = "string",
Policy = "string",
PortEnd = 0,
PortStart = 0,
PrefixListId = "string",
Priority = 0,
Protocol = "string",
SourceGroupId = "string",
},
},
IngressPermissions = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupIngressPermissionArgs
{
CidrIp = "string",
Description = "string",
Direction = "string",
Policy = "string",
PortEnd = 0,
PortStart = 0,
PrefixListId = "string",
Priority = 0,
Protocol = "string",
SourceGroupId = "string",
},
},
ProjectName = "string",
SecurityGroupName = "string",
Tags = new[]
{
new Bytepluscc.Vpc.Inputs.SecurityGroupTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := vpc.NewSecurityGroup(ctx, "securityGroupResource", &vpc.SecurityGroupArgs{
VpcId: pulumi.String("string"),
Description: pulumi.String("string"),
EgressPermissions: vpc.SecurityGroupEgressPermissionArray{
&vpc.SecurityGroupEgressPermissionArgs{
CidrIp: pulumi.String("string"),
Description: pulumi.String("string"),
Direction: pulumi.String("string"),
Policy: pulumi.String("string"),
PortEnd: pulumi.Int(0),
PortStart: pulumi.Int(0),
PrefixListId: pulumi.String("string"),
Priority: pulumi.Int(0),
Protocol: pulumi.String("string"),
SourceGroupId: pulumi.String("string"),
},
},
IngressPermissions: vpc.SecurityGroupIngressPermissionArray{
&vpc.SecurityGroupIngressPermissionArgs{
CidrIp: pulumi.String("string"),
Description: pulumi.String("string"),
Direction: pulumi.String("string"),
Policy: pulumi.String("string"),
PortEnd: pulumi.Int(0),
PortStart: pulumi.Int(0),
PrefixListId: pulumi.String("string"),
Priority: pulumi.Int(0),
Protocol: pulumi.String("string"),
SourceGroupId: pulumi.String("string"),
},
},
ProjectName: pulumi.String("string"),
SecurityGroupName: pulumi.String("string"),
Tags: vpc.SecurityGroupTagArray{
&vpc.SecurityGroupTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
resource "bytepluscc_vpc_security_group" "securityGroupResource" {
lifecycle {
create_before_destroy = true
}
vpc_id = "string"
description = "string"
egress_permissions {
cidr_ip = "string"
description = "string"
direction = "string"
policy = "string"
port_end = 0
port_start = 0
prefix_list_id = "string"
priority = 0
protocol = "string"
source_group_id = "string"
}
ingress_permissions {
cidr_ip = "string"
description = "string"
direction = "string"
policy = "string"
port_end = 0
port_start = 0
prefix_list_id = "string"
priority = 0
protocol = "string"
source_group_id = "string"
}
project_name = "string"
security_group_name = "string"
tags {
key = "string"
value = "string"
}
}
var securityGroupResource = new SecurityGroup("securityGroupResource", SecurityGroupArgs.builder()
.vpcId("string")
.description("string")
.egressPermissions(SecurityGroupEgressPermissionArgs.builder()
.cidrIp("string")
.description("string")
.direction("string")
.policy("string")
.portEnd(0)
.portStart(0)
.prefixListId("string")
.priority(0)
.protocol("string")
.sourceGroupId("string")
.build())
.ingressPermissions(SecurityGroupIngressPermissionArgs.builder()
.cidrIp("string")
.description("string")
.direction("string")
.policy("string")
.portEnd(0)
.portStart(0)
.prefixListId("string")
.priority(0)
.protocol("string")
.sourceGroupId("string")
.build())
.projectName("string")
.securityGroupName("string")
.tags(SecurityGroupTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
security_group_resource = bytepluscc.vpc.SecurityGroup("securityGroupResource",
vpc_id="string",
description="string",
egress_permissions=[{
"cidr_ip": "string",
"description": "string",
"direction": "string",
"policy": "string",
"port_end": 0,
"port_start": 0,
"prefix_list_id": "string",
"priority": 0,
"protocol": "string",
"source_group_id": "string",
}],
ingress_permissions=[{
"cidr_ip": "string",
"description": "string",
"direction": "string",
"policy": "string",
"port_end": 0,
"port_start": 0,
"prefix_list_id": "string",
"priority": 0,
"protocol": "string",
"source_group_id": "string",
}],
project_name="string",
security_group_name="string",
tags=[{
"key": "string",
"value": "string",
}])
const securityGroupResource = new bytepluscc.vpc.SecurityGroup("securityGroupResource", {
vpcId: "string",
description: "string",
egressPermissions: [{
cidrIp: "string",
description: "string",
direction: "string",
policy: "string",
portEnd: 0,
portStart: 0,
prefixListId: "string",
priority: 0,
protocol: "string",
sourceGroupId: "string",
}],
ingressPermissions: [{
cidrIp: "string",
description: "string",
direction: "string",
policy: "string",
portEnd: 0,
portStart: 0,
prefixListId: "string",
priority: 0,
protocol: "string",
sourceGroupId: "string",
}],
projectName: "string",
securityGroupName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: bytepluscc:vpc:SecurityGroup
properties:
description: string
egressPermissions:
- cidrIp: string
description: string
direction: string
policy: string
portEnd: 0
portStart: 0
prefixListId: string
priority: 0
protocol: string
sourceGroupId: string
ingressPermissions:
- cidrIp: string
description: string
direction: string
policy: string
portEnd: 0
portStart: 0
prefixListId: string
priority: 0
protocol: string
sourceGroupId: string
projectName: string
securityGroupName: string
tags:
- key: string
value: string
vpcId: string
SecurityGroup 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 SecurityGroup resource accepts the following input properties:
- Vpc
Id string - VPC ID to which the security group belongs
- Description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- Egress
Permissions List<Byteplus.Security Group Egress Permission> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Ingress
Permissions List<Byteplus.Security Group Ingress Permission> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- Security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
-
List<Byteplus.
Security Group Tag> - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Vpc
Id string - VPC ID to which the security group belongs
- Description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- Egress
Permissions []SecurityGroup Egress Permission Args - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Ingress
Permissions []SecurityGroup Ingress Permission Args - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- Security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
-
[]Security
Group Tag Args - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- vpc_
id string - VPC ID to which the security group belongs
- description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress_
permissions list(object) - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress_
permissions list(object) - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project_
name string - Project name to which the security group belongs. Default project is 'default' if not specified
- security_
group_ stringname - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- list(object)
- Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- vpc
Id String - VPC ID to which the security group belongs
- description String
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions List<SecurityGroup Egress Permission> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions List<SecurityGroup Ingress Permission> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name String - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group StringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
-
List<Security
Group Tag> - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- vpc
Id string - VPC ID to which the security group belongs
- description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions SecurityGroup Egress Permission[] - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions SecurityGroup Ingress Permission[] - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
-
Security
Group Tag[] - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- vpc_
id str - VPC ID to which the security group belongs
- description str
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress_
permissions Sequence[SecurityGroup Egress Permission Args] - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress_
permissions Sequence[SecurityGroup Ingress Permission Args] - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project_
name str - Project name to which the security group belongs. Default project is 'default' if not specified
- security_
group_ strname - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
-
Sequence[Security
Group Tag Args] - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- vpc
Id String - VPC ID to which the security group belongs
- description String
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions List<Property Map> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions List<Property Map> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name String - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group StringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- List<Property Map>
- Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityGroup resource produces the following output properties:
- Creation
Time string - Security group creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Group stringId - Security group ID
- Service
Managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- Status string
- Security group status. Available means available for use, Creating means being created
- Type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- Creation
Time string - Security group creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Group stringId - Security group ID
- Service
Managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- Status string
- Security group status. Available means available for use, Creating means being created
- Type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- creation_
time string - Security group creation time
- id string
- The provider-assigned unique ID for this managed resource.
- security_
group_ stringid - Security group ID
- service_
managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status string
- Security group status. Available means available for use, Creating means being created
- type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- creation
Time String - Security group creation time
- id String
- The provider-assigned unique ID for this managed resource.
- security
Group StringId - Security group ID
- service
Managed Boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status String
- Security group status. Available means available for use, Creating means being created
- type String
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- creation
Time string - Security group creation time
- id string
- The provider-assigned unique ID for this managed resource.
- security
Group stringId - Security group ID
- service
Managed boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status string
- Security group status. Available means available for use, Creating means being created
- type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- creation_
time str - Security group creation time
- id str
- The provider-assigned unique ID for this managed resource.
- security_
group_ strid - Security group ID
- service_
managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status str
- Security group status. Available means available for use, Creating means being created
- type str
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- creation
Time String - Security group creation time
- id String
- The provider-assigned unique ID for this managed resource.
- security
Group StringId - Security group ID
- service
Managed Boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status String
- Security group status. Available means available for use, Creating means being created
- type String
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
Look up Existing SecurityGroup Resource
Get an existing SecurityGroup 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?: SecurityGroupState, opts?: CustomResourceOptions): SecurityGroup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
egress_permissions: Optional[Sequence[SecurityGroupEgressPermissionArgs]] = None,
ingress_permissions: Optional[Sequence[SecurityGroupIngressPermissionArgs]] = None,
project_name: Optional[str] = None,
security_group_id: Optional[str] = None,
security_group_name: Optional[str] = None,
service_managed: Optional[bool] = None,
status: Optional[str] = None,
tags: Optional[Sequence[SecurityGroupTagArgs]] = None,
type: Optional[str] = None,
vpc_id: Optional[str] = None) -> SecurityGroupfunc GetSecurityGroup(ctx *Context, name string, id IDInput, state *SecurityGroupState, opts ...ResourceOption) (*SecurityGroup, error)public static SecurityGroup Get(string name, Input<string> id, SecurityGroupState? state, CustomResourceOptions? opts = null)public static SecurityGroup get(String name, Output<String> id, SecurityGroupState state, CustomResourceOptions options)resources: _: type: bytepluscc:vpc:SecurityGroup get: id: ${id}import {
to = bytepluscc_vpc_security_group.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.
- Creation
Time string - Security group creation time
- Description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- Egress
Permissions List<Byteplus.Security Group Egress Permission> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Ingress
Permissions List<Byteplus.Security Group Ingress Permission> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- Security
Group stringId - Security group ID
- Security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- Service
Managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- Status string
- Security group status. Available means available for use, Creating means being created
-
List<Byteplus.
Security Group Tag> - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- Vpc
Id string - VPC ID to which the security group belongs
- Creation
Time string - Security group creation time
- Description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- Egress
Permissions []SecurityGroup Egress Permission Args - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Ingress
Permissions []SecurityGroup Ingress Permission Args - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- Security
Group stringId - Security group ID
- Security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- Service
Managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- Status string
- Security group status. Available means available for use, Creating means being created
-
[]Security
Group Tag Args - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- Vpc
Id string - VPC ID to which the security group belongs
- creation_
time string - Security group creation time
- description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress_
permissions list(object) - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress_
permissions list(object) - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project_
name string - Project name to which the security group belongs. Default project is 'default' if not specified
- security_
group_ stringid - Security group ID
- security_
group_ stringname - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- service_
managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status string
- Security group status. Available means available for use, Creating means being created
- list(object)
- Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- vpc_
id string - VPC ID to which the security group belongs
- creation
Time String - Security group creation time
- description String
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions List<SecurityGroup Egress Permission> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions List<SecurityGroup Ingress Permission> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name String - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group StringId - Security group ID
- security
Group StringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- service
Managed Boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status String
- Security group status. Available means available for use, Creating means being created
-
List<Security
Group Tag> - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type String
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- vpc
Id String - VPC ID to which the security group belongs
- creation
Time string - Security group creation time
- description string
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions SecurityGroup Egress Permission[] - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions SecurityGroup Ingress Permission[] - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name string - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group stringId - Security group ID
- security
Group stringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- service
Managed boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status string
- Security group status. Available means available for use, Creating means being created
-
Security
Group Tag[] - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type string
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- vpc
Id string - VPC ID to which the security group belongs
- creation_
time str - Security group creation time
- description str
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress_
permissions Sequence[SecurityGroup Egress Permission Args] - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress_
permissions Sequence[SecurityGroup Ingress Permission Args] - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project_
name str - Project name to which the security group belongs. Default project is 'default' if not specified
- security_
group_ strid - Security group ID
- security_
group_ strname - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- service_
managed bool - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status str
- Security group status. Available means available for use, Creating means being created
-
Sequence[Security
Group Tag Args] - Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type str
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- vpc_
id str - VPC ID to which the security group belongs
- creation
Time String - Security group creation time
- description String
- Description of the security group. Length limit: 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). If not specified, defaults to an empty string
- egress
Permissions List<Property Map> - Description for outbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- ingress
Permissions List<Property Map> - Description for inbound security group rule. Unchanged information is returned as original; unfilled or changed content is considered modified. Please fill in as needed Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- project
Name String - Project name to which the security group belongs. Default project is 'default' if not specified
- security
Group StringId - Security group ID
- security
Group StringName - Security group name. Length: 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Default is security group ID if not specified
- service
Managed Boolean - Indicates whether the security group is managed. true means managed security group, false means unmanaged security group
- status String
- Security group status. Available means available for use, Creating means being created
- List<Property Map>
- Tag list Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type String
- Security group type. 1. default: default security group. 2. normal: custom security group. 3. VpnGW: VPN gateway security group. 4. NatGW: NAT gateway security group. 5. cidr_only: CIDR-Only security group
- vpc
Id String - VPC ID to which the security group belongs
Supporting Types
SecurityGroupEgressPermission, SecurityGroupEgressPermissionArgs
- Cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- Description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- Direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- Policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- Port
End int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- Port
Start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- Prefix
List stringId - Prefix list ID
- Priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- Protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- Source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- Cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- Description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- Direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- Policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- Port
End int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- Port
Start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- Prefix
List stringId - Prefix list ID
- Priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- Protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- Source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr_
ip string - IPv4 CIDR or IPv6 CIDR of the source address
- description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port_
end number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port_
start number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix_
list_ stringid - Prefix list ID
- priority number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- source_
group_ stringid - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip String - IPv4 CIDR or IPv6 CIDR of the source address
- description String
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction String
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy String
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End Integer - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start Integer - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List StringId - Prefix list ID
- priority Integer
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol String
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group StringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List stringId - Prefix list ID
- priority number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr_
ip str - IPv4 CIDR or IPv6 CIDR of the source address
- description str
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction str
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy str
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port_
end int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port_
start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix_
list_ strid - Prefix list ID
- priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol str
- Protocol type. tcp, udp, icmp, icmpv6, all
- source_
group_ strid - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip String - IPv4 CIDR or IPv6 CIDR of the source address
- description String
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction String
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy String
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End Number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start Number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List StringId - Prefix list ID
- priority Number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol String
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group StringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
SecurityGroupIngressPermission, SecurityGroupIngressPermissionArgs
- Cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- Description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- Direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- Policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- Port
End int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- Port
Start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- Prefix
List stringId - Prefix list ID
- Priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- Protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- Source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- Cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- Description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- Direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- Policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- Port
End int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- Port
Start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- Prefix
List stringId - Prefix list ID
- Priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- Protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- Source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr_
ip string - IPv4 CIDR or IPv6 CIDR of the source address
- description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port_
end number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port_
start number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix_
list_ stringid - Prefix list ID
- priority number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- source_
group_ stringid - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip String - IPv4 CIDR or IPv6 CIDR of the source address
- description String
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction String
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy String
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End Integer - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start Integer - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List StringId - Prefix list ID
- priority Integer
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol String
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group StringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip string - IPv4 CIDR or IPv6 CIDR of the source address
- description string
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction string
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy string
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List stringId - Prefix list ID
- priority number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol string
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group stringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr_
ip str - IPv4 CIDR or IPv6 CIDR of the source address
- description str
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction str
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy str
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port_
end int - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port_
start int - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix_
list_ strid - Prefix list ID
- priority int
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol str
- Protocol type. tcp, udp, icmp, icmpv6, all
- source_
group_ strid - Source address security group ID. All NIC addresses in this security group are used as source addresses
- cidr
Ip String - IPv4 CIDR or IPv6 CIDR of the source address
- description String
- Description for the security group rule. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Length: 1–255 characters. If not specified, the original configuration is retained
- direction String
- Security group rule direction. ingress: inbound direction. egress: outbound direction
- policy String
- Access policy. For resources specified by CidrIp, SourceGroupId, or PrefixListId, refers to the NICs in the security group. Values: accept (allow), drop (deny)
- port
End Number - Port range end value. 1. When Protocol is set to tcp or udp, the valid range is 1–65535. 2. When Protocol is set to icmp, icmpv6, or all, only -1 is supported, indicating no port restriction
- port
Start Number - Port range start value. 1. When Protocol is tcp or udp, range is 1–65535. 2. When Protocol is icmp, icmpv6, or all, only -1 is supported, meaning no port restriction
- prefix
List StringId - Prefix list ID
- priority Number
- Security group rule priority. Lower numbers indicate higher priority. Value range: 1–100. Default: 1 if not specified
- protocol String
- Protocol type. tcp, udp, icmp, icmpv6, all
- source
Group StringId - Source address security group ID. All NIC addresses in this security group are used as source addresses
SecurityGroupTag, SecurityGroupTagArgs
Import
$ pulumi import bytepluscc:vpc/securityGroup:SecurityGroup example "security_group_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Monday, Jul 27, 2026 by Byteplus