Search code examples
google-cloud-platformgoogle-compute-enginegcloud-cli

In glcoud cli is there a way to list Instance created in last one hour?


I am looking for a gcloud CLI command to retrieve all the instance created in the last one hour

gcloud compute instances list


Solution

  • You can filter the results, like this.

    gcloud compute instances list --filter="creationTimestamp>=2020-12-01T00:00:00"
    

    Then, build the timestamp that you want.