Skip to main content

astro deployment inspect

Inspect an Astro Deployment. This command returns a YAML or JSON representation of a Deployment's current configuration and state as shown in the Cloud UI. When the --key flag is used, it returns only the values specified with the flag.

For more information about how to use Deployment files, see Manage Deployments as Code.


astro deployment inspect

When using the --key flag, specify the complete path of the key you want to return the value for, excluding deployment. For example, to return the cluster_id for a specific Deployment, you would run:

astro deployment inspect -n <deployment-name> --key metadata.cluster_id

See Template file contents for all possible values to return.


OptionDescriptionPossible Values
-n, --deployment-nameName of the Deployment to inspect. Use as an alternative to <deployment-id>.Any valid Deployment name
<deployment-id>The ID of the Deployment to inspect.Any valid Deployment ID
--workspace-idSpecify a Workspace to run this command for a Deployment that is outside of your current Workspace.Any valid Workspace ID
-k, --keyReturn only a specific configuration key for a Deployment. For example --key configuration.cluster_id to get a Deployment's cluster ID.Any valid Deployment configuration key
-o, --outputOutput format can be one of: YAML or JSON. By default, inspecting a Deployment returns a file in YAML format.yaml or json
-t, --templateCreate a template file for the inspected Deployment. A template file is a configuration file that includes all information about a Deployment except for its name, description field, and unique metadata.None


# Shows a list of Deployments to inspect and prompts you to choose one
$ astro deployment inspect

# Shows a specific Deployment's configuration
$ astro deployment inspect <deployment-id>

# Shows a specific Deployment's health status
$ astro deployment inspect <deployment-id> --key metadata.status

# Save the current state of a Deployment to a YAML Deployment file
$ astro deployment inspect <deployment-id> > deployment.yaml

# Save a Deployment as a JSON template file
$ astro deployment inspect <deployment-id> --template -o json > deployment.json