
Answer-first summary for fast verification
Answer: 1. Create two configurations in gcloud, one for development and another for the test environment. 2. Use `gcloud config configurations activate [NAME]` to switch between configurations and deploy Compute Engine instances with gcloud commands.
Option A is correct because it accurately describes the process of creating and switching between two gcloud configurations for different environments. The command `gcloud config configurations activate [NAME]` is the correct method to switch configurations, allowing for the deployment of Compute Engine instances to the respective environments. Options B, C, and D are incorrect for various reasons: B suggests using `gcloud configurations list` to start instances, which only lists configurations; C and D incorrectly imply that multiple configurations can be activated simultaneously, which is not possible. For more information, refer to [DevOpsCube](https://devopscube.com/use-multipl-gcloud-configurations/) and [Google Cloud documentation](https://cloud.google.com/sdk/docs/configurations#multiple_configurations).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
As the person responsible for deploying each new version of your app to Development and Test environments in GCP, which are located in separate GCP projects across different regions and zones, how would you deploy a Compute Engine instance to both environments using the command line interface?
A
gcloud config configurations activate [NAME] to switch between configurations and deploy Compute Engine instances with gcloud commands.B
gcloud configurations list.C
gcloud configurations activate [NAME]. 2. Start the Compute Engine instances by running gcloud config list.D
gcloud configurations activate [NAME]. 2. Start the Compute Engine instances by executing gcloud configurations list.