Ask Your Question
0

Accessing property of child node of ResourceGroup

asked 2017-04-26 00:54:18 -0500

adrianfalleiro gravatar image

I have a resource group defined as such:

web_servers:
    type: "OS::Heat::ResourceGroup"
    properties:
      count: { get_param: server_count }
      resource_def:
        type: server.yaml

Where server.yaml creates OS::Nova::Server and has the following outputs:

outputs:
  accessIPv4:
    value: { get_attr: [web, accessIPv4] }

  privateIPv4:
    value: { get_attr: [web, networks, private, 0] }

Currently I am accessing all the IP addresses in the parent stack using { get_attr: [web_servers, accessIPv4] }

Wondering how I could get the accessIPv4 property of the first node of web_servers

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-04-26 07:23:38 -0500

zaneb gravatar image

Like this:

{get_attr: [web_servers, resources.0, accessIPv4]}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-04-26 00:54:18 -0500

Seen: 540 times

Last updated: Apr 26 '17