Data Source: awsEc2TransitGatewayVpnAttachment
Get information on an EC2 Transit Gateway VPN Attachment.
-> EC2 Transit Gateway VPN Attachments are implicitly created by VPN Connections referencing an EC2 Transit Gateway so there is no managed resource. For ease, the awsVpnConnection
resource includes a transitGatewayAttachmentId
attribute which can replace some usage of this data source. For tagging the attachment, see the awsEc2Tag
resource.
Example Usage
By Transit Gateway and VPN Connection Identifiers
/*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.dataAwsEc2TransitGatewayVpnAttachment.DataAwsEc2TransitGatewayVpnAttachment(
this,
"example",
{
transitGatewayId: "${aws_ec2_transit_gateway.example.id}",
vpnConnectionId: "${aws_vpn_connection.example.id}",
}
);
Filter
/*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.dataAwsEc2TransitGatewayVpnAttachment.DataAwsEc2TransitGatewayVpnAttachment(
this,
"test",
{
filter: [
{
name: "resource-id",
values: ["some-resource"],
},
],
}
);
Argument Reference
The following arguments are supported:
transitGatewayId
- (Optional) Identifier of the EC2 Transit Gateway.vpnConnectionId
- (Optional) Identifier of the EC2 VPN Connection.filter
- (Optional) Configuration block(s) for filtering. Detailed below.tags
- (Optional) Map of tags, each pair of which must exactly match a pair on the desired Transit Gateway VPN Attachment.
filter Configuration Block
The following arguments are supported by the filter
configuration block:
name
- (Required) Name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.values
- (Required) Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Attribute Reference
In addition to all arguments above, the following attributes are exported:
id
- EC2 Transit Gateway VPN Attachment identifiertags
- Key-value tags for the EC2 Transit Gateway VPN Attachment
Timeouts
read
- (Default20M
)