Skip to content

Automation service CLI reference

See https://docs.openstack.org/python-heatclient/2023.2/.

These commands enable you to perform various operations related to stack management, such as creating, updating, and deleting stacks, as well as managing stack resources and events. The <stack_name_or_id>, <resource_name>, <event_id>, and <output_key> in the commands are placeholders that should be replaced with the actual names and IDs of the stacks, resources, events, and output keys. Here is a list of some common commands for managing stacks and resources.

List stacks

Bash
openstack stack list

Show stack details

Bash
openstack stack show <stack_name_or_id>

Create a stack

Bash
openstack stack create --template <template_file> <stack_name>
- <template_file>: Path to the Heat template file.

Update a stack

Bash
openstack stack update --template <template_file> <stack_name_or_id>

Delete a stack

Bash
openstack stack delete <stack_name_or_id>

List stack resources

Bash
openstack stack resource list <stack_name_or_id>

Show stack resource retails

Bash
openstack stack resource show <stack_name_or_id> <resource_name>

List stack events

Bash
openstack stack event list <stack_name_or_id>

Show stack event details

Bash
openstack stack event show <stack_name_or_id> <resource_name> <event_id>

Validate a template

Text Only
```bash
openstack orchestration template validate --template <template_file>
```

Show stack output

Text Only
```bash
openstack stack output show <stack_name_or_id> <output_key>
```

Adopt a stack

Text Only
```bash
openstack stack adopt --adopt-file <adopt_file> <stack_name>
```
- `<adopt_file>`: Path to the file containing the stack adopt data.

Abandon a stack

Text Only
```bash
openstack stack abandon <stack_name_or_id>
```