> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# astro deployment airflow-variable update

<Info>
  This command is only available on Astro.
</Info>

Update the value for a Deployment's Airflow variable.

## Usage

```sh wrap theme={null}
astro deployment airflow-variable update
```

<Tip>
  This command is recommended for automated workflows. To run this command in an automated process such as a [CI/CD pipeline](/docs/astro/set-up-ci-cd), you can generate an API token, then specify the `ASTRO_API_TOKEN` environment variable in the system running the Astro CLI:

  ```bash wrap theme={null}
  export ASTRO_API_TOKEN=<your-token>
  ```

  See [Organization](/docs/astro/organization-api-tokens), [Workspace](/docs/astro/workspace-api-tokens), and [Deployment](/docs/astro/deployment-api-tokens) API token documentation for more details about ways to use API tokens.
</Tip>

## Options

| Option                 | Description                                                                                                                           | Possible Values           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `-d`,`--deployment-id` | The ID of the Deployment where you want to update an Airflow variable.                                                                | Any valid Deployment ID   |
| `--deployment-name`    | The name of the Deployment where you want to update Airflow variables. Use as an alternative to `<deployment-id>`.                    | Any valid Deployment name |
| `-w`,`--workspace-id`  | 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    |
| `-k`,`--key`           | The Airflow variable key. Required.                                                                                                   | string                    |
| `-v`,`--value`         | The Airflow variable value. Required.                                                                                                 | string                    |
| `--description`        | The Airflow variable description.                                                                                                     | string                    |

## Examples

```bash wrap theme={null}
# 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`](astro-deployment-airflow-variable-create)
- [`astro deployment airflow-variable list`](astro-deployment-airflow-variable-list)
```
