cycloidio / terracost

Cloud cost estimation for Terraform in your CLI
MIT License
278 stars 29 forks source link

cost: include currency in cost calculations #49

Closed theskch closed 3 years ago

theskch commented 3 years ago

This PR resolves the issue #48 . It adds currency in cost and checks if the currency is the same when making calculations. Currency is extracted from the ingested data - from the database.

theskch commented 3 years ago

IMHO using the https://pkg.go.dev/golang.org/x/text/currency#ParseISO is a good suggestion, I would expect all CP to have a valid currency format, and setting currencies for all CP to the same format before inserting them in the DB will guarantee there is no mismatch because of the format.

theskch commented 3 years ago

RS Done