I need to reference my VNET Gateway residing in an infrastructure folder, in a VPN folder in order to connect a VPN utilising a Local Network Gateway, but these could be any object in Azure for the sake of argument. These folders both use seperate state files hosted in Azure blob storage.
What would be the best way to go about calling this VNET Gateway's ID in another folder? The usual methods of using e.g "module.vnet_gateway.id" or e.g "data.azurerm_vnet_gateway.id" won't work in this scenario.
I've considered some way of referencing it by name, which I know, and pulling the id as an output, but I'm not certain this is the best method.
I've read about using remote-state, which I assume as per the guides on Google would involve creating a data-source pointed to my specific state file for "inf", and then pulling the data back, but I've yet to find a good example on Azure of how to achieve this.
Any pointers or examples StackExchange could provide to get me in the right direction?