cycloidio / terracost

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

Support Terraform state files (tfstate) #28

Open patrislav opened 3 years ago

patrislav commented 3 years ago

The TFState files contain all of the information we need to perform cost estimation. There's no reason why we shouldn't be able to load it into a cost.State.

To do this, we could add a new function in the terraform package to ExtractQueriesFromStatefile (or similar) that would return []query.Resource. These would be then used in the same way as currently for the plans.