Data Source: aws_ec2_transit_gateway_attachments

Get information on EC2 Transit Gateway Attachments.

Example Usage

By Filter

data "aws_ec2_transit_gateway_attachments" "filtered" {
  filter {
    name   = "state"
    values = ["pendingAcceptance"]
  }

  filter {
    name   = "resource-type"
    values = ["vpc"]
  }
}

data "aws_ec2_transit_gateway_attachment" "unit" {
  count                         = length(data.aws_ec2_transit_gateway_attachments.filtered.ids)
  transit_gateway_attachment_id = data.aws_ec2_transit_gateway_attachments.filtered.ids[count.index]
}

Argument Reference

This data source supports the following arguments:

filter Argument Reference

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Timeouts

Configuration options: