title: OpenStack - how to iterate comma_delimited_list using %index% from OS::Heat::ResourceGroup?
body: <p>I have a comma_delimited_list which represents list of fixed IPs and in my <code>OS::Heat::ResourceGroup</code> I want that each node will get one fixed ip based on his current index.</p>
  
  <p>I have the following heat template (I've pasted only the relevant):</p>
  
  <pre><code>my_fixed_ips:
      type: comma_delimited_list
  
  resources:
    MyResource:
      type: OS::Heat::ResourceGroup
      properties:
        count: { get_param: my_node_count }
        resource_def:
          type: MyTemplate.yaml
          properties:
            fixed_ip: { get_param: [ my_fixed_ips, %index% ] }
            name: myName%index%
  </code></pre>
  
  <p>when i run the command:</p>
  
  <blockquote>
    <p>openstack stack create TomerProtected -e Environment.env -t
    Template.yaml -f yaml</p>
  </blockquote>
  
  <p>I'm getting the error:
  found character '%' that cannot start any token</p>
  
  <p>I've tried to set index_var to something else (index and not %index%) but still i can not get any specific value from the comma_delimited_list.</p>
  
  <p>my question is - how to iterate comma_delimited_list using %index% from <code>OS::Heat::ResourceGroup</code>?</p>
  
  <p>any ideas?</p>
  
  <p>UPDATE:</p>
  
  <p>I've found a solution by myself but it doesn't pleases me:</p>
  
  <p>Ive changed index_var to: index
  Passed the comma_delimited_list and the current index from this template to MyTemplate.yaml.
  From MyTemplate.yaml I could get specific value from the comma_delimited_list: </p>
  
  <pre><code>fixed_ips: [ { "ip_address": { get_param: [ my_fixed_ips, get_param: index ] } } ]
  </code></pre>
  
  <p>but there most be a way to do this from OS::Heat::ResourceGroup</p>