gecco helps teams optimise their cloud resource costs. Locate abandoned, idle, and inefficiently configured resources quickly. gecco helps teams build a culture of cost optimisation awareness in an easy-to-use and feature-rich tool.
🔍
gecco helps you find...
- Abandoned instances
- Idle instances
- Resizeable instances
- Abandoned disks
- Stale snapshots
- Idle addresses
- Idle images
👍🏻 Getting Started
Install gecco
Install go, then install gecco
go install github.com/aeihr/gecco@latest
Set your go/bin
in your $PATH
export PATH=$PATH:$(go env GOPATH)/bin
gecco is now available from anywhere in your terminal
gecco --version
☁️
Login to gcloud
gecco makes use of your gcloud credentials for a secure authentication process. If you haven't already install the gcloud SDK then login
gcloud init && \
gcloud auth application-default login
You're all set, now you can run commands against projects you have access to
gecco [ COMMAND ] --project [ PROJECT_ID ]
The project you selected as your default will be used for API calls and billing by default, you can specify another project using the below flag
gecco [ COMMAND ] --project [ PROJECT_ID ] --billing-project [ PROJECT_ID ]
If you need to impersonate a service account
gecco [ COMMAND ] --impersonate [ SERVICE_ACCOUNT_EMAIL ]
🧑💻
Commands
To learn more about gecco commands read the user guide here or run the --help
flag on any command
gecco [COMMAND] --help
Service Accounts
Users
For users we recommend using service account impersonation and not physical keys. Impersonation can be achieved by giving the user the Token Creator
role on a particular service account or on the project level. This is a significantly more secure method.
Automation
If you're running gecco remotely as an automated service, it will inherit the service account for the service it's running on. _ For example, if its running on a Compute Engine instance it will use the service account of that instance._ Therefore you should ensure whatever service account it inherits that it has the correct access to the projects and resources for the required commands.
👋
Need help or want to request a feature?
If you need help getting started, want to request a feature, or if we can help your team GCP cost optimisation, you can start a discussion with us!
🙋♀️
Contributing
- Uses the Cobra CLI framework
- Create a branch and open a descriptive Pull Request
- Raise an issue and we'll work on it