Get information on EC2 Transit Gateway VPC Attachments.
data "aws_ec2_transit_gateway_vpc_attachments" "filtered" {
filter {
name = "state"
values = ["pendingAcceptance"]
}
}
data "aws_ec2_transit_gateway_vpc_attachment" "unit" {
count = length(data.aws_ec2_transit_gateway_vpc_attachments.filtered.ids)
id = data.aws_ec2_transit_gateway_vpc_attachments.filtered.ids[count.index]
}
This data source supports the following arguments:
filter
- (Optional) One or more configuration blocks containing name-values filters. Detailed below.name
- (Required) Name of the filter check available value on official documentationvalues
- (Required) List of one or more values for the filter.This data source exports the following attributes in addition to the arguments above:
ids
A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the aws_ec2_transit_gateway_vpc_attachment data source, searching by identifier.read
- (Default 20m
)