Instantiating a subnet data object from an id

The subnet data object can be instantiated by passing:

  • name
  • virtual_network_name
  • resource_group_name

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/subnet

…which, if you don’t know the actual id seems a fine way to instantiate a subnet data object.

If, however, you’ve created a subnet which you want to pass to a module, then having to pass 3 separate items of information to essentially look up the unique primary key (id) seems incredibly cumbersome.

Am I missing something, or is there really no way to instantiate a subnet data object from it’s unique id??