Revision history [back]

click to hide/show revision 1
initial version

repeat function using for_each argument doesn't work as documented in heat template

[root@controller-1]# cat secp.yaml
heat_template_version: 2015-04-30

parameters:
  ports:
    type: comma_delimited_list
    label: ports
    default: "80,443,8080"

resources:
  security_group:
    type: OS::Neutron::SecurityGroup
    properties:
      name: web_server_security_group
      rules:
        repeat:
          for_each:
            <%port%>: { get_param: ports }
          template:
            protocol: tcp
            port_range_min: <%port%>
            port_range_max: <%port%>

[root@controller-1]# heat stack-create -f secp.yaml s6
ERROR: The server could not comply with the request since it is either malformed or otherwise incorrect.