You deployed an App Engine application using gcloud app deploy, but it did not deploy to the intended project. You want to find out why this happened and where the application deployed. What should you do?
A.
Check the app.yaml file for your application and check project settings.
B.
Check the web-application.xml file for your application and check project settings.
C.
Go to Deployment Manager and review settings for deployment of applications.
D.
Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
I would opt option D : as it would help to check the config details and Option A is not correct, as app.yaml would have only the runtime and script to run parameters and not the Project details
Why would you choose Cloud Shell if its not even mention on the question? (what if the person did the command on its own computer?, this would not work)
Regardless if you use your computer or cloud shell, you have to use SDK for gcloud command-line interface. gcloud uses a configuration file which contains default project, region and zone details so that command line can omit these parameters and use default.
Option D - The config list will give the name of the project
C:\GCP\appeng>gcloud config list
[core]
account = [email protected]
disable_usage_reporting = False
project = my-first-demo-xxxx
D is correct because gcloud config list will give you the current project name & rest all options talks about examining the yaml file which is not a best practice
Option D is the appropriate choice for diagnosing why the App Engine application did not deploy to the intended project. By running gcloud config list in Cloud Shell, you can view the current configuration settings, including the project ID, region, and other relevant settings used for deployment.
Options A and B involve checking the configuration files for the application (app.yaml and web-application.xml), but they may not directly provide information about where the application deployed or why it didn't deploy to the intended project.
Option C involves Deployment Manager, which is a tool for creating, deploying, and managing resources in Google Cloud Platform, but it's not specifically related to App Engine deployments and may not provide the necessary insights in this context.
ANSWER D. CORRECT. Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
Running gcloud config list in the Cloud Shell will show the currently active configuration that was used for the deployment. This can help identify if the wrong project was selected or if the configuration was set up incorrectly.
https://cloud.google.com/sdk/gcloud/reference/config/list
ANSWER A may be helpful to ensure that the project and deployment settings are correctly specified, but it does not provide information on where the application was actually deployed.
ANSWER B is not relevant for App Engine deployments as this is an XML configuration file typically used in Java web applications deployed to servlet containers.
ANSWER C is also not relevant for App Engine deployments, as Deployment Manager is typically used to create and manage deployments of cloud infrastructure resources such as virtual machines, load balancers, and databases.
Both A and D seem correct.
Lots of people mentioned that app.yaml does not contain project id. That is an incorrect statement. Project is contained in app.YAML for "Standard" app engine application but gcloud config list is has to be used for "FLEXIBLE" application. Since the questions does not inform us whether it is a standard or flexible app, Option D is correct. Look at the link here. https://cloud.google.com/appengine/docs/flexible/python/reference/app-yaml#app-id .
The doc states:
"In some App Engine standard environment runtimes, you might have specified the Cloud Platform project ID (sometimes called "app ID") in the project's app.yaml file.
However, in the flexible environment, the project ID (app ID) is specified either:
By using gcloud init when you install the Google Cloud CLI. To view the default project ID of the gcloud CLI, run gcloud config list.
By using the gcloud config set project [YOUR_PROJECT_ID] command to set the default project ID of the gcloud CLI.
By using the --project flag when you deploy your app, for example: gcloud app deploy --project [YOUR_PROJECT_ID]
"
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Bharathy
Highly Voted 4 years, 8 months agoalejandrombc
3 years, 1 month agoSeleth
3 months, 3 weeks agozaxxon
3 years, 1 month agocsrazdan
2 years, 4 months agoahmed812
Highly Voted 4 years, 7 months agoEnamfrancis
Most Recent 2 months agothewalker
1 year agoJackSkeletonCoder
2 months, 1 week agogsmasad
1 year agoCaptain1212
1 year, 2 months agoNxt_007
1 year, 3 months agoVamshi_Krishna
1 year, 6 months agoZahir1004
1 year, 8 months agoBuruguduystunstugudunstuy
1 year, 9 months agobhavyach
1 year, 11 months agocslince
1 year, 11 months agoleogor
2 years, 1 month agodanny19g
2 years, 2 months agoRAVI321
2 years, 3 months agoHaz993
2 years, 2 months agoanallava
2 years, 3 months agoRanjithK
2 years, 4 months ago