I have an existing VPC in a separate account and am creating independent terraforms for more vpc's in new accounts. I wish to peer specific vpc's within each account but am finding it hard to programatically obtain the vpc_id from the target vpc's. As these vpc's are ephemeral so the vpd_id's will change I want to code this instead of logging into the account to get the vpc_id from the console.
I have tried many variations of data sources and combined with resource "aws_vpc_peering_connection", resource "aws_vpc_peering_connection_accepter" but so far am failing.
Any help would be appreciated.