terraform-provider-iterative icon indicating copy to clipboard operation
terraform-provider-iterative copied to clipboard

print cost estimate

Open casperdcl opened this issue 2 years ago • 5 comments

Can we use APIs to retrieve an estimated hourly price for machine on each provider to print to the screen on apply? atm it only says {machine} on {cloud}. Would be great to append (~${price}/h)

Also on refresh/destroy we could calculate total cost estimate by multiplying by uptime.

If we implement this we could then even auto-select cloud based on lowest price :P

API ideas from https://github.com/iterative/terraform-provider-iterative/issues/158#issuecomment-1108684522:

  • https://github.com/infracost/cloud-pricing-api
  • https://github.com/scalyr/cloud-costs
  • https://github.com/catalyst-cloud/catalystcloud-price-comparison
  • https://github.com/sourabh-kumar-ML/Cloud-Instance-Price-Prediction 🤖

casperdcl avatar May 10 '22 12:05 casperdcl

Related

  • https://github.com/iterative/terraform-provider-iterative/issues/158#issuecomment-934826522 — user interface
  • https://github.com/iterative/terraform-provider-iterative/issues/158#issuecomment-1108684522 — pricing retrieval

0x2b3bfa0 avatar May 10 '22 12:05 0x2b3bfa0

Not sure of the value of this feature until we narrow down the target audience.

0x2b3bfa0 avatar May 10 '22 12:05 0x2b3bfa0

target audience: any user wondering how much something costs without reaching for a calculator.

To me it's closer to p1 than p2.

casperdcl avatar May 10 '22 13:05 casperdcl

auto-select cloud based on lowest price

Yes, sure, and even machine from a range of tolerated specifications. 🙃 Still, this doesn't look like something a measly client–side tool should be doing on its own (?).

Switching cloud providers [potentially] implies having credentials for all of them and paying for data transfer costs.

0x2b3bfa0 avatar May 10 '22 14:05 0x2b3bfa0

target audience: any user wondering how much something costs without reaching for a calculator.

Any user unable to reach for the cloud documentation?

To me it's closer to p1 than p2.

Using priority numbers as the reference framework might not be adequate in this occasion. 🤔 I'd say that issues < this < issues < planning < design without fear to being mistaken.

0x2b3bfa0 avatar May 10 '22 14:05 0x2b3bfa0