Terraform
terraform stacks list reference
Use the terraform stacks list
command to list Stacks within a given organization or project.
Usage
$ terraform stacks <global-stacks-flags> list -organization-name <value> <options>
Description
The terraform stacks list
command retrieves and displays all Stacks within a specified organization. You can optionally filter the results by project name to view Stacks within a specific project.
Options
-organization-name
: The name of the organization to target.- Required.
- String.
- Overrides the ENV VAR
TF_STACKS_ORGANIZATION_NAME
if provided.
-project-name
: The name of the project to target.- Optional.
- String.
- Overrides the ENV VAR
TF_STACKS_PROJECT_NAME
if provided.
-json
: Output results in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default is human-readable text format.
Examples
The following command lists all Stacks in the "my-org" organization:
$ terraform stacks list -organization-name my-org
The following command lists Stacks in a specific project within an organization:
$ terraform stacks list -organization-name my-org -project-name my-project
The following command lists Stacks with JSON output:
$ terraform stacks list -organization-name my-org -json
Global flags
Refer to Global flags reference for information about flags you can use with all commands.