Skip to main content

security_group_references

Creates, updates, deletes, gets or lists a security_group_references resource.

Overview

Namesecurity_group_references
TypeResource
Idaws.ec2.security_group_references

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
group_idstringThe ID of your security group.
referencing_vpc_idstringThe ID of the VPC with the referencing security group.
transit_gateway_idstringThe ID of the transit gateway (if applicable).
vpc_peering_connection_idstringThe ID of the VPC peering connection (if applicable). For more information about security group referencing for peering connections, see Update your security groups to reference peer security groups in the VPC Peering Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_security_group_referencesselectGroupId, regionDryRunDescribes the VPCs on the other side of a VPC peering or Transit Gateway connection that are referencing the security groups you've specified in this request.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
GroupIdarrayThe IDs of the security groups in your account.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

SELECT examples

Describes the VPCs on the other side of a VPC peering or Transit Gateway connection that are referencing the security groups you've specified in this request.

SELECT
group_id,
referencing_vpc_id,
transit_gateway_id,
vpc_peering_connection_id
FROM aws.ec2.security_group_references
WHERE GroupId = '{{ GroupId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;