Closed AliAllomani closed 5 months ago
Voting for Prioritization
Volunteering to Work on This Issue
💯%
I've not tried this yet but would specifying the tag in the filter argument suffice as a workaround?
Like so:
data "aws_ec2_transit_gateway" "tgw" {
filter {
name = "tag:Name"
values = ["tgw-prod"]
}
}
Or
data "aws_ec2_transit_gateway" "tgw" {
filter {
name = "tag:costcode"
values = ["1234","4321"]
}
}
data "aws_ec2_transit_gateway" "tgw" { filter { name = "tag:Name" values = ["tgw-prod"] } }
Thanks @djsd123 , I have tested it and that works fine !
interestingly the usage of tag:
as a filter name is not mentioned in AWS docs for DescribeTransitGateways
aws ec2 describe-transit-gateways --filters "Name=tag:Name,Values=tgw-prod"
With that, I'm closing this issue as the current filters argument is sufficient for such use-case
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
Adding the support to filter transit gateways by tags for aws_ec2_transit_gateway Data source would be beneficial for use-cases where filtering by the available options supported by AWS API is not sufficient
Filtering by tags can be performed on terraform provider level
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
References
No response
Would you like to implement a fix?
None