Resource Group nested stacks do not have index_var substituted
Bug #1503096 reported by
Chris Buccella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Invalid
|
Undecided
|
Unassigned |
Bug Description
To recreate:
aserver.yaml:
heat_
resources:
instance:
type: OS::Nova::Server
properties:
name: my_server_%index%
image: cirros
flavor: m1.tiny
recreate.yaml:
heat_
resources:
rg:
type: OS::Heat:
properties:
count: 3
Creating a stack using recreate.yaml results in 3 servers all named "my_sever_%index%".
This might be the same cause of #1470614; not sure
To post a comment you must log in.
I don't think it is expected for index_var substitutions happening inside the template resource, only in the resource group itself. So you should do something like:
aserver.yaml: template_ version: 2015-04-30
heat_
parameters:
server_name:
type: string
resources:
instance:
type: OS::Nova::Server
properties:
name: {get_param: server_name}
image: cirros
flavor: m1.tiny
recreate.yaml: template_ version: 2015-04-30
heat_
resources: :ResourceGroup
resource_ def:
properties :
server_ name: my_server_%index%
rg:
type: OS::Heat:
properties:
count: 3
type: aserver.yaml