<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 21/06/15 15:27, Binan AL Halabi
      wrote:<br>
    </div>
    <blockquote
      cite="mid:826202578.2528560.1434857258245.JavaMail.yahoo@mail.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:times
        new roman, new york, times, serif;font-size:16px">
        <div id="yui_3_16_0_1_1434856655752_2890" dir="ltr">Hi all,</div>
        <div dir="ltr">I have this part of my Heat template:</div>
        <div dir="ltr"><br>
        </div>
        <div id="yui_3_16_0_1_1434856655752_3087" dir="ltr">#
          Autoscaling group definition<br style="" class="">
            auto-scaling-group:<br style="" class="">
              type: OS::Heat::AutoScalingGroup<br style="" class="">
              properties:<br style="" class="">
                min_size: 1<br style="" class="">
                max_size: 1<br style="" class="">
                resource:<br style="" class="">
                  type: OS::Nova::Server<br style="" class="">
                  properties:<br style="" class="">
                    flavor: { get_param: flavor }<br style="" class="">
                    image: { get_param: image }<br style="" class="">
                    key_name: { get_param: key }<br style="" class="">
                    networks:<br style="" class="">
                      - port: { get_resource: server_port }<br style=""
            class="">
                    user_data_format: SOFTWARE_CONFIG<br style=""
            class="">
                    software_config_transport: POLL_SERVER_HEAT<br
            style="" class="">
          <br style="" class="">
            deployment:<br style="" class="">
              type: OS::Heat::SoftwareDeployment<br style="" class="">
              properties:<br style="" class="">
                config:<br style="" class="">
                  get_resource: config<br style="" class="">
               <font id="yui_3_16_0_1_1434856655752_3090"
            color="#9d1811"> server: { get_attr: [auto-scaling-group,
            resource] } ??????????????????????????????????<br style=""
              class="">
          </font>      input_values:<br style="" class="">
                  foo: fooooo<br style="" class="">
                  bar: baaaaa<br style="" class="">
                signal_transport : CFN_SIGNAL<br style="" class="">
          <br>
        </div>
        <div id="yui_3_16_0_1_1434856655752_3088" dir="ltr" style=""
          class="">The SoftwareDeployment is applied to the servers in
          the autoscaling group. The question:  how i specify the server
          field in the SoftwareDeployment to refrence to the server in
          autoscaling group ?</div>
        <div id="yui_3_16_0_1_1434856655752_3119" dir="ltr" style=""
          class=""><br>
        </div>
        <br>
      </div>
    </blockquote>
    The scaling resource in your auto-scaling-group needs to be a
    template resource instead of an OS::Nova::Server. The server and the
    deployment resource should be inside that template resource, ie<br>
    <br>
      auto-scaling-group:<br style="" class="">
        type: OS::Heat::AutoScalingGroup<br style="" class="">
        properties:<br style="" class="">
          min_size: 1<br style="" class="">
          max_size: 1<br style="" class="">
          resource:<br>
            type: server.yaml<br>
    <br>
    server.yaml<br>
    ===========<br>
    parameters:<br>
    ...<br>
    resources:<br>
      server:<br>
        type: OS::Nova::Server<br style="" class="">
        properties:<br style="" class="">
          flavor: { get_param: flavor }<br style="" class="">
          ...<br>
    <br>
      deployment:<br style="" class="">
        type: OS::Heat::SoftwareDeployment<br style="" class="">
        properties:<br style="" class="">
         <font id="yui_3_16_0_1_1434856655752_3090" color="#9d1811">
      server: { get_resource: server } <br>
            ...<br>
    </font>
  </body>
</html>