metadata and environment_variables section, and the name and description fields are empty. Deployment template files are used to create new Deployments, while a Deployment file of an existing Deployment can be used to update its configuration. To create a Deployment template file in YAML format, run astro deployment inspect <your-deployment-id> --template > your-deployment.yaml.
Use this document as a reference for all fields in both Deployment files and Deployment template files.
Deployment file example
To see the minimum values required to create a Deployment using a template file, see Create a Deployment using a template file.
deployment.yaml
deployment.environment_variables
You can create, update, or delete environment variables in the environment_variables section of the template file. This is equivalent to configuring environment variables in the Deployment’s Environment Variables tab in your Deployment’s Environment settings. Each variable in this section must include a key and a value.
By default, each variable is created as a non-secret variable. To set any new or existing environment variables as secret, specify is_secret: true in the same section as the key and value. For example:
deployment.configuration
The configuration section contains all of the basic settings that you can configure from the Deployment Details page in the Astro UI. See:
deployment.worker_queues
The worker_queues section defines the worker queues for Deployments that use the Celery executor. This section is not applicable to Deployments that use Kubernetes executor.
If you don’t enter specific values for the default worker queue for a Deployment, Astro uses default values based on the worker types available on your cluster. Each additional worker queue must include a name and worker_type. The Astro CLI uses default values for any other unspecified fields.
Other fields
deployment_typecan beHOSTED_SHAREDorHOSTED_DEDICATEDfor Astro Hosted depending on your cluster type. UseHOSTED_SHAREDfor standard clusters andHOSTED_DEDICATEDfor dedicated clusters.cluster_nameis the name for the cluster that appears in the Astro UI.