Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete AppEngine default service in the existing Google Cloud project with Firestore

I've the existing Google Cloud project that was created by Firebase and use Firestore in this project. Decided to try AppEngine and run Hello World Example in this project.

Now I want to delete this newly deployed AppEngine Service, but there are 2 problems:

1) Hello World Docs suggest to switch off the AppEngine. In this case Firestore is not working

2) Can't delete this service from CLI/UI as this service was deployed as the default one

 Issue deleting service: [default]
 The default service (module) cannot be deleted.

Is there a way to delete this service from the project and keep Firebase Firestore?

like image 436
Kseniia Avatar asked May 24 '19 04:05

Kseniia


3 Answers

  1. Go to App Engine -> Settings: https://console.cloud.google.com/appengine/settings
  2. Click on "Disable application"

If there's nothing else on your project, you can shut down the project at https://console.cloud.google.com/iam-admin/settings.

like image 139
Vinicius Fortuna Avatar answered Oct 18 '22 03:10

Vinicius Fortuna


2) Can't delete this service from CLI/UI as this service was deployed as the default one

See https://cloud.google.com/nodejs/getting-started/delete-tutorial-resources .

The only way you can delete the default version of your App Engine app is by deleting your project. However, you can stop the default version in the GCP Console. This action shuts down all instances associated with the version. You can restart these instances later if needed. In the App Engine standard environment, you can stop the default version only if your app has manual or basic scaling.

like image 3
zkohi Avatar answered Oct 18 '22 02:10

zkohi


As it's displayed in the UI on disabled Stop button:

You only can stop versions that are manually scaled, basic scaled or in flexible environment

The solution is to deploy another default service using flexible env, stop it and then delete the app with Standard env:

1) Change app.yaml:

runtime: nodejs env: flex

2) Run gcloud app deploy

3) Stop new version using UI or CLI

4) Delete old version

like image 2
Kseniia Avatar answered Oct 18 '22 02:10

Kseniia