apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.5k stars 14.13k forks source link

Enhance Variable.set to create versions in GCP Secret Manager when backend is connected #40438

Open mehdigati opened 3 months ago

mehdigati commented 3 months ago

Description

When Airflow is configured to use GCP Secret Manager as the backend for variable storage, Variable.get() retrieves the latest version of the secret from Secret Manager. However, Variable.set() currently creates a variable in the Airflow database instead of creating a new version in Secret Manager.

This inconsistency can lead to confusion and potential security risks.

I propose enhancing Variable.set() method to add the possibility to create a new version of the secret in Secret Manager when the backend is connected, maintaining consistency with Variable.get() behavior.

Use case/motivation

Related issues

None that I'm aware of.

Are you willing to submit a PR?

Code of Conduct