Hi,

I have 3 Heat templates using ResourceGroup. "rg_b" depends on "rg_a" and when 
"rg_b" instance is created, it requires the IP address of "rg_a".  and I use 
"rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]}" and it returns "null" 
according to the logs. But weird thing is that I can get the correct 
rg_a_public_ip in the "outputs" section of a.yaml.
My questions are:

1)      Does this behaviors functions as designed?

2)      What is the alternative solution for my case if the answer to 1) is yes?

------- a.yaml -------------------
resources:
rg_a:
  type: OS::Heat::ResourceGroup
  properties:
      count: 1
      resource_def:
          type: b.yaml
          properties:
               ...

rg_b:
type: OS::Heat::ResourceGroup
depends_on:
        -rg_a
properties:
    count: 2
    resource_def:
        type: c.yaml
        properties:
            rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]}               
--------------------  the value is "null"
            ...

outputs:
   rg1_public_ip: {get_attr: [rg_a, rg_a_public_ip]}
--------------------------

------b.yaml  --------------------
...
resources:
    rg_a:
type: OS::Nova::Server
properties:
     ...
outputs:
     rg_a_public_ip:
         value: {get_attr: [rg_a, networks, public, 0]}
--------------------------

---------- c.yaml --------------------
parameters:
rg_a_public_ip:
     type: string
     description: IP of rg_a
...
resources:
rg_b:
    type: OS::Nova::Server
    properties:
         ...
    outputs:
         ...
---------------------------------------

Regards,
Gary
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to