Resource
aws.ec2.VpcPeeringConnection
Describes a VPC peering connection.
Example
let requester_vpc = aws.ec2.Vpc {
cidr_block = '10.0.0.0/16'
tags = {
Environment = 'example'
}
}
let accepter_vpc = aws.ec2.Vpc {
cidr_block = '10.1.0.0/16'
tags = {
Environment = 'example'
}
}
aws.ec2.VpcPeeringConnection {
# Accept the request before routing traffic. Same-account requests are not
# auto-accepted, and an unaccepted request expires after 7 days.
vpc_id = requester_vpc.vpc_id
peer_vpc_id = accepter_vpc.vpc_id
tags = {
Environment = 'example'
}
}
Argument Reference
peer_owner_id
- Type:
AwsAccountId (pattern: /^[0-9]{12}$/ (Full), len: 12..=12) - Required: No
The Amazon Web Services account ID of the owner of the accepter VPC. Default: Your Amazon Web Services account ID
peer_vpc_id
- Type:
VpcId (pattern: /^vpc-[0-9a-f]{8,}$/ (Full)) - Required: Yes
The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
vpc_id
- Type:
VpcId (pattern: /^vpc-[0-9a-f]{8,}$/ (Full)) - Required: Yes
The ID of the requester VPC. You must specify this parameter in the request.
tags
- Type: Map<
String,String> - Required: No
The tags for the resource.
Attribute Reference
vpc_peering_connection_id
- Type:
VpcPeeringConnectionId (pattern: /^pcx-[0-9a-f]{8,}$/ (Full)) - Read-only
The ID of the VPC peering connection.