terracost
terracost copied to clipboard
Enable estimating cost from terraform references
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.
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
...
}