add things resources from the last 5 years over machines

This commit is contained in:
autistic-symposium-helpers 2024-10-15 09:59:09 +09:00 committed by GitHub
parent ac9c955e0b
commit b0a4e417ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 2327 additions and 84 deletions

View file

@ -0,0 +1,7 @@
#!/bin/bash
for x in $(gcloud projects list | tail -n +2 | awk '{ print $1}');
do
gcloud sql instances list --project $x
done

13
gcloud/get_gcp_apps.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
projects=$(gcloud projects list | tail -n +2 | awk '{ print $1}')
list_app () {
gcloud app services list --project $1 2>&1 | grep -v ERROR
}
for x in $projects;
do
list_app $x
done

10
gcloud/get_kb8_clusters.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
projects=$(gcloud projects list | tail -n +2 | awk '{ print $1}');
for x in $projects;
do
project_json=$(gcloud container clusters list --project $x --format json)
echo $project_json | jq -e -r '.[] | .endpoint'
done

8
gcloud/get_public_ips.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
for x in $(gcloud projects list | tail -n +2 | awk '{ print $1}');
do
ip_list=$(gcloud compute instances list --project $x --format json)
gcloud compute instances list --project $x --format json | jq -r '.[] | .networkInterfaces[] | .accessConfigs[] | .natIP';
done