We’re trying to set up proper environment isolation using custom private networks. The goal is to ensure that if a dev/staging app is compromised, it cannot access production services or databases.
Our setup:
- Multiple apps (dev, staging, prod)
- Managed Postgres (MPG) for databases
- Want prod app + prod database isolated from other environments
The problem:
- MPG clusters appear to live on the org’s default private network
- Apps on custom 6PNs (
fly apps create prod-app --network prod-network) cannot reach MPG - The only workaround mentioned in docs/forums is Flycast bridging
Our concern with bridging:
Doesn’t bridging networks defeat the isolation purpose? If we bridge prod-network to the default network so prod can reach MPG, then any compromised app on the default network could potentially reach prod services through that bridge.
Questions:
- Is there a way to create MPG clusters on a specific custom 6PN?
- If not, what’s the recommended pattern for environment isolation with MPG?
- Is the alternative to deploy Postgres as a generic app on our isolated network instead of using MPG?
Any guidance appreciated!