Terraform
terraform stacks deployment-group list reference
Use the terraform stacks deployment-group list command to list the deployment groups of a configuration.
Usage
$ terraform stacks <global-stacks-flags> deployment-group list <options>
Description
List the deployment groups of a configuration. Either -configuration-id must be provided, or -organization-name, -project-name, and -stack-name must be provided. If name arguments are used, the latest configuration for the specified stack will be used.
Options
-organization-name: The name of the organization to target.- Optional when using
-configuration-id, required when using name-based targeting. - String data type.
- Overrides the ENV VAR
TF_STACKS_ORGANIZATION_NAMEif provided.
- Optional when using
-project-name: The name of the project to target.- Optional when using
-configuration-id, required when using name-based targeting. - String data type.
- Overrides the ENV VAR
TF_STACKS_PROJECT_NAMEif provided.
- Optional when using
-stack-name: The name of the stack to target.- Optional when using
-configuration-id, required when using name-based targeting. - String data type.
- Overrides the ENV VAR
TF_STACKS_STACK_NAMEif provided.
- Optional when using
-configuration-id: The id of the configuration to list the deployment groups of.- Optional (but required if not using
-stack-name) - String data type.
- Has precedence over the latest configuration of the stack provided in named arguments.
- Optional (but required if not using
-json: Output results in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default is false (human-readable format).
Examples
The following command lists deployment groups using organization, project, and Stack names:
$ terraform stacks deployment-group list -organization-name my-org -project-name my-project -stack-name my-stack
The following command lists deployment groups using a configuration ID:
$ terraform stacks deployment-group list -configuration-id config-abc123
The following command lists deployment groups in JSON format:
$ terraform stacks deployment-group list -configuration-id config-abc123 -json
Global flags
Refer to Global flags reference for information about flags you can use with all commands.