Skip to main content

security_groups

Used to retrieve a list of security_groups in a region or create a security_groups resource, use security_group to operate on an individual resource.

Overview

Namesecurity_groups
TypeResource
DescriptionResource Type definition for AWS::EC2::SecurityGroup
Idaws.ec2.security_groups

Fields

NameDatatypeDescription
idstringThe group name or group ID depending on whether the SG is created in default or specific VPC
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTdata__DesiredState, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
id
FROM aws.ec2.security_groups
WHERE region = 'us-east-1'

Permissions

To operate on the security_groups resource, the following permissions are required:

Create

ec2:CreateSecurityGroup,
ec2:DescribeSecurityGroups,
ec2:RevokeSecurityGroupEgress,
ec2:AuthorizeSecurityGroupEgress,
ec2:AuthorizeSecurityGroupIngress,
ec2:CreateTags

List

ec2:DescribeSecurityGroups