Would be cool when by running terraform plan to also show an estimated cost based on the current AWS price for the service/region.
+1 This will be nice feature to have with terraform plan
Hello – Thank you for opening the issue here. Right now our stance on this idea is that we'd like to see 3rd party support for this, and not include it as a feature of Terraform itself. If we can improve Terraform's output or make it more machine readable to enable this, we'd be open for suggestions. Thanks!
Hey there, I tried to write a tool that does this, but it's still in its infancy. https://github.com/Bjorn248/terraform_cashier
@catsby What do you mean about improving terraform output? At the moment do you have guidelines about how to develop this as a third party module?
thanks @Bjorn248 for this article: https://www.mobiquityinc.com/thought-leadership/estimating-aws-infrastructure-cost-from-terraform-templates :-) I'm working for a different cloud provider with a much simpler pricing model. I would really like to understand how to make billing estimation easier to get as it is a very important part of a deployment.
@sieben it's pretty simple at the highest level. You need to know which and how many resources you are planning on creating, which is available in the terraform plan. Then you need a place to query the pricing data for each resource type, which is why I wrote a pricing API. Your cloud provider might not have an API available, so you might have to write your own, unfortunately. Am happy to take this conversation to email if you'd like.
I know this is not exactly what's wanted here, but it probably is still helpful:
https://www.hashicorp.com/blog/announcing-cost-estimation-for-terraform-cloud-and-enterprise
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hey there, I tried to write a tool that does this, but it's still in its infancy. https://github.com/Bjorn248/terraform_cashier