For IndividualsFor Educators
ExpertMinds LogoExpertMinds
ExpertMinds

Ace your certifications with Practice Exams and AI assistance.

  • Browse Exams
  • For Educators
  • Blog
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Support
  • AWS SAA Exam Prep
  • PMI PMP Exam Prep
  • CPA Exam Prep
  • GCP PCA Exam Prep

© 2026 TinyHive Labs. Company number 16262776.

    PracticeGCP Associate Cloud Engineer (ACE)GCP Associate Cloud Engineer Practice Exam 2Question 08
    Medium1 markMultiple Choice
    Domain 1.3: Installing and configuring the CLIgcloudAutomationApp Engine

    GCP ACE · Question 08 · Domain 1.3: Installing and configuring the CLI

    You are writing a bash script that will run on a CI/CD server. The script needs to deploy an application to App Engine. You want to ensure the script explicitly sets the target project to 'my-app-prod' for the deployment command, regardless of what the default gcloud configuration is set to on the server.

    Which command should you use?

    Answer options:

    A.

    gcloud config set project my-app-prod && gcloud app deploy

    B.

    gcloud app deploy --project=my-app-prod

    C.

    gcloud app deploy --target=my-app-prod

    D.

    export GCP_PROJECT=my-app-prod && gcloud app deploy

    How to approach this question

    Identify the safest way to specify a project in an automated script without altering global state.

    Full Answer

    B.gcloud app deploy --project=my-app-prod✓ Correct
    gcloud app deploy --project=my-app-prod
    In automation and CI/CD environments, it is best practice to use the `--project` flag on individual gcloud commands. This ensures the command targets the correct project without altering the underlying configuration state (`gcloud config set`), which might cause race conditions if multiple scripts run simultaneously.

    Common mistakes

    Using `gcloud config set project` in scripts, which can cause conflicts in shared environments.
    Question 07All questionsQuestion 09

    Practice the full GCP Associate Cloud Engineer Practice Exam 2

    50 questions · hints · full answers · grading

    Sign up freeTake the exam

    More questions from this exam

    Q01Your company is migrating to Google Cloud and needs to establish a resource hierarchy. You have t...EasyQ02You are managing access to a GCP project. You need to grant 15 developers the ability to view Com...MediumQ03You have created a new GCP project using the Cloud Console. You want to deploy a Cloud Function u...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...EasyQ05Your finance team wants to perform complex SQL analysis on your GCP billing data to understand co...Medium
    View all 50 questions →