repeat function using for_each argument doesn't work as documented in heat template
Issue
- The repeat function using for_each argument does not work correctly.
- More information on the function can be found here: http://docs.openstack.org/developer/heat/template_guide/hot_spec.html
[root@undercloud ~]# heat stack-create -f b.yaml s5
ERROR: The values of the "for_each" argument to "repeat" must be lists
[root@undercloud ~]# cat b.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@undercloud ~]# heat stack-create -f b.yaml s5
ERROR: The values of the "for_each" argument to "repeat" must be lists
Environment
- Red Hat OpenStack 7.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.