Hi,@Ayush P Gupta (O) Welcome to Microsoft Q&A thanks for posting your question
Modifying the pg_hba.conf file on Azure Database for PostgreSQL - Flexible Server instance is not supported yet.
You have to set up Logical replication for this requirement please follow the steps mentioned in the Azure documentation for replicating data using logical replication to set up the replication process.https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-logical
Please let me know if you have any additional questions.
Regards
Geetha