published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
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
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
securityGroupDemo:
type: volcenginecc: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
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: volcenginecc:vpc:SecurityGroup
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 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.
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<Volcengine.Security Group Egress Permission> - Ingress
Permissions List<Volcengine.Security Group Ingress Permission> - 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<Volcengine.
Security Group Tag>
- 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 - Ingress
Permissions []SecurityGroup Ingress Permission Args - 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
- 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> - ingress
Permissions List<SecurityGroup Ingress Permission> - 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>
- 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[] - ingress
Permissions SecurityGroup Ingress Permission[] - 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[]
- 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] - ingress_
permissions Sequence[SecurityGroup Ingress Permission Args] - 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]
- 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> - ingress
Permissions List<Property Map> - 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>
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 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: volcenginecc:vpc:SecurityGroup 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.
- 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<Volcengine.Security Group Egress Permission> - Ingress
Permissions List<Volcengine.Security Group Ingress Permission> - 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<Volcengine.
Security Group Tag> - 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 - Ingress
Permissions []SecurityGroup Ingress Permission Args - 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 - 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> - ingress
Permissions List<SecurityGroup Ingress Permission> - 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> - 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[] - ingress
Permissions SecurityGroup Ingress Permission[] - 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[] - 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] - ingress_
permissions Sequence[SecurityGroup Ingress Permission Args] - 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] - 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> - ingress
Permissions List<Property Map> - 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>
- 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 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 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 volcenginecc:vpc/securityGroup:SecurityGroup example "security_group_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
