How to delete a Terra Billing project (Swagger)

Allie Hajian
  • Updated

Although there is currently no way to delete Terra billing projects in Terra itself, you can do this using Swagger following the steps below.

To delete Terra Billing projects that failed to create (noted with a red '!' in the Billing page), see this article.

Note that you can delete the Google project associated with a workspace by deleting the workspace. This will not delete the Terra Billing project used to create the workspace.

Before deleting a Terra Billing project - this action cannot be undone It is a best practice to make sure all team members who have used this Billing project know that any workspaces created under this project umbrella will be inaccessible, and any links to data in these workspace buckets will break.

Any data in the workspace buckets that you want to keep needs to be moved to another external or Terra workspace bucket, or local storage before deleting the Terra Billing project

Step 1. Delete all associated workspaces 

You will first need to delete all workspaces created under the Terra billing project. Start in your Workspaces page (from the main navigation at the top left).

1.1. Filter by the billing project you want to delete.

1.2. Click on the three vertical dots at the right of each workspace name and select "Delete" from the popup menu. Repeat until no workspaces remain.


Step 2. Remove users from the Billing project

The next step is to remove everyone but the primary Billing project owner from billing. 

2.1. Go to your Billing page (Main Menu > Your name > Billing).

2.2. On the left side, click on the link for the Billing project you want to delete. Note that if the billing project is not clickable, you don't have owner permission and cannot delete the project. This will take you to the summary page. 


2.3. On the Terra Billing project summary page, select the "User" tab. 

2.4. Click the three vertical dot icon to the right of each user (beside you - the primary owner) and then the trash icon (Remove User).

Step 3. Use Swagger to delete the Terra Billing project

3.1. Navigate to Swagger.

3.2. Click the lock icon at the top-right of the module to authenticate.

3.3. In the popup form, check all four boxes and click the Authorize button at the bottom.

3.4. In the next screen, click the Close button.

This step tells Swagger you have permission to delete the Billing project.

If you are asked to sign into Google and allow the Terra Production API permission to access your Google account, sign in and then click Allow

3.5. Click Try it out on the right hand side of the Swagger page (you may have to scroll up to see it!).

3.6. In the "Name of the billing project" field, type in or paste the complete name of the Terra billing project you want to delete.

3.7. In the horizontal blue bar that appears, press Execute.

What to expect

When the Billing project has been successfully deleted, you will receive a 204 response code.



If you get a 400 code and an error message that there are workspaces under this Billing project, go back to Step 1 and delete any remaining workspaces. 

If you get a 400 code and a different error message, you are most likely not authenticated. This can happen if you leave your browser inactive, for example. Try going back and authenticating (step 2.2-2.4). Make sure to do all the steps in one browser session and to check all four boxes including the last one: cloud billing authorization (it's unchecked by default).

If you get a 500 code and an error message that includes "Foreign Key Violation(s) while deleting group(s):" Make sure there are no other users on the Billing project. 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.