Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine: Can't create second app on same developer machine ("The project already contains an App Engine application")

Somewhere on my SSD is an ongoing, actively managed Google App Engine project. I develop it on this machine and I am always able to deploy it successfully with gcloud app deploy.

Now i wanted to create another Google App Engine project.

Steps to reproduce:

  1. I created the directory on my developer machine (Mac)

cd mynewproject

  1. I created the project in google app engine console

mynewproject

  1. Then i wanted to create the new app as follows:

gcloud app create

Result:

But this gives the following error:

$ gcloud app create ERROR: (gcloud.app.create) The project [oldproject] already contains an App Engine application in region [europe-west]. You can deploy your application using gcloud app deploy.

I am pretty sure that i moved to another directory far outside of the directory for "oldproject".

Also the new project is listed in the Google App Engine console with all other projects.

How can i work on this project on the same machine without to need removing my other GAE-project?

like image 417
itinance Avatar asked Jul 26 '17 10:07

itinance


1 Answers

You can create only one App Engine app per Google Cloud project.

If your new project is related to the old one, You can create a new App Engine service in the same Google Cloud project: In your app.yaml, you can specify a service name: service: [SERVICE_NAME]. Now when you run gcloud app deploy, it will deploy a new service to the same project.

If your new project is not related to the old one, you should just create a new Cloud Console project and then create an App Engine app for this one. To do so, either use the command line: gcloud projects create [PROJECT_ID] or simply browse to https://console.cloud.google.com to create it. Then, you can either:

  • use gcloud app deploy app.yaml --project [PROJECT_ID] to deploy to this project.
  • tell gcloud that you are now working within that project: gcloud config set project [PROJECT_ID]
like image 130
Steren Avatar answered Sep 20 '22 11:09

Steren