
Explanation:
The correct answer is A. The 'gcloud' command-line tool is used to manage Google Cloud resources, including Compute Engine instances. By creating two configurations using 'gcloud config', you can switch between the production and development projects. Writing a script that sets each configuration as active and then using 'gcloud compute instances list' will allow you to list all compute resources for each project. Options B, C, and D are not suitable because 'gsutil' is used for managing Cloud Storage, not Compute Engine, and manually exporting information does not automate the process as required.
Ultimate access to all questions.
No comments yet.
You have been granted access to both production and development projects within a Google Cloud Platform account. Your task is to establish an automated mechanism that will generate a daily inventory of all compute instances across both the development and production environments. How should you proceed to implement this solution effectively?
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.