ASSOCIATE-CLOUD-ENGINEER practice question 9 of 35
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?
Full set: 332 questionsThe gcloud command-line tool operates based on a set of configurations that define default properties like project, region, and zone. When you execute a command such as gcloud app deploy without explicitly specifying the --project flag, the tool uses the project ID set in the currently active configuration. The command gcloud config list displays all properties for the active configuration, including the core/project property. By running this command, you can immediately identify which project was targeted by the deployment, thus explaining both why it went to an unintended project and where it was deployed.
A. The app.yaml file defines the application's runtime, scaling, and handler settings, but it does not specify the target Google Cloud project for deployment.
B. The web-application.xml (or web.xml) file is a standard configuration file for Java web applications and does not contain Google Cloud project deployment information.
C. Google Cloud Deployment Manager is an infrastructure-as-code service for provisioning resources, not for deploying application code via the gcloud app deploy command.
1. gcloud config list: "The gcloud config list command displays all the properties for the currently active configuration." This includes the core.project property
which is used by default for commands.
Source: Google Cloud SDK Documentation
gcloud config list
https://cloud.google.com/sdk/gcloud/reference/config/list
2. gcloud app deploy: The documentation for this command shows the optional --project flag. It states
"The Google Cloud project ID to use for this invocation. If omitted
then the current project is assumed." The "current project" is determined by the gcloud configuration.
Source: Google Cloud SDK Documentation
gcloud app deploy
https://cloud.google.com/sdk/gcloud/reference/app/deploy
3. app.yaml Configuration File: The official reference for the app.yaml file for both Standard and Flexible environments lists all valid configuration elements. A project or projectid field is not among them
confirming that the project is not defined within the application's configuration file.
Source: Google Cloud App Engine Documentation
app.yaml reference
https://cloud.google.com/appengine/docs/standard/reference/app-yaml
4. Initializing the gcloud CLI: "When you initialize the gcloud CLI
you run the gcloud init command. The gcloud init command creates a named configuration called default and sets it as the active configuration. The default configuration contains your user account and a default Google Cloud project." This establishes the concept of a default project within a configuration.
Source: Google Cloud SDK Documentation
"Initializing the gcloud CLI"
https://cloud.google.com/sdk/docs/initializing (Section: "Default project
region
and zone")
Keep practicing
Take the free ASSOCIATE-CLOUD-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ASSOCIATE-CLOUD-ENGINEER practice questions
- Question 1You need to verify that a Google Cloud Platform service account was created at a particul…
- Question 2You are building a new version of an application hosted in an App Engine environment. You…
- Question 3You need to create a new billing account and then link it with an existing Google Cloud P…
- Question 4You want to configure 10 Compute Engine instances for availability when maintenance occur…
- Question 5You need to create a custom VPC with a single subnet. The subnet’s range must be as large…
- Question 6You significantly changed a complex Deployment Manager template and want to confirm that …
