Can you utilize two ResourceGroups, one with cinder volumes and one
without? Then use two parameters, servers_with_volumes_count and
servers_without_volumes_count which will map to the count parameter for
ResourceGroup. It's ok for count to be 0:

http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::ResourceGroup-prop-count


-Chris

On Mon, Feb 22, 2016 at 3:50 PM, Brent Troge <brenttroge2...@gmail.com>
wrote:

>
> I have a heat template which accepts parameters/values via an environment
> file.
> This heat template creates x amount of cinder volumes based on the
> parameter value
> defined in the environment file.
>
> I have instances that dont require cinder volumes, so it is possible that
> the instances could
> also use the same template. However HEAT chokes because I dont provide
> values to create the cinder volumes.
>
> So instead of having two templates, is it possible to put a conditional
> check within
> the heat template.
> The condition check would be something like:
>
> if cinder volume size = 0, then dont exercise the cinder resources
> statements.
>
> I am not sure something like this is currently supported by heat. So
> hopefully the community has some suggestions or clues.
>
> Thanks in advance.
>
>
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack@lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to