Open LinusU opened 2 years ago
Hey @LinusU 👋 Unless I'm misunderstanding the request, this is currently possible by using the route_table_id argument:
data "aws_route_table" "foo" {
route_table_id = "rtb-123456789"
}
Hehe, you're very correct, I must have missed that!
It is a bit surprising though, since most (all?) other data resources uses just id
instead of ${name}_id
? 🤔 e.g. aws_subnet
, aws_vpc
, aws_vpn_gateway
Do you want me to close this or could we consider adding id
as well, or maybe a line to the documentation that tells users to use route_table_id
?
Hey @LinusU 👋 It happens! I definitely see where you're coming from with regards to most resources using id
rather than ${name}_id
.
My perspective is that it is probably worth leaving this issue open for now so that we can gather additional feedback. We generally use "👍" reactions on issues to get an idea of community interest, so if this issue starts to get more reactions, it may be worth looking into adding the id
attribute. Until then, I'd hesitate to ask you to work on a PR to add the id
attribute, as if there's not much community feedback asking for the same thing, the PR may sit for a while waiting on a review, and I'd not want to take up your time in the meantime.
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
This still seems relevant
Community Note
Description
Could we add the
id
attribute to theaws_route_table
data source? Specifically, I would like to be able to do this:And then later be able to reference data from it.
New or Affected Resource(s)
aws_route_table
Potential Terraform Configuration
References
n/a