describe-transit-gateways get transit-gateway-ID using its description row


So, i wanted to get transit-gateway-id using description line (or maybe better to use tag?) that i have added to it when i was creating the transit-gateway. Now im trying to get transit-gateway-id using this command aws ec2 describe-transit-gateways.

But im stuck with using --filter, cant really understand if it is even possible. Thanks

1 Answer
Accepted Answer

Upon review of the documentation, it did not appear to be possible to filter by description field or tag.

--filters (list)

One or more filters. The possible values are:

  • options.propagation-default-route-table-id - The ID of the default propagation route table.
  • - The private ASN for the Amazon side of a BGP session.
  • options.association-default-route-table-id - The ID of the default association route table.
  • - Indicates whether there is automatic acceptance of attachment requests (enable | disable ).
  • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable ).
  • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable ).
  • options.dns-support - Indicates whether DNS support is enabled (enable | disable ).
  • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable ).
  • owner-id - The ID of the Amazon Web Services account that owns the transit gateway. state - The state of the transit gateway (available | deleted | deleting | modifying | pending ).
  • transit-gateway-id - The ID of the transit gateway.
profile picture
answered a month ago
profile picture
reviewed 25 days ago
profile picture
reviewed a month ago
  • Welp, yeah, if it is the only possible values for filtering, then sad.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions