cycloidio / terracost

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

terraform: fix unexpected error with multiple providers #57

Closed xlr-8 closed 2 years ago

xlr-8 commented 2 years ago

If using another provider (e.g. 'random'), the execution would stop because of the recursion of the function, so using the flag logic doesn't work as expected when multiple providers are mixed.

Instead that logic has been extracted afterwards, to ensure that at least one of the queries is of a known provider's type.

Closes: https://github.com/cycloidio/terracost/issues/56