Interpolation based question

I am trying to get a value from a yaml file for which I need to access it via
" ${var_1}.${var_1}.abc"
where abc = yamldecode(<file.yaml>)
var_1 and var_2 are dynamic and changes according to environment and hence I have to add it that way.
When I do a terraform plan like above it gives me
where var_1 = 1 and var_2 =2 but rather I need the value for the above from yaml file which would be some retailer name. Need inputs please