Reputation: 1041
I have a Google Cloud Platform project with several GCE instances that I use daily. I decided I wanted to mess around with app engine and deployed a sample version of an application that I would now like to get rid of. While I've disabled the app is there any way to delete it without deleting the entire project? I've tried appcfg.sh delete_version appengine-dir -V 1
but I get Bad argument: You must specify a version ID via -V or --version
. I've tried doing appcfg.sh delete_version appengine-dir --version=1
but get the same thing. I'm going to be really disappointed if I have to download all the data off of my instances and re-deploy the entire project just to get rid of an app engine app which will never be used again. I am aware this is technically speaking a duplicate question but all of the answers I've found are for older versions of app engine and I just get redirected to the new console which doesn't seem to have the same options.
EDIT: Turns out doing appcfg.sh -A projID -V 1 delete_version appengine-dir
works and doesn't give me any of those errors but I get Cannot delete the default version of the default module.
I get the feeling I just can't do this at all which I personally find really really dumb.
Upvotes: 4
Views: 2095
Reputation: 14689
This is what I put in my cloudbuild.yaml
to delete versions older than count 5.
# Remove old GAE versions
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
versions=$(gcloud app versions list \
--service default \
--sort-by '~version' \
--format 'value(VERSION.ID)' | sed 1,5d)
for version in $versions; do
gcloud app versions delete "$version" \
--service default \
--quiet
done
Upvotes: 1
Reputation: 1
This can now be accomplished on the command line using:
gcloud app versions delete <version-name>
Upvotes: 0
Reputation: 1714
It is not currently possible to delete the default module of an App Engine application.
There is however an open feature request Issue 12984 for this. Feel free to star this public issue to support this request and receive updates regarding its progress.
Upvotes: 4