Terraform
terraform stacks deployment-group rerun reference
Use the terraform stacks deployment-group rerun command to rerun deployments within a deployment group.
Usage
$ terraform stacks <global-stacks-flags> deployment-group rerun -deployment-names <value> <options>
Description
Reruns deployments within a deployment group. Either -deployment-group-id must be provided, or -deployment-group-name in conjunction with the arguments -organization-name, -project-name, and -stack-name must be provided. If names are used, the deployment group associated with the latest configuration for the specified stack will be targeted.
Options
-deployment-names: A comma-separated list of deployment names to rerun within the deployment group.- Required.
- Data type: string (comma-separated list).
-organization-name: The name of the organization to target.- Optional when using
-deployment-group-id, required when using name-based targeting. - Data type: string.
- Overrides the ENV VAR
TF_STACKS_ORGANIZATION_NAMEif provided.
- Optional when using
-project-name: The name of the project to target.- Optional when using
-deployment-group-id, required when using name-based targeting. - Data type: string.
- Overrides the ENV VAR
TF_STACKS_PROJECT_NAMEif provided.
- Optional when using
-stack-name: The name of the Stack to target.- Optional when using
-deployment-group-id, required when using name-based targeting. - Data type: string.
- Overrides the ENV VAR
TF_STACKS_STACK_NAMEif provided.
- Optional when using
-deployment-group-name: The name of the deployment group to rerun within the latest configuration of the Stack specified in-stack-name.- Optional when using
-deployment-group-id, required when using name-based targeting. - Data type: string.
- Requires the arguments
-organization-name,-project-name, and-stack-nameto be provided.
- Optional when using
-deployment-group-id: The ID of the deployment group to rerun.- Optional (but required if not using
-deployment-group-name) - Data type: string.
- Has precedence over
-deployment-group-nameif both are provided.
- Optional (but required if not using
Examples
The following command reruns specific deployments within a deployment group using the deployment group ID:
$ terraform stacks deployment-group rerun -deployment-group-id dg-abc123 -deployment-names "prod-east,prod-west"
The following command reruns deployments using deployment group name and Stack information:
$ terraform stacks deployment-group rerun -organization-name my-org -project-name my-project -stack-name my-stack -deployment-group-name production -deployment-names "api-deployment,db-deployment"
Global flags
Refer to Global flags reference for information about flags you can use with all commands.