cycloidio / terracost

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

Added: Google implementation #62

Closed xescugc closed 2 years ago

xescugc commented 2 years ago

For now it only has compute_instance and the attribute machine_type but it has the bases to extend it with other resources and attributes.

Related to #2

xescugc commented 2 years ago

Done/Commented.

Some logic uses SKU some Sku while it would be more coherent to always use the same format, it seems more logical to go for SKU.

Did change that, but it's only one function fetchSKUs the other Sku are the internal name that Google has so I cannot change that.

The contribution documentation could be perhaps extended to help users on adding new elements for GCP.

I was planning on having a separated PR improving the general docs on how to contribute/extend providers.

I'm wondering if the tests we have also cover enough use-cases (despite having limited amount of services supported); such as: invalid region, service, etc

Test are quite limited because there is not much done, I added one for the service, but for the region/zone on Google I'm not validating anything right now, I can have a static map of available region/zone similar to what we have on AWS but Google already has that validation so if a wrong zone is used it'll fail.

xescugc commented 2 years ago

I've pushed more changes as I added a test to estimate Google HCL and fixed and issue found in the process.

xlr-8 commented 2 years ago

I'm not sure the doc/comments got addressed despite the reaction on the comment, seems like various are missing.

xescugc commented 2 years ago

Ok CI fiexd and which are the comments you say are missing? I think I tackle them all

xescugc commented 2 years ago

Done