Mass Instance Deploy
mass instance deploy​
Deploy instances
Synopsis​
Deploy instances on Massdriver.
Your IaC must be published as a bundle to Massdriver first and be added to an environment's canvas.
Configuration is part of a deployment. Running deploy without any flags reuses the configuration of the most recent deployment.
Examples​
You can deploy using the instance ID.
The ID can be found in the details panel in the Massdriver UI. The instance ID is a combination of the <project-id>-<env-id>-<component-id>.
Redeploy with the same configuration as the last deployment:
mass instance deploy ecomm-prod-vpc
Deploy with a new full configuration.
mass instance deploy ecomm-prod-vpc --params=params.json
mass instance deploy ecomm-prod-vpc --params=params.tfvars
mass instance deploy ecomm-prod-vpc --params=params.yaml
mass instance deploy ecomm-prod-vpc --params=params.toml
$VAR and ${VAR} in params are replaced with environment variables that are set. A reference to a variable that is not set stays as written, and the CLI prints a warning naming it. Write $$ for a literal $, for example in a jq program:
{"region": "${AWS_REGION}", "filter": "select(.status == $$status)"}
Deploy with configuration read from STDIN:
echo '{"hello": "world"}' | mass instance deploy ecomm-prod-vpc --params=-
Copy configuration between environments:
mass instance get api-prod-web -o json | jq .params | mass instance deploy api-staging-web --params=-
Patch the last deployed configuration with one or more JQ expressions:
mass instance deploy ecomm-prod-db --patch='.version = "13.4"'
mass instance deploy ecomm-prod-db --patch='.version = "13.4"' --patch='.size = "large"'
Run a dry-run plan to preview changes without provisioning. --plan combines with --params/--patch to preview a proposed configuration, and with --follow to stream the plan output:
mass instance deploy ecomm-prod-db --plan
mass instance deploy ecomm-prod-db --plan --patch='.version = "13.4"' --follow
Propose a deployment for approval instead of running it immediately. The deployment is created in PROPOSED status and runs only once approved with mass deployment approve (or discarded with mass deployment reject). --plan and --propose cannot be combined:
mass instance deploy ecomm-prod-db --propose --message "bump db to 13.4" --patch='.version = "13.4"'
mass instance deploy <project>-<env>-<manifest> [flags]
Options​
-f, --follow Stream the deployment's logs to stdout until it completes
-h, --help help for deploy
-m, --message string Add a message when deploying
-p, --params string Path to params json, tfvars or yaml file. Use '-' to read from stdin. When provided, the full configuration is replaced. $VAR and ${VAR} expand from the environment when set; $$ is a literal $.
-P, --patch stringArray Patch the last deployed configuration using a JQ expression. Can be specified multiple times.
--plan Run a dry-run plan (preview changes) instead of provisioning
--propose Create the deployment in PROPOSED status, awaiting approval before it runs
Options inherited from parent commands​
--profile string Configuration profile to use (overrides MASSDRIVER_PROFILE and the active profile)
SEE ALSO​
- mass instance - Manage instances of IaC deployed in environments.