'Google Composer / Airflow - connection to MongoDB Atlas

We have an airflow task that adds data to the mongodb server. We can connect to the mongodb server only behind IP Access or VPC Peering. We are having issues with VPC Peering, so we thought we can just enable direct IP access between the airflow workers and the mongodb server

Has anyone done that? If not, do you have another suggestion?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source