Resource: awsEc2TransitGatewayPeeringAttachmentAccepter
Manages the accepter's side of an EC2 Transit Gateway Peering Attachment.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ec2TransitGatewayPeeringAttachmentAccepter.Ec2TransitGatewayPeeringAttachmentAccepter(
this,
"example",
{
tags: {
Name: "Example cross-account attachment",
},
transitGatewayAttachmentId:
"${aws_ec2_transit_gateway_peering_attachment.example.id}",
}
);
A full example of how to create a Transit Gateway in one AWS account, share it with a second AWS account, and attach a to a Transit Gateway in the second account via the awsEc2TransitGatewayPeeringAttachment
resource can be found in the /examples/transitGatewayCrossAccountPeeringAttachment
directory within the Github Repository.
Argument Reference
The following arguments are supported:
transitGatewayAttachmentId
- (Required) The ID of the EC2 Transit Gateway Peering Attachment to manage.tags
- (Optional) Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- EC2 Transit Gateway Attachment identifiertransitGatewayId
- Identifier of EC2 Transit Gateway.peerTransitGatewayId
- Identifier of EC2 Transit Gateway to peer with.peerAccountId
- Identifier of the AWS account that owns the EC2 TGW peering.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
awsEc2TransitGatewayPeeringAttachmentAccepter
can be imported by using the EC2 Transit Gateway Attachment identifier, e.g.,