Apologies for the delay in responding here! In case this question is still relevant to you, you can achieve what you want by using jsondecode
with file
to load it into locals
. E.g.,
locals {
vars = jsondecode(file('/path/to/terraform.tfvars.json'))
}
Then, vars
will contain the json data so you can reference the aws_region
var using local.vars.aws_region
.