Say I have the following variables ```$vlans = [ '...
# puppet
g
Say I have the following variables
Copy code
$vlans = [ '1', '2', '3' ]
$vlan_1_data = {stuff}
$vlan_2_data = {stuff}
$vlan_3_data = {more stuff}
Is there a way to compose the variable name while doing something like this:
Copy code
$vlans.each |$v| {
  $blah => {
    'ip'  => '1.2.3.4',
    'data => $vlan_${v}_data,
  }
I can't imagine that
data => $vlan_${v}_data
is correct, but is there a way to do that where the variable is made up of
fixed_string_$variable_fixed_string
?