Delete a Terra Billing project using Swagger

Allie Hajian
  • Updated

Although there is currently no way to delete Terra billing projects in the UI, you can do this using Swagger following the steps below. This is also useful for deleting Terra Billing projects that failed to create (noted with a red '!' in the Billing page). 

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.

Delete-billing-project_Delete-all-workspaces_Screen_shot.png

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. 

Delete-Billing-Project_Remove-all-users_Screen_shot.png

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.
Delete-billing-project-with-Swagger_Unlock-Authenticate_Screen_shot.png

3.3. In the popup form, check all four boxes and click the Authorize button at the bottom.
Delete-billing-project-with-Swagger_Available-authorizations_Screen_shot.png

3.4. In the next screen, click the Close button.
Delete-project-with-Swagger_Close-available-authorizations_Screen_shot.png

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
Delete-Billing-project-with-Swagger_Allow-API_Screen_shot.png

3.5. Click Try it out on the right hand side of the Swagger page.

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.

Delete-billing-project_Success_Screen_shot.png

Troubleshooting

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.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.