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
Name | security_groups |
Type | Resource |
Description | Resource Type definition for AWS::EC2::SecurityGroup |
Id | aws.ec2.security_groups |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The group name or group ID depending on whether the SG is created in default or specific VPC |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | data__DesiredState, region |
list_resource | SELECT | region |
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