0

I've lost a day trying to figure this out so I'm really hoping that someone can point me in the right direction.

We have a PostgreSQL (flexibile server) hosted on Microsoft Azure that has no public internet access. (in its own resource group)

We also have a selection of Azure ContainerApp's (using a managed environment) that need to connect to this PostgreSQL server but for the life of me I can not figure out how to make this happen?

Using AWS, I'd be able to accomplish this with security groups in about 2 seconds but the way containerApps run in a managed environment seems to be causing me some headache.

Can anyone point me in the right direction?

Mark Dalby
  • 61
  • 1
  • 6

1 Answers1

0

I have followed the below steps to connect a AzureContainerApp to an azure hosted PostgreSQL flexible server that isn't open to the internet.

Step-1: Create virtual network with two subnets. enter image description here

Step-2: While creating Postgres SQL server, select Private access (VNet Integration) in connectivity method and select the vnet and subnet created in step-1.

enter image description here

Step-3: Next while creating container app, create new container app environment and go to networking and choose vnet created in step-1. enter image description here

enter image description here

Step-4: Now to check the connectivity from container app to postgres sql server, I connected to a container and used ping and telnet commands to verfiy.

telnet <sql-server-url> 5432
ping <sql-server-url>

enter image description here enter image description here

HowAreYou
  • 605
  • 2
  • 6