Deleting a Cloud Stack

When an environment is no longer needed, delete the cloud stack with Oracle Cloud Stack in order to free up account resources.

Deleting a stack terminates all cloud resources that are components of the stack. Oracle Cloud Stack does not clean up any related resources that are not directly part of the stack. For example, if a stack resource is configured to use an existing object storage container for backups, these backups may not be deleted when the stack resource is deleted.

If a stack contains more than one resource, you must delete these resources with Oracle Cloud Stack. You cannot delete the resources individually from their respective service consoles or APIs.

Deleting a Cloud Stack with the Console

Use the web console to delete a cloud stack from Oracle Cloud Stack.

  1. Sign in to the Oracle Cloud Stack console and navigate to the Stacks page.
  2. Click the Stack menu icon menu to the right of the stack you want to delete.
  3. Select Delete.
  4. Choose a value for Force service deletion:
    • No (default) – If an error occurs while a resource in this stack is being deleted, the rest of the stack will not be deleted.
    • Yes – The stack and all of its resources will be deleted, even if an error occurs during the delete operation.
  5. If any of the cloud resources in your stack support additional deletion parameters, you will be prompted to provide values for these parameters.
  6. Click Delete.

Deleting a Cloud Stack with the CLI

Use the CLI to delete a cloud stack from Oracle Cloud Stack.

  1. Execute the stack delete command. Supply the name of the cloud stack:
    psm stack delete -n name

    If any of the resources in your stack support deletion parameters, use the -c option to provide values for them.

    By default, the stack and all of its resources will be deleted, even if an error occurs during the delete operation. If you specify the -f false option and an error occurs while a resource in this stack is being deleted, the rest of the stack will not be deleted.

  2. The output of the stack delete command includes a job ID number. Use the stack operation-status command to periodically check the state of the delete operation:
    psm stack operation-status -j jobID

For more information about the CLI commands for Oracle Cloud Stack, see psm stack Commands.