I am trying to run FusionAuth inside an Azure Container App and use Azure Postgresql Flexible Server for its configuration. I can access the FusionAuth instance via the Azure URL and it comes up with the maintenance mode screen for me to configure the database.I am having trouble though connecting to the Azure PostgreSql instance.
I have added the Container Apps Environment to a Virtual Network and configured the Azure PostgreSql server to use a subnet. I have delegated the Postgres instance to that subnet and a private dns zone.
Everything deploys fine via Bicep with no errors but I still can't connect to the database from the container app.
Has anyone done this or something similar? Should I be using managed identities instead?
I'm a programmer not a DevOps person so this is pretty alien to me. Any help welcome. I can share Bicep files etc if required.
Some extra info:
The vNet has one subnet in which the PostgreSql is assigned and delegated. The container app environment is just configured with the vNet.
The FusionAuth container app ingress allows traffic from anywhere, should this be VNet??
I currently do not have any firewall rules. Examples I have looked at don't seem to use them.
Would I still need the vNet if I used Managed Identities?