Skip to main content

astro deployment airflow-variable create


This command is only available on Astro.

Create Airflow variables on a Deployment. Airflow variables are stored in the Deployment's metadata database and appear in the Airflow UI.


astro deployment airflow-variable create

This command is recommended for automated workflows. To run this command in an automated process such as a CI/CD pipeline, you can generate an API token, then specify the ASTRO_API_TOKEN environment variable in the system running the Astro CLI:

export ASTRO_API_TOKEN=<your-token>

See Organization, Workspace, and Deployment API token documentation for more details about ways to use API tokens.


OptionDescriptionPossible Values
-d,--deployment-idThe ID of the Deployment where you want to create Airflow variables.Any valid Deployment ID
--deployment-nameThe name of the Deployment where you want to create Airflow variables. Use as an alternative to <deployment-id>.Any valid Deployment name
-w,--workspace-idCreate Airflow variables in a Deployment that is not in your current Workspace. If not specified, your current Workspace is assumed.Any valid Workspace ID
-k,--keyThe Airflow variable key. Required.string
-v,--valueThe Airflow variable value. Required.string
--descriptionThe Airflow variable description.string


# create airflow variable called my-variable stored in the Deployment with an ID of cl03oiq7d80402nwn7fsl3dmv
astro deployment airflow-variable create --deployment-id cl03oiq7d80402nwn7fsl3dmv --key my-variable ---value VAR

# create airflow-variables stored in the Deployment "My Deployment"
astro deployment airflow-variable create --deployment-name="My Deployment" --key my-variable --value VAR

Was this page helpful?

Sign up for Developer Updates

Get a summary of new Astro features once a month.

You can unsubscribe at any time.
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.