简体   繁体   中英

How to delete an App Version from Google Cloud Platform

I am newbie and I was playing around couple of months back with Google Cloud and by mistake I somehow have added a Version/hello world project that looks like below and it is doing some logging which is taking 100 GB of space and Google is charging me for that space. I just want to get rid of it but I am not able to do so. Please help me.

Screenshot for reference.

在此处输入图像描述

在此处输入图像描述

EDIT

在此处输入图像描述

Issue: Why am I not able to completely delete it. I am beginner so please guide me how to get rid of it? I am getting charged every month. Where can I click and delete it.

PS: I know I have not asked this question properly but I don't have the proper terminology knowledge to ask my query properly.

Just click on the square in the left side of the version row in the table pictured in your 1st screenshot to select it and the Delete button should activate.

Update:

Hm, ok. Looks like the only remaining version can't be deleted. You could also:

  • disable your app if this is the only service in it from the Settings Menu.
  • delete the app if you no longer need that app ID (you won't be able to re-use that ID for a new app)
  • deploy a new version which doesn't do anything, switch traffic to it and delete the old version. I'd make the new version a standard environment one, which has a free quota, instead of a flexible environment one, eventually with just a static dir handler pointing to an empty dir.

You can use this with your CI/CD script. This works with Linux.

gcloud app versions delete `gcloud app versions list | sed 's/  */:/g' | cut -f 2 -d : | tail -n +2 | head -n -1` --quiet
gcloud app versions delete [NAME]

For quick and nice way of deleting App Version through CLI:

gcloud app services delete {services list} --version=XXXX

Example: gcloud app services delete night-worker default day-worker --version=version2019

That way you will save yourself time for deleting App Engine versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM