Complete the code to list all Compute Engine instances using gcloud CLI.
gcloud compute instances [1]The list command shows all instances in your project. This is useful for automation to check existing resources.
Complete the code to set the default project for gcloud CLI automation.
gcloud config [1] project my-project-idThe set command changes the configuration, here setting the default project for future commands.
Fix the error in the command to create a new Compute Engine instance with automation.
gcloud compute instances create [1] --zone=us-central1-aThe instance name should be a simple string without flags. Here, my-instance is the correct name.
Fill both blanks to automate stopping a Compute Engine instance in a specific zone.
gcloud compute instances [1] [2] --zone=us-west1-b
The stop command stops the instance named my-instance. This is useful in automation to save costs.
Fill all three blanks to automate listing all buckets in a specific project.
gcloud [1] storage [2] list --project=[3]
The beta command group is used here for storage commands. buckets specifies the resource type, and my-project-id sets the project.