Google apps script GCP projects are not deleted from console when apps script files or container files are trashed from Drive
Asked Answered
I

3

6

I noticed that the GCP projects created by default when creating a new script are not deleted from the GCP Console when the app script files are placed in the Drive recycle bin. Have you ever encountered this problem? As I develop many scripts, I reach the quota limit ...

On the other hand, I wanted to do a manual cleanup but I cannot find the gcp project ID in the applications script file. Do you know a solution?

Incursion answered 17/11, 2020 at 12:47 Comment(4)
I'm not sure how to fix the problem, but you could make a new google accountSportive
Consider creating a issue in the issuetracker. See tag info page for more details.Moreau
What happens when the Apps Script file is deleted from the Trash folder? Have you trued that?Sheenasheeny
Deleted from trash or not, it's Always there in thé gcp console i raised a Ticket in thé issue tracker on yesterdayIncursion
P
4

After looking at some documentation I found the following solution:

  1. Copy the App Script folder id on Google cloud resource manager

  2. Open the Cloud Shell using the top right terminal icon.

  3. Then list all the project under your App Script folder

gcloud projects list --filter='parent.id=APPS_SCRIPT_FOLDER_ID'

  1. Then delete all projects one by one

gcloud projects delete PROJECT_ID

Now you can delete the App Script folder in Google cloud resource manager. Be sure you have the Organization Administrator, Folder Admin, and Project Deleter roles under IAM > permissions of the main project.

Preconize answered 15/12, 2022 at 21:13 Comment(0)
L
1

According to the official documentation:

When a new Apps Script project is created, a default GCP project is also created behind the scenes. This GCP project is hidden, meaning most users aren't able to directly locate, view, or update the project in the Google Cloud Platform Console. However, admins and domain users that have the resourcemanager.projects.list permission on the parenting GCP folder are able to view and configure default projects.

My interpretation on this is that you can't locate, view or update the GCP project unless you have resourcemanager.projects.list permission on the parenting GCP folder are able to view and configure default projects.

The solution would be to contact the administrator to further help you on this issue.

Here you may find the list of GCP projects that you have access to modify, delete or view:

https://console.cloud.google.com/cloud-resource-manager

Since you don't have access to the organization directory which contains your GCP projects, you might be seeing this message:

enter image description here

Related article:

Google Cloud Console Quotas You don't have permissions to perform the action on the selected resource

Luftwaffe answered 17/11, 2020 at 13:59 Comment(0)
I
1

2 strange things happen on my hand :

1 - As administrator of my organization, i can see into the gcp admin console the ressources folder managed by Apps script named "system-gsuite\apps-script". Or regarding the official Apps script Guide i should not :

info apps script

2 - This folder contains many apps-script projects, even apps script files that have been already deleted ?! But the official documentation noticed that they should be removed but htis is not my case ...

enter image description here

Incursion answered 17/11, 2020 at 15:17 Comment(1)
I think you should contact Google Workspace Support, since this looks related to your account.Wensleydale

© 2022 - 2024 — McMap. All rights reserved.