nonoDa
nonoDa

Reputation: 453

GCP command to retrieve an SMTP Password for airflow

I've followed kaxil answer in How to set up Airflow Send Email? to setup airflow, however gcp doesn't allow to set:

smtp_password = 16_DIGIT_APP_PASSWORD 

explicity inside cloud composer. I checked on google documentation https://cloud.google.com/composer/docs/configure-email#smtp_password and found out that there is a way to set it by Using a command to retrieve an SMTP password.

Upvotes: 3

Views: 1239

Answers (1)

Iñigo González
Iñigo González

Reputation: 3955

There is an better way to do this than smtp_passwd_cmd:

This is better explained here: https://cloud.google.com/composer/docs/composer-2/configure-email#using_a_secret_stored_in_to_retrieve_an_smtp_password

This way everything is just configuration.

Using Google Cloud Secret Manager for this purpose falls in the free tier for the service (see Secret Manager pricing)

Upvotes: 3

Related Questions