infracost / infracost

Cloud cost estimates for Terraform in pull requests💰📉 Shift FinOps Left!
https://infracost.io
Apache License 2.0
11.04k stars 555 forks source link

Add Cost for google_filestore_instance #2143

Open ctit-cl opened 1 year ago

ctit-cl commented 1 year ago

It's necessary for NFS implementación check

Note for community

Please 👍 if you'd like to upvote this or receive updates. Add a comment if you'd like to contribute.

aliscott commented 1 year ago

Thanks @ctit-cl! Let me know if you’d like to contribute, otherwise I’ll open it up for the whole community (we regularly prioritize and work on them too).

varshneydevansh commented 1 year ago

Can I pick this challenge? From which file do I have to start?

aliscott commented 1 year ago

Hi @varshneydevansh, thanks 🙏 . We have a specific contributing guide for what's involved with adding new resources: https://github.com/infracost/infracost/blob/master/contributing/add_new_resource_guide.md

varshneydevansh commented 1 year ago

Today I sat down and able to almost done with the environment set up. I wanted to ask do I have to create the new files for this? And also where should I begin with?

These are some references which I am referring to -

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/firestore_database https://cloud.google.com/run/docs/tutorials/network-filesystems-filestore#cloudrun_fs_script-python https://stackoverflow.com/questions/76359288/connecting-gcp-cloud-run-instance-to-filestore-with-terraform https://cloud.google.com/filestore/pricing


I need a little helping hand.

Hi @aliscott I just require some initial pointers to get start with this.

varshneydevansh commented 1 year ago

Hi @aliscott is this a good one for me? =)

aliscott commented 1 year ago

@varshneydevansh thank you! Here are some resources for adding new resources. I've also added a breakdown of what cost components should be added for this service.

google_filestore_instance

Terraform docs

This resource should have one cost component with the name being one of the below depending on the tier attribute:

The units of this cost component should be GiB and the quantity should be based on the file_shares.capacity_gb attribute.

google_filestore_backup

Terraform docs

This has two cost components:

  1. Storage - this should be based on a usage attribute called storage_gb
  2. Data transfer - this should be based on a usage attribute called monthly_data_transfer_gb. This should only be shown if the backup is in a different destination from the referenced google_filestore_instance.

google_filestore_snapshot

I'm not sure about this just now. I can't seem to create snapshots in my own GCP account. If anyone has more details on how this service works and how it is priced please let us know. For just now I think we can just leave this resource as unsupported.