Learn how to delete a Terra Billing project using APIs (Swagger). Note that you need to be an owner to delete the Billing project.
Note: Before deleting a Terra Billing project, be aware this action cannot be undone!Best practice is to make sure all team members who used this Billing project know that any workspaces created under this project umbrella will be inaccessible. Any links to data in these workspace buckets will break.
Any data in workspace buckets that you want to keep must be moved to another external or Terra workspace bucket, or local storage, before deleting the Terra Billing project.
How to delete the workspace Google project instead
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.
Step 1. Delete all associated workspaces
Start on 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 icon at the right of each workspace name and select Delete from the popup menu.
1.3. 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.
2.1. Go to your Billing page (Main Menu > Your name > Billing).
2.2. Under Owned by you (on the left side), click on the link for the Billing project you want to delete. This will take you to the billing project summary page.
If the Billing project is not clickable
If you own the project, but cannot access the summary page, it may be in a not-ready state, and you will not be able to delete the project. You can reach out to support for help by selecting Contact Us under the Support section from the main navigation (three parallel lines at the top left of any page in Terra).
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 (besides you - the primary owner) and then the trash icon (Remove User).
Step 3. Use Swagger APIs to delete the Terra Billing project
3.1. Navigate to the deleteBillingProject endpoint in 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. Do not click the Logout button, as you will then need to re-authenticate!
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.
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, most likely, you are not authenticated. This can happen if you leave your browser inactive for too long, for example. Try going back and authenticating (steps 2.2-2.4). Make sure to do all the steps in one browser session.