You can unlink your GCP project from a Stackdriver workspace by Merging the workspace into a new, blank workspace.
Before following these steps, you will need to create an empty project in GCP that you can later delete.
Make sure to unlink the GCP project that you want to keep from the merged workspace before deleting the empty project that hosts the new workspace.
These instructions are taken from here: https://cloud.google.com/monitoring/workspaces/guide#merge-account
Merging Workspace A into Workspace B moves all the GCP projects except AWS connector projects from Workspace A to Workspace B. Specifically, here is the effect of merging A into B:
- All GCP projects that were added to Workspace A are moved into Workspace B.
All AWS accounts in Workspace A are removed from A. You have to manually add the accounts to Workspace B. You can delete the AWS connector projects unless you need to retrieve the AWS account's logs from them.
The project that hosts Workspace A is added to Workspace B, even if the project is empty.
The host project is the project you use to create the Workspace. This project typically has resources in the case of a single-project Workspace but is empty for a multi-project Workspace. Merging is the only way to separate this project from its Workspace.
All the monitoring and other configuration information in Workspace A is deleted. This includes dashboards, alerting policies, uptime checks, and so on. Workspace A no longer exists.
To merge Workspaces, do the following:
Open the Stackdriver Monitoring console.
If necessary, create Workspace B using an empty project.
Select the Workspace that is to be kept ("B" in this scenario) from the drop-down menu at the top-right of the Monitoring console.
Select Workspace Settings from the same menu.
Click Monitored accounts from the left-side menu.
Click Merge another Workspace into this one.
Select the Workspace that is to be removed ("A" in this scenario).
Read about what information is lost during the merge.
Click Merge.
You can then delete the newly created empty project/workspace
Deleting a Workspace
Before deleting a Workspace, check if project you used to create the Workspace has resources you want to preserve, or if the Workspace is still linked to additional GCP projects or AWS accounts. If so, see Merging Workspaces for a way to move resources to another place before deleting the Workspace.
If your Workspace project has nothing of value, then delete the Workspace by deleting the Workspace's project in the GCP Console. Go to IAM & admin > Settings and click Shut Down.