> ## 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 create

> Create a Deployment.

<Info>
  The behavior and format of this command differs depending on what Astronomer
  product you're using. Use the following tabs to change product contexts.
</Info>

<Tabs>
  <Tab title="Astro">
    Create a Deployment on Astro. This command is functionally identical to using the Astro UI to [create a Deployment](/docs/astro/create-deployment).

    ## Usage

    ```sh wrap theme={null}
    astro deployment create
    ```

    When you use `astro deployment create`, it creates a Deployment with a default Worker Queue that uses default worker types.

    <Note>
      If you don't specify `--cluster-id` or `--cloud-provider`, the Deployment uses your Workspace's default destination when one is set. See [Set a default Deployment destination](/docs/astro/manage-workspaces#set-a-default-deployment-destination).
    </Note>

    Some Deployment configurations, including worker queue and worker type, can be set only by using the `--deployment-file` flag to apply a Deployment file. See [Manage Deployments as code](/docs/astro/manage-deployments-as-code).

    ## Options

    | Option | Description | Possible Values |
    | - | - | - |
    | `--allowed-ip-address-ranges` | If Remote Execution is enabled, limit the Deployment's incoming traffic to the Remote Agents in your environment. | A comma-separated list of CIDR blocks, such as `192.168.0.0/24,10.0.0.0/16`. |
    | `-a`, `--high-availability` | Enables high availability for the Deployment. The default is `disable`. | Either `enable` or `disable`. |
    | `-c`, `--cluster-id` | (Dedicated clusters only) The cluster in which you want to create a Deployment. | A valid cluster ID. |
    | `--cicd-enforcement` | Specify that the Deployment can only accept code deploys from API tokens. Note that in CLI versions before 1.23, this flag was `--enforce-cicd`. | None |
    | `-d`,`--description` | The description for the Deployment. | Any string. Multiple-word descriptions should be specified in quotations (`"`) |
    | `--dag-deploy` | Enables Dag-only deploys for the Deployment. The default is `disable`. | Either `enable` or `disable`. |
    | `--default-task-pod-cpu` | The default task Pod CPUs to use for the Deployment. See [Customize a task's Kubernetes Pod](/docs/astro/kubernetes-executor#customize-a-task’s-kubernetes-pod) for more information. | A numeric value such as `0.25`. This number cannot exceed the values you configured in your [Default pod resources](/docs/astro/deployment-resources#configure-kubernetes-pod-resources) in the UI or in your Deployment configuration file. |
    | `--default-task-pod-memory` | The default task pod memory to use for the Deployment in Gi. See [Customize a task's Kubernetes Pod](/docs/astro/kubernetes-executor#customize-a-task’s-kubernetes-pod) for more information. | A numeric value followed by `Gi`, such as `0.5Gi`. This number cannot exceed the values you configured in your [Default pod resources](/docs/astro/deployment-resources#configure-kubernetes-pod-resources) in the UI or in your Deployment configuration file. |
    | `--deployment-file` | Location of the template file that specifies the configuration of the new Deployment. File can be in either JSON or YAML format. See [Create a Deployment with a Deployment File](/docs/astro/manage-deployments-as-code#create-a-deployment-using-a-template-file). | A valid file path for YAML or JSON template file |
    | `-f`,`--force` | Create the Deployment without prompting for confirmation. | None |
    | `-e`,`--executor` | The executor to use for the Deployment. | AstroExecutor, CeleryExecutor, or KubernetesExecutor |
    | `-m`,`--development-mode` | Set to 'enable' to enable development-only features such as hibernation. When enabled, the Deployment does not have guaranteed uptime SLAs. | `enable` or `disable` |
    | `-n`,`--name` | The name of the Deployment. | Any string. Multiple-word descriptions should be specified in quotations |
    | `-p`, `--cloud-provider` | The Cloud Provider to use for your Deployment. The default is `azure`. | Possible values are `azure`, `aws`, and `gcp` for both standard and dedicated clusters. |
    | `--region` | The region where you want to host the Deployment. | The code for any [supported region](/docs/astro/resource-reference-hosted#standard-cluster-regions) |
    | `--remote-execution-enabled` | Enables [Remote Execution](/docs/astro/execution-mode#remote-execution) for the Deployment. | None |
    | `--resource-quota-cpu` | The Deployment's CPU resource quota for Kubernetes Pods. See [Customize a task's Kubernetes Pod](/docs/astro/kubernetes-executor#customize-a-task’s-kubernetes-pod) for more information. | A numeric value such as `10`. This number cannot exceed the values you configured in your [Default pod resources](/docs/astro/deployment-resources#configure-kubernetes-pod-resources) in the UI or in your [Deployment file](/docs/astro/deployment-file-reference) configuration file. |
    | `--resource-quota-memory` | The Deployment's memory resource quota for Kubernetes Pods in Gi. See [Customize a task's Kubernetes Pod](/docs/astro/kubernetes-executor#customize-a-task’s-kubernetes-pod) for more information. | A numeric value followed by `Gi`, such as `20Gi`. This number cannot exceed the values you configured in your [Default pod resources](/docs/astro/deployment-resources#configure-kubernetes-pod-resources) in the UI or in your [Deployment file](/docs/astro/deployment-file-reference) configuration file. |
    | `-s`,`--scheduler-size` | The size of scheduler for the Deployment. The default is `small`. | Either `small`, `medium`, `large`, or `extra_large`. `extra_large` schedulers require a minimum Astro Runtime version of 9.7.0. |
    | `--task-log-bucket` | If Remote Execution is enabled, specify the cloud storage bucket for task log storage. You can [configure your Deployment to show the stored logs directly in the Airflow UI](/docs/astro/remote-execution/remote-task-logs-af-ui). | A valid cloud storage bucket name, such as `gs://my-task-logs` or `s3://my-task-logs`. |
    | `--task-log-url-pattern` | If Remote Execution is enabled, specify the URL template to link to task logs stored in an external logging provider from the Airflow UI. | A string URL template. See [Configure external logging provider for Remote Execution Deployments](/docs/astro/remote-execution/remote-task-logs-external#configure-external-logging-provider-for-remote-execution-deployments). |
    | `--type` | The type of cluster you want to run the Deployment on. The default is `standard`. | Either `dedicated` or `standard`. |
    | `-v`,`--runtime-version` | The Astro Runtime version for the Deployment | Any supported version of Astro Runtime. Major, minor, and patch versions must be specified. |
    | `--wait` | Wait for the new Deployment to have a [healthy](/docs/astro/deployment-health-incidents) status before completing the command. | None |
    | `--wait-time` | Time to wait for the Deployment to become healthy before ending the command. Can only be used with `--wait=true`. | A time duration amount, such as `10s` or `1m11s`. |
    | `--workload-identity` | The workload identity to use for the Deployment. You must use this flag with `--cloud-provider`. | A valid AWS `arn` or a GCP service account. |
    | `--workspace-id` | The Workspace in which to create a Deployment. If not specified, your current Workspace is assumed. | Any valid Workspace ID |

    ## Examples

    ```bash wrap theme={null}
    # CLI prompts you for a Deployment name and cluster
    astro deployment create

    # Create a Deployment with all required information specified. The CLI will not prompt you for more information
    astro deployment create -d="My Deployment Description" --name="My Deployment Name" --cluster-id="ckwqkz36200140ror6axh8p19"

    # Specify the new Deployment's configuration with a yaml file
    astro deployment create --deployment-file deployment.yaml

    # Create a deployment on Astro using a standard cluster
    astro deployment create --name="my-gcp-deployment" --region="us-central1"

    # Create a deployment on Astro using a dedicated cluster
    astro deployment create --name="my-gcp-deployment" --cluster-type="dedicated" --cluster-id="clj123n1311p901muj9hwpgjb"
    ```
  </Tab>

  <Tab title="APC">
    Create a Deployment on Astro Private Cloud. This command is functionally identical to using the UI to create a Deployment.

    ## Usage

    ```sh wrap theme={null}
    astro deployment create
    ```

    ## Options

    | Option | Description | Possible Values |
    | - | - | - |
    | `-a`,`--airflow-version` | The Astronomer Certified version to use for the Deployment | Any supported version of Astronomer Certified |
    | `-c`, `--cloud-role` | An AWS or GCP IAM role to append to your Deployment's webserver, scheduler, and worker Pods | Any string |
    | `-t`, `--dag-deployment-type` | The dag deploy method for the Deployment | Can be either `image`, `git_sync`, or `volume`. The default is `image` |
    | `-d`,`--description` | The description for the Deployment | Any string. Multiple-word descriptions should be specified in quotations (`"`) |
    | `-e`, `--executor` | The executor type for the Deployment | `local`, `celery`, or `kubernetes`. The default value is `celery` |
    | `-b`, `--git-branch-name` | The branch name of the git repository to sync your Deployment from. Must be specified with `--dag-deployment-type=git_sync` | Any valid git branch name |
    | `-u`, `--git-repository-url` | The URL for the git repository to sync your Deployment from. Must be specified with `--dag-deployment-type=git_sync` | Any valid git repository URL |
    | `-v`, `--git-revision` | The commit reference of the branch that you want to sync with your Deployment. Must be specified with `--dag-deployment-type=git_sync` | Any valid git revision |
    | `--known-hosts` | The public key for your Git provider, which can be retrieved using `ssh-keyscan -t rsa <provider-domain>`. Must be specified with `--dag-deployment-type=git_sync` | Any valid public key |
    | `-l`,`--label` | The label for your Deployment | Any string |
    | `--mode` | Creates an Operator-mode Deployment. Requires Astro Private Cloud 2.1.0 or later. | `helm` or `operator`. The default value is `helm` |
    | `-n`,`--nfs-location` | The location for an NFS volume mount. Must be specified with `--dag-deployment-type=volume`. | An NFS volume mount specified as: `<IP>:/<path>`. Input is automatically prepended with `nfs:/` - do not include this in your input |
    | `-r`,`--release-name` | A custom release name for the Deployment. See [Customize release names](https://www.astronomer.io/docs/software/configure-deployment#customize-release-names) | Any string of alphanumeric and hyphen characters |
    | `--runtime-version` | The Astro Runtime version for the Deployment | Any supported version of Astro Runtime. Major, minor, and patch versions must be specified. |
    | `--ssh-key` | The SSH private key for your Git repository. Must be specified with `--dag-deployment-type=git_sync` | Any valid SSH key |
    | `-s`,`--sync-interval` | The time interval between checks for updates in your Git repository, in seconds. Must be specified with `--dag-deployment-type=git_sync` | Any integer |
    | `-t`,`--triggerer-replicas` | Number of replicas to use for the Airflow triggerer | Any integer between 0 - 2. The default value is 1. |
    | `--workspace-id` | The Workspace in which to create a Deployment. If not specified, your current Workspace is assumed | Any valid Workspace ID |

    ## Examples

    ```sh wrap theme={null}
    $ astro deployment create
    # CLI prompts you for a Deployment name

    $ astro deployment create -l="My Deployment label" --workspace-id="ckwqkz36200140ror6axh8p19"
    # Create a Deployment in a separate Workspace. The CLI will not prompt you for more information
    ```
  </Tab>
</Tabs>

## Related commands

* [`astro deployment delete`](/docs/cli/v1.46/astro-deployment-delete)
* [`astro deployment list`](/docs/cli/v1.46/astro-deployment-list)
