It is possible to configure connections via environment variables - AIRFLOW_CONN_*, for instance
`AIRFLOW_CONN_BRAND_INDEX_DB=postgresql+psycopg2://airflow:airflow@db/brand_index` <postgresql+psycopg2://airflow:airflow@db/brand_index%60> Will be used when a connection id of "brand_index_db" (of any case) is loaded via a hook: https://github.com/apache/incubator-airflow/blob/master/airflow/hooks/base_hook.py#L58-L73 <https://github.com/apache/incubator-airflow/blob/master/airflow/hooks/base_hook.py#L58-L73> Sadly this doesn't let us set the extra field https://github.com/apache/incubator-airflow/blob/15feb7dd3f39ba7926ae5817d488e4e54a3d7742/airflow/models.py#L577-L590 <https://github.com/apache/incubator-airflow/blob/15feb7dd3f39ba7926ae5817d488e4e54a3d7742/airflow/models.py#L577-L590> and it has some problems trying to parse uri schemas for things like `google_cloud_platform://` But it might help you in some cases. -ash > On 16 Oct 2017, at 22:58, Frank Maritato <[email protected] > <mailto:[email protected]>> wrote: > > Hi, > > Is there any way to programatically configure the aws_default, emr_default or > other airflow connections? The reason I'm asking is that I'm creating a > docker container and I want it to be preconfigured without ui interaction. I > looked at Puckel's docker-airflow project and I didn’t see anything like this > being done in there. > > Thanks! > -- > Frank Maritato > >
