Skip to content
Odinex Cloud
CLI (odx)Command reference

odx stack

Manage stacks.

odx stack add-label

Add labels to a stack

Usage:
  odx stack add-label [--overwrite] <stack> <key=value>... [flags]

Flags:
  -h, --help        help for add-label
      --overwrite   overwrite labels that already exist

odx stack apply

Apply a stack: create, update and delete resources to match its document

Usage:
  odx stack apply [--wait] <stack> [flags]

Flags:
  -h, --help   help for apply
  -w, --wait   follow the apply until it finishes, printing progress

odx stack create

Create a stack (a draft until applied)

Usage:
  odx stack create --name <name> --location <location> [--file <spec.json|yaml>] [options] [flags]

Examples:
  odx stack create --name web --location fra1 --file web.yaml
  odx stack topology --location fra1 > current.json && odx stack create --name all --location fra1 --file current.json

Flags:
      --description string   description
  -f, --file string          stack document, JSON or YAML (use - for stdin)
  -h, --help                 help for create
      --label stringArray    label key=value (repeatable)
      --location string      location (required)
      --name string          stack name (required)
  -o, --output stringArray   output format: json or yaml

odx stack delete

Delete a stack and every resource it created. With --keep-resources the resources stay and only the stack goes.

Usage:
  odx stack delete [--keep-resources] [--wait] <stack> [flags]

Flags:
  -h, --help             help for delete
      --keep-resources   keep the stack's resources, only delete the stack
  -w, --wait             follow the deletion until it finishes, printing progress

odx stack describe

Describe a stack

Usage:
  odx stack describe <stack> [flags]

Flags:
  -h, --help                 help for describe
  -o, --output stringArray   output format: json or yaml

odx stack draft

Ask the assistant to write or change a stack document from a description in plain language. Nothing is created: the document is printed (or written to --out), the assistant's notes go to stderr.

Usage:
  odx stack draft --location <location> --prompt <text> [--file <current>] [--out <file>] [flags]

Examples:
  odx stack draft --location fra1 --prompt "two web servers behind a load balancer, private network" --out web.yaml
  odx stack draft --location fra1 --file web.yaml --prompt "add a 20 GB volume to each server" --out web.yaml

Flags:
  -f, --file string          current document to refine, JSON or YAML
  -h, --help                 help for draft
      --location string      location (required)
      --out string           write the document to this file instead of stdout (.yaml/.yml writes YAML)
  -o, --output stringArray   output format: json (default) or yaml
  -p, --prompt string        what the stack should contain (required)

odx stack list

List stacks.

Columns: age, created, description, errors, id, labels, location, name, resources, status, updated

Usage:
  odx stack list [options] [flags]

Aliases:
  list, ls

Flags:
  -h, --help                 help for list
  -o, --output stringArray   output format: json, yaml, noheader, columns=a,b,c (repeatable)

odx stack plan

Show what applying a stack would create, update and delete, and the monthly cost before and after.

Columns: action, changes, id, key, monthly, name, type

Usage:
  odx stack plan <stack> [flags]

Flags:
  -h, --help                 help for plan
  -o, --output stringArray   output format: json, yaml, noheader, columns=a,b,c (repeatable)

odx stack remove-label

Remove labels from a stack

Usage:
  odx stack remove-label <stack> (--all | <key>...) [flags]

Flags:
  -a, --all    remove all labels
  -h, --help   help for remove-label

odx stack topology

Print the project's existing resources in a location as a stack document.

Nothing is linked to a stack: create one from the document to manage new copies of the resources, or use it as a starting point for 'odx stack draft'.

Usage:
  odx stack topology --location <location> [--out <file>] [flags]

Flags:
  -h, --help                 help for topology
      --location string      location (required)
      --out string           write the document to this file instead of stdout (.yaml/.yml writes YAML)
  -o, --output stringArray   output format: json (default) or yaml

odx stack update

Update a stack's document, name or description. Run 'odx stack apply' to make the resources match.

Usage:
  odx stack update [--file <spec.json|yaml>] [--name <name>] [--description <text>] <stack> [flags]

Flags:
      --description string   new description
  -f, --file string          new stack document, JSON or YAML (use - for stdin)
  -h, --help                 help for update
      --name string          new name

On this page