Last active
June 15, 2022 20:05
-
-
Save Intelrunner/623916eba9468cd00fba9ea99ba712f1 to your computer and use it in GitHub Desktop.
Starting point to process all output from Google Cloud Compute Engine Recommendation Engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for project in $(gcloud projects list --format="value(projectId)") | |
do | |
for recommendation in $(gcloud recommender recommendations list --project=$project --location=global --recommender=google.compute.instance.MachineTypeRecommender) | |
do | |
# Here is where the logic for your 'what to do with each recommendation' goes | |
echo "$recommendation" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment