ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 84 - Associate Cloud Engineer discussion

Report
Export

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.
Answers
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.
Answers
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.
Answers
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.
Answers
D.
Go to GCP Console and export this information to Cloud SQL on a daily basis.
Suggested answer: A

Explanation:

You can create two configurations -- one for the development project and another for the production project. And you do that by running ''gcloud config configurations create'' command. https://cloud.google.com/sdk/gcloud/reference/config/configurations/create In your custom script, you can load these configurations one at a time and execute gcloud compute instances list to list Google Compute Engine instances in the project that is active in the gcloud configuration. Ref:https://cloud.google.com/sdk/gcloud/reference/compute/instances/list Once you have this information, you can export it in a suitable format to a suitable target e.g. export as CSV or export to Cloud Storage/BigQuery/SQL, etc

asked 18/09/2024
Pranoy Bej
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first