---
name: schematics-sc-workspaces-destroy
title: Destroying workspace resources
description: Remove the IBM Cloud&reg; resources that you provisioned with your Schematics workspace, even if these resources are active.
last-updated: 2026-07-07
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/schematics?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Destroying workspace resources
{: #sch-destroy-wks}

Remove the IBM Cloud&reg; resources that you provisioned with your Schematics workspace, even if these resources are active.
{: shortdesc}

IBM Cloud Schematics is deprecating older versions of Terraform and introducing support for newer Terraform version. For more information, see the [Schematics Terraform deprecation lifecycle](https://cloud.ibm.com/docs/schematics?topic=schematics-deprecate-tf-version&format=markdown#deprecate-phase) and the [Deprecation Schedule](https://cloud.ibm.com/docs/schematics?topic=schematics-deprecate-tf-version&format=markdown#deprecate-timeline).
{: deprecated}

## Before you begin
{: #prerequisites-destroy}

- [Create a Terraform configuration](https://cloud.ibm.com/docs/schematics?topic=schematics-create-tf-config&format=markdown), and store the configuration in a `GitHub`, `GitLab`, or `Bitbucket` repository. You can also upload a tape archive file (`.tar`) from your local workstation to provide your template to IBM Cloud Schematics. For more information, see the [`ibmcloud schematics workspace upload`](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-reference&format=markdown#schematics-workspace-upload) command and see the [upload a `tar` file to your workspace](https://cloud.ibm.com/apis/schematics#template-repo-upload) API.
- Make sure that you have the [permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access&format=markdown) to create a workspace.

Ensure the `location` and the `url` endpoint are pointing to the same region when you create or update the Schematics workspace or action. For more information about location and endpoint, see [Where is your information stored](https://cloud.ibm.com/docs/schematics?topic=schematics-secure-data&format=markdown#pi-location)?
{: note}

## Destroying workspace resources using the UI
{: #destroy-wks-ui}
{: ui}

1. Log in to [IBM Cloud console](https://cloud.ibm.com/){: external}.
2. Click the **Menu** icon ![hamburger icon](../images/icon_hamburger.svg) > **Platform Automation** > **Schematics** > [**Terraform**](https://cloud.ibm.com/automation/schematics/terraform){: external}.
    - In **workspace List** section:
        - Click required **Workspace** to destroy a required workspace. If you do not see the required workspace in the list, check your navigation page.
        - Click `Next`.
    - In **Workspace list** section. Click workspace name and click **Actions** dropdown. Click `Destroy resources` and enter workspace name for confirmation before delete. Enter the name while creation and click destroy.
    - Click `Destroy`. Your resource of workspace are destroyed.

### Verifying a workspace destroy operation
{: #verify-wks-destroy-ui}

1. Click your workspace that is listed in the [IBM Cloud console](https://cloud.ibm.com/automation/schematics/terraform){: external} to view the results of the destroy operation.
2. Click **Jobs** tab to see the workspace logs.
3. Click **Jobs history** tab view the result of the destroy job and operations that were run by the automation modules.

## Destroying workspace resources using the CLI
{: #destroy-wks-cli}
{: cli}

1. Destroy workspace configuration. For more information about destroy the resource in workspace, see the [`ibmcloud schematics destroy workspace` command](https://cloud.ibm.com/docs/schematics?topic=schematics-schematics-cli-reference&format=markdown#schematics-destroy).

    ```sh
    ibmcloud schematics destroy workspace --id <WORKSPACE_ID>
    ```
    {: pre}

    ```sh
    ibmcloud schematics destroy --id WORKSPACE_ID [--target RESOURCE1] [--target RESOURCE2] [--force] [--output OUTPUT]
    ```
    { pre}

2. Verify that your source created through workspace is destroyed.

    ```sh
    ibmcloud schematics workspace list
    ```
    {: pre}

3. Refer to, [Managing Cloud resources with Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-manage-lifecycle&format=markdown) to start Deleting, updating, or deleting Cloud resources with Terraform.

### Verifying a workspace destroy operation
{: #verify-workspace-destroy-cli}

Verify that the workspace was created successfully. When you destroy the resource by using the CLI, the command removes the resources of the workspace.

```text
   ibmcloud schematics destroy --id us-east.workspace.testwspace03jan.811182d2 --target vpc_name --target vpc_tags
   Do you really want to perform this action? [y/N]> y

   Activity ID   c10fc92ddfd2d9ec645fc5dbece5e341

   OK
```
{: screen}

On successful destroying, it returns the unique Activity ID of the workspace.

For more information, see [workspace FAQs](https://cloud.ibm.com/docs/schematics?topic=schematics-workspaces-faq&format=markdown#clusterdeletion-warn-faq).

## Destroying workspace resources using the  API
{: #destroy-wks-api}
{: api}

1. Follow the [steps](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-api&format=markdown#cs_api) to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API.

2. Destroy the workspace.

   Example:

   ```json
      PUT /v1/workspaces/{w_id}/destroy HTTP/1.1
      Host: schematics.cloud.ibm.com
      Content-Type: application/json
      Authorization: <auth_token>

      {
         "name":"testwspace03jan",
         "type":[
            "terraform_v1.4"
         ],
         "description":"terraform workspace",
         "location":"us-east",
         "tags":[
            "department:HR",
            "application:compensation",
            "environment:production"
         ],
         "template_repo":{
            "url":"https://github.com/Anil-CM/newrepo"
         },
         "workspace_status":{
            "frozen":true
         },
         "template_data":[
            {
               "folder":".",
               "type":"terraform_v1.4",
            "variablestore":[
               {
                  "name":"sample_var",
                  "secure":true,
                  "value":"THIS IS IBM CLOUD TERRAFORM CLI DEMO",
                  "description":"Description of sample_var"
               },
               {
                  "name":"sleepy_time",
                  "value":"15"
                  }
               ]
            }
         ]
      }
   ```
   {: codeblock}

3. See [Managing Cloud resources with Schematics](https://cloud.ibm.com/docs/schematics?topic=schematics-manage-lifecycle&format=markdown) to start Deleting, updating, or deleting Cloud resources with Terraform.

### Verifying a workspace destroy operation
{: #verify-workspace-destroy-api}

Verify that the resource is destroyed successfully.

Verify that the workspace resource is destroyed successfully as shown in the output.
{: shortdesc}

Output

```text
{
    "activityid": "6e5c84b58100472395b53a056cc27edc"
}

```
{: screen}

On successful, destroy the unique activity ID of the workspace is returned.

For more information, see [workspace FAQs](https://cloud.ibm.com/docs/schematics?topic=schematics-workspaces-faq&format=markdown#clusterdeletion-warn-faq).

## destroying workspace resources with Terraform
{: #destroy-wks-terraform}
{: terraform}

1. Follow the steps in [Deleting Schematics data](https://cloud.ibm.com/docs/schematics?topic=schematics-delete-schematics-data-intro&interface=ui&format=markdown) to destroy your workspace with Terraform.

2. See [Managing Cloud resources](https://cloud.ibm.com/docs/schematics?topic=schematics-manage-lifecycle&format=markdown) with Schematics to create, update, or delete the Cloud resources.

## Next steps
{: #sch-destroy-wks-nextsteps}

- Looking for additional workspace samples to work with? Check out the [sample workspaces](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-provider-template&format=markdown#sample). Check the `Readme` files of the examples for further customization and usage.