{"repo":"cycloidio/terracost","free":true,"listed":false,"github":"https://github.com/cycloidio/terracost","clone":"git clone https://github.com/cycloidio/terracost.git","description":"Cloud cost estimation for Terraform in your CLI","language":"Go","stars":355,"topics":["cost-estimation","cost-optimization","cost-management","terraform","terraform-cost-estimation","infrastructure-as-code","aws","cloud","gcp","azure"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"TerraCost Go library for estimating Terraform costs using ingested cloud vendor prices. It is meant to be imported and used by programs (API's or standalone) with access to a MySQL-compatible database and the Internet. Installation We need to do a -replace because of https://github.com/golang/go/issues/30354#issuecomment-466557015. We have custom forks of Terraform and Terragrunt and in order to use TerraCost they need to be replaced when importing also. Requirements - Go 1.25 or newer - MySQL database Provider support Currently Terracost supports the following providers and with an specific subset of resources from them: AWS Google AzureRM Google Credentials To be able to ingest the pricing data from Google the credentials needed have to have access to Compute Engine API and have also billing enabled. This is needed to be able to fetch the Machine Types, for the SKUs we would only need an normal set of credentials (or even API Key) but as we need both we have to use the more complex one. If you do not know how to activate those permissions, just use the credentials and the import will fail and on the logs will inform of what is missing and how to activate it. Usage Migrating the database Ingesting pricing data Tracking ingestion progress We're using the github.com/machinebox/progress library for tracking ingestion progress. 1. Create a channel that will receive progress updates and set up a goroutine (it will print the bytes ingested out of bytes total and remaining time eac","default_branch":null,"files":null,"tree":[],"storefront":"/r/cycloidio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cycloidio/terracost/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}