Heat: How to create an index OS::Heat::ResourceGroup?

asked 2017-03-21 11:43:18 -0600

Ramy gravatar image

updated 2017-03-21 16:43:00 -0600


I need to create a lot a flavors, let's say 10 flavors. The name is following a very specific pattern, let's say flav_101, flav_102, flav_201 etc. So I'm trying to use the OS::Heat::ResourceGroup type. With this type, there is the index_var property which by default equal to %index% and can be customized. My question is how to customize this variable in order to get my list of flavors?

Thank you so much for your help!

edit retag flag offensive close merge delete


Are you saying you want to use index substitution, but also customise which indices are used (so you get 101, 102, 201, ... instead of 0, 1, 2, ...)?

zaneb gravatar imagezaneb ( 2017-03-21 16:40:20 -0600 )edit

yes Exactly! instead of 0,1,2, I need to get 101, 102, 201 etc!

Ramy gravatar imageRamy ( 2017-03-21 16:44:26 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-03-21 16:59:27 -0600

zaneb gravatar image

You can't choose custom indices. ResourceGroup exists solely for the edification of people obsessed with contiguous indices.

I'd suggest you just write your own client-side template generator. It couldn't be more than 10 lines of code.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-03-21 11:43:18 -0600

Seen: 869 times

Last updated: Mar 21 '17