GoogleCloudPlatform / gcpdiag

gcpdiag is a command-line diagnostics tool for GCP customers.
https://gcpdiag.dev/
Apache License 2.0
289 stars 67 forks source link

interactively/automatically enable required APIs #48

Open black-snow opened 2 years ago

black-snow commented 2 years ago

Thanks for the tool, quite handy!

It'd be nice if instead of failing it'd just aks for permission and enable the required APIs by itself. I got prompted for three:

gcloud services enable serviceusage.googleapis.com --project=
gcloud services enable cloudresourcemanager.googleapis.com --project=
gcloud services enable iam.googleapis.com --project=

It's also missing from the README, I think.

vinay-vgs commented 2 months ago

Thanks for your suggestion. Currently, gcpdiag functions as a non-interactive diagnostic tool that only reads data without making any modifications or changes. Therefore, using gcpdiag to enable APIs isn't possible at this time.

Thank you for pointing out the missing information from README file. We will work on it and update the README file.

black-snow commented 2 months ago

That's some grave digging after two years :D

If it was possible at this time I wouldn't have to open an issue, right? 🙃
Sorry for being pointy.

I could imagine an --interactive flag, or better yet, interactive by default if an interactive terminal is dected and an optional --non-interactive.