terracost icon indicating copy to clipboard operation
terracost copied to clipboard

Enable estimating cost from terraform references

Open marcoldp opened this issue 2 years ago • 1 comments

As of now, the estimate only works when the resources variables are set directly and not via reference. The goal of this issue is to find a way to enable this behavior and allow to estimate resources that have variables set via reference to other resources or data.

marcoldp avatar Jul 20 '22 15:07 marcoldp

For example if the location comes from a resource group fetched with a datasource, which is a common way of doing in Azure IaC.

resource "azurerm_linux_virtual_machine" "nexus" {
...
  resource_group_name   = data.azurerm_resource_group.nexus.name
  location              = data.azurerm_resource_group.nexus.location
...
}

olivier2t avatar Jul 20 '22 16:07 olivier2t