cycloidio / terracost

Cloud cost estimation for Terraform in your CLI
MIT License
286 stars 30 forks source link

Fix problems with Terraform 0.13+ and usage of variables #20

Closed patrislav closed 3 years ago

patrislav commented 3 years ago

Abstract

This PR solves two problems:

  1. Terraform 0.13 changed the value of provider_name field in a resource spec: it is now a fully qualified URI (registry.terraform.io/hashicorp/aws) instead of being just a provider name (aws). This requires the fully qualified name (RegistryName) to be added to the MatchNames list of AWS ProviderInitializer as well as a change to how plans are read. This closes #18. Note: after the change, multiple aliases for a provider will not work, this will be fixed in a separate issue.
  2. Referencing variables in provider config would not work as variables were unsupported. This PR adds support for using variables in provider config and closes #19.