Our setup includes
- A primary VPC where the we have compute engines and Postgres databases that are created with private IP. Let's refer it as main-network,
- Vault deployed in it's own VPC and accessible via Loadbalancer (as per the best practice). Let's refer it as vault-network.
Within main-network compute instances are able to access the DBs with the private IP as the DBs where created with main-network as the parent network while creation. Looking at various VPC details, it seems like the creation process auto creates private-service-access as described in the docs..
The problem - For Vault database secret-engine, Vault needs to be able to access the DB to dynamically generate secrets.
I have tried creating VPC network peering between main-network and vault-network and verified (via netcat) that I can successfully reach machines in the main-network from machines in the vault-network.
However, I cannot reach the DB instances from the nodes in vault-network.
Is it possible to share the access to private-service with a peered vpc network?
I don't want to make the DBs public unless it's the only way.