Hi, I have heira value as an example as
```
profile::candy::virtualhosts:
abc.example.com:
listen: '80'
location: [v1, v2]
backend_port: [3000, 3001]
```
Can anyone tell me how can i loop it to create nginx config along with locations setup
i am able to create virtual host config using this code
```
$virtualhosts.each |$virtualhost, $opts| {
nginx::resource::server { "${virtualhost}":
listen_port => Stdlib::Port($opts[listen]),
ssl => $ssl,
ssl_cert => if $ssl { "/etc/nginx/certs/playerzpot.pem" },
ssl_key => if $ssl { "/etc/nginx/certs/playerzpot.key" },
ssl_redirect => $ssl,
}
```
but want to loop locations and backend port to create nginx config like this
nginx::resource::location { "/v1-${virtualhost}" :
ensure => present,
ssl => true,
ssl_only => true,
location => "${location}",
server => "${virtualhost}",
index_files => [],
proxy => "
http://127.0.0.1:4000/",
proxy_set_header => [ 'Upgrade $http_upgrade', "Connection 'upgrade'", 'Host $host' ],
proxy_http_version => '1.1',
}