Currently, only the Terraform provider without an alias will work. Since in the case of AWS, the only way to define resources in multiple regions is to use provider aliases (with each provider config referencing a different region), this is needed in order to be able to estimate resources in multiple regions.
Implementation details
The provider_name property from both planned_values and prior_state blocks reference the full name of a provider (e.g. registry.terraform.io/hashicorp/aws). From that point, there is no way of retrieving the actual provider config or even its alias. The only way is to cross-reference the configuration block - there the alias will be available under the provider_config_key property (e.g. "aws.alias")
Abstract
Currently, only the Terraform provider without an alias will work. Since in the case of AWS, the only way to define resources in multiple regions is to use provider aliases (with each provider config referencing a different region), this is needed in order to be able to estimate resources in multiple regions.
Implementation details
The
provider_name
property from bothplanned_values
andprior_state
blocks reference the full name of a provider (e.g.registry.terraform.io/hashicorp/aws
). From that point, there is no way of retrieving the actual provider config or even its alias. The only way is to cross-reference theconfiguration
block - there the alias will be available under theprovider_config_key
property (e.g. "aws.alias")