Skip to main content

vpc_peering_connections

Creates, updates, deletes or gets a vpc_peering_connection resource or lists vpc_peering_connections in a region

Overview

Namevpc_peering_connections
TypeResource
DescriptionResource Type definition for AWS::EC2::VPCPeeringConnection
Idawscc.ec2.vpc_peering_connections

Fields

NameDatatypeDescription
peer_role_arnstringThe Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account.
vpc_idstringThe ID of the VPC.
peer_vpc_idstringThe ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
idstring
peer_regionstringThe Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.
peer_owner_idstringThe AWS account ID of the owner of the accepter VPC.
tagsarray
regionstringAWS region.

For more information, see AWS::EC2::VPCPeeringConnection.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_peering_connectionsINSERTVpcId, PeerVpcId, region
delete_resourcevpc_peering_connectionsDELETEIdentifier, region
update_resourcevpc_peering_connectionsUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_peering_connections_list_onlySELECTregion
get_resourcevpc_peering_connectionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual vpc_peering_connection.

SELECT
region,
peer_role_arn,
vpc_id,
peer_vpc_id,
id,
peer_region,
peer_owner_id,
tags
FROM awscc.ec2.vpc_peering_connections
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new vpc_peering_connection resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.vpc_peering_connections (
VpcId,
PeerVpcId,
region
)
SELECT
'{{ vpc_id }}',
'{{ peer_vpc_id }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a vpc_peering_connection resource, using stack-deploy.

/*+ update */
UPDATE awscc.ec2.vpc_peering_connections
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.vpc_peering_connections
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

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

ec2:DescribeVpcPeeringConnections