Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the target URL in Google App Engine

I'm trying to do App Engine with endpoints. When I deploy the app, the server takes the project ID of the other basic App Engine project I have. In the trace I found that the target project, target service, target version, and target url all are that of the basic App Engine project.

The trace is as follows:

target project:  [testniit1]
[INFO] GCLOUD: target service:  [default]
[INFO] GCLOUD: target version:  [20171024t130444]
[INFO] GCLOUD: target url:      [https://testniit1.appspot.com]

(Image of the trace)

But my actual project ID / project URL is endpoint2-2.appspot.com.

How can I change the default/target URL?

like image 308
Selvi VTS Avatar asked Oct 24 '17 08:10

Selvi VTS


People also ask

How do I change my App Engine URL?

In the Google Cloud console, go to the Custom Domains tab of the App Engine Settings page. Click Add a custom domain. If your domain is already verified, the domain appears in the Select the domain you want to use section. Select the domain from the drop-down menu and click Continue.

What is Region_id?

Region ID. The REGION_ID is an abbreviated code that Google assigns based on the region you select when you create your app. The code does not correspond to a country or province, even though some region IDs may appear similar to commonly used country and province codes. For apps created after February 2020, REGION_ID ...


1 Answers

First of all, App Engine as of writing has a one-to-one correspondence between app and project. See https://stackoverflow.com/a/46047030/1161743 for more details.

However you can declare services within App Engine that will give you what you want.

In app.yaml:

service: foo-bar

This will generate:

[INFO] GCLOUD: target url:      [https://foo-bar-dot-project-name.appspot.com]
like image 127
Jonathan Lin Avatar answered Sep 23 '22 02:09

Jonathan Lin