Update the value for a Deployment's Airflow variable.
astro deployment airflow-variable update
To run this command in an automated process such as a CI/CD pipeline, set the following OS-level environment variables in a way that the Astro CLI can access them:
After setting the variables, this command works for a Deployment without you having to manually authenticate to Astronomer. Astronomer recommends storing
ASTRONOMER_KEY_SECRET as a secret before using it to programmatically update production-level Deployments.
|The ID of the Deployment where you want to update an Airflow variable.||Any valid Deployment ID|
|The name of the Deployment where you want to update Airflow variables. Use as an alternative to ||Any valid Deployment name|
|Update Airflow variables for a Deployment that is not in your current Workspace. If not specified, your current Workspace is assumed.||Any valid Workspace ID|
|The Airflow variable key. Required.||string|
|The Airflow variable value. Required.||string|
|The Airflow variable description.||string|
# update airflow-variable called my-airflow-variable stored in the Deployment with an ID of cl03oiq7d80402nwn7fsl3dmv
astro deployment airflow-variable update --deployment-id cl03oiq7d80402nwn7fsl3dmv --key my-variable ---value VAR
# update airflow-variables stored in the Deployment "My Deployment"
astro deployment airflow-variable update --deployment-name="My Deployment" --key my-variable ---value VAR
## Related Commands
- [`astro deployment airflow-variable create`](cli/astro-deployment-airflow-variable-create.md)
- [`astro deployment airflow-variable list`](cli/astro-deployment-airflow-variable-list.md)