You have a Google Cloud Platform account with access to both production and development projects. You need to create an automated process to list all compute instances in development and production projects on a daily basis. What should you do?
A.
Create two configurations using gcloud config. Write a script that sets configurations as active, individually. For each configuration, use gcloud compute instances list to get a list of compute resources.
B.
Create two configurations using gsutil config. Write a script that sets configurations as active, individually. For each configuration, use gsutil compute instances list to get a list of compute resources.
C.
Go to Cloud Shell and export this information to Cloud Storage on a daily basis.
D.
Go to GCP Console and export this information to Cloud SQL on a daily basis.
A. Create two configurations using gcloud config. Write a script that sets configurations as active, individually. For each configuration, use gcloud compute instances list to get a list of compute resources.
A. Create two configurations using gcloud config. Write a script that sets configurations as active, individually. For each configuration, use gcloud compute instances list to get a list of compute resources.
Answer A is the correct answer.
The most straightforward way to list all compute instances in development and production projects is to use gcloud compute instances list command. However, since the account has access to both production and development projects, it's necessary to create two configurations with different project IDs.
Answer B is incorrect because gsutil is used for object storage operations and not compute instances. (DISTRACTOR)
Answers C and D are incorrect because they do not provide a straightforward solution for listing compute instances in multiple projects.
"gcloud" can create and manage Google Cloud resources while "gsutil" cannot do so. "gsutil" can manipulate buckets, bucket's objects and bucket ACLs on GCS(Google Cloud Storage) while "gcloud" cannot do so
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.
cloudenthu01
Highly Voted 3 years, 8 months agoglam
Highly Voted 3 years, 4 months agoBAofBK
Most Recent 3 months, 4 weeks agoCaptain1212
6 months agoNeha_Pallavi
6 months, 1 week agotrainingexam
8 months, 1 week agoPartha117
11 months, 2 weeks agoBuruguduystunstugudunstuy
1 year agoShwom
1 year, 1 month agocslince
1 year, 2 months agoleogor
1 year, 3 months ago[Removed]
1 year, 5 months agoShlok27_gcloud
1 year, 5 months agohabros
1 year, 6 months agoAzureDP900
1 year, 8 months agoharoldbenites
1 year, 9 months agocysteine
1 year, 10 months agoRegisFTM
2 years, 2 months agoZufair
2 years, 2 months ago