Difference between revisions of "GCP"
From My Wiki
(Created page with " == Get all instances from all projects == for i in `gcloud projects list --format json|jq '.[].projectId'|xargs`; do gcloud compute instances list --project=$i --format="csv...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | |||
| + | == Install GCloud on Cygwin / MobaXterm == | ||
| + | |||
| + | curl https://sdk.cloud.google.com | bash | ||
| + | |||
== Get all instances from all projects == | == Get all instances from all projects == | ||
| − | for i in `gcloud projects list --format json|jq '.[].projectId'|xargs`; do gcloud compute instances list --project=$i --format="csv[no-heading](name,machineType,cpuPlatform)"|sed "s/^/$i,/"; done | + | for i in `gcloud projects list --format json|jq '.[].projectId'|xargs`; do gcloud compute instances list --project=$i --format="csv[no-heading](name,machineType,cpuPlatform)"|sed "s/^/$i,/"; done |
Latest revision as of 10:35, 21 July 2019
Install GCloud on Cygwin / MobaXterm
curl https://sdk.cloud.google.com | bash
Get all instances from all projects
for i in `gcloud projects list --format json|jq '.[].projectId'|xargs`; do gcloud compute instances list --project=$i --format="csv[no-heading](name,machineType,cpuPlatform)"|sed "s/^/$i,/"; done