<div dir="ltr"><div><div>Hi,<br><br></div>to use the token attribute you must use the OS::Heat::WaitConditionHandle [1] (and OS::Heat::WaitCondition) resources instead. AWS one does not have such attribute [2]<br><br>[1] <a href="http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::WaitConditionHandle">http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::WaitConditionHandle</a><br>[2] <a href="http://docs.openstack.org/developer/heat/template_guide/cfn.html#AWS::CloudFormation::WaitConditionHandle">http://docs.openstack.org/developer/heat/template_guide/cfn.html#AWS::CloudFormation::WaitConditionHandle</a><br><br></div>Best regards,<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Pavlo Shchelokovskyy<div>Software Engineer</div><div>Mirantis Inc</div><div><a href="http://www.mirantis.com" target="_blank">www.mirantis.com</a></div></div></div></div>
<br><div class="gmail_quote">On Fri, Jan 16, 2015 at 9:52 PM, Jesus arteche <span dir="ltr"><<a href="mailto:chechu.linux@gmail.com" target="_blank">chechu.linux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey guys,<div><br></div><div>I have this pattern:</div><div><br></div><div><div>heat_template_version: 2013-05-23</div><div><br></div><div>description: ></div><div>  It deploys a Drupal web site on Internet Information Services</div><div>  with PHP configured. It has a local database on SQL Server Express</div><div><br></div><div>parameters:</div><div>  key_name:</div><div>    type: string</div><div>    description: Name of an existing key pair used to encrypt Admin password.</div><div>    default: chechu</div><div><br></div><div>  flavor:</div><div>    type: string</div><div>    description: ID or name of an existing flavor to be used for the instance.</div><div>    default: Standard_1_2</div><div><br></div><div>  image:</div><div>    type: string</div><div>    description: ID or name of an existing valid Windows Server image.</div><div>    default:     46c57db4-497f-45dd-89a5-21e0b283d279</div><div><br></div><div>  public_network_id:</div><div>    type: string</div><div>    description: ></div><div>      ID of an existing public network where a floating IP will be allocated.#</div><div>    default: 2795f8ad-4820-4dd5-89e0-69f95931e287</div><div><br></div><div>  private_network_id:</div><div>    type: string</div><div>    description: ID of an existing private network.</div><div>    default: 6c18553b-6cca-4e88-bfa2-74e241f9a74b</div><div><br></div><div>  sa_password:</div><div>    type: string</div><div>    description: SQL Server Express system administrator password.</div><div>    hidden: true</div><div>    default: OpenStack_2014</div><div>    constraints:</div><div>      - length: { min: 8 }</div><div>        description: SA password must be at least 8 characters long.</div><div>      - allowed_pattern: '(?=^.{6,255}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*'</div><div>        description: ></div><div>          SA password must contain uppercase and lowercase letters, numbers,</div><div>          non-alphanumeric characters and it must not contain whitespaces.</div><div>          </div><div><br></div><div>  drupal_admin_username:</div><div>    type: string</div><div>    description: Drupal admin user name.</div><div>    default: cloudbase</div><div>    constraints:</div><div>      - length: { min: 4, max: 16 }</div><div>        description: ></div><div>          Drupal admin user name must be between 4 and 16 characters long.</div><div>      - allowed_pattern: '^[a-zA-Z0-9]+$'</div><div>        description: ></div><div>          Drupal admin user name must contain only alphanumeric characters.</div><div><br></div><div>  drupal_admin_password:</div><div>    type: string</div><div>    description: Drupal admin user password.</div><div>    hidden: true</div><div>    constraints:</div><div>      - length: { min: 8 }</div><div>        description: ></div><div>          Drupal admin user password must be at least 8 characters long.</div><div>      - allowed_pattern: '^[\S]+$'</div><div>        description: Drupal admin user password must not contain whitespaces.</div><div>    default: OpenStack_2014</div><div><br></div><div>  drupal_admin_email:</div><div>    type: string</div><div>    description: Drupal administrator email.</div><div>    default: <a href="mailto:chechu@test.com" target="_blank">chechu@test.com</a></div><div>    constraints:</div><div>      - length: { min: 1 }</div><div>        description: Drupal admin email must not be empty.</div><div>      - allowed_pattern: '^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$'</div><div>        description: Drupal admin email must be a valid email address.</div><div><br></div><div>  drupal_site_name:</div><div>    type: string</div><div>    description: Drupal site name.</div><div>    default: My Drupal IIS website created with Heat</div><div>    constraints:</div><div>      - length: { min: 1 }</div><div>        description: Drupal site name must not be empty.</div><div>      - allowed_pattern: '^(?!.*["\r\n\f]).*$'</div><div>        description: ></div><div>          Drupal site name must not contain double quotes and any</div><div>          whitespace character (excepting spaces and tabs).</div><div><br></div><div>  max_timeout:</div><div>    type: number</div><div>    default: 3600</div><div>    description: ></div><div>      The maximum allowed time (seconds) for the instalation to finish.</div><div><br></div><div>resources:</div><div>  </div><div>  wait_condition:</div><div>    type: AWS::CloudFormation::WaitCondition</div><div>    properties:</div><div>      Handle: {get_resource: wait_handle}</div><div>      # Note, count of 5 vs 6 is due to duplicate signal ID 5 sent below</div><div>      Count: 5</div><div>      Timeout: {get_param: max_timeout}</div><div><br></div><div>  wait_handle:</div><div>    type: AWS::CloudFormation::WaitConditionHandle</div><div><br></div><div>  iis_drupal:</div><div>    type: OS::Nova::Server</div><div>    properties:</div><div>      image: { get_param: image }</div><div>      flavor: { get_param: flavor }</div><div>      key_name: { get_param: key_name }</div><div>      networks:</div><div>        - port: { get_resource: server_port }</div><div>      user_data_format: RAW</div><div>      user_data: { get_resource: iis_drupal_init }</div><div><br></div><div><br></div><div><br></div><div>  server_port:</div><div>    type: OS::Neutron::Port</div><div>    properties:</div><div>      network_id: { get_param: private_network_id }</div><div>  </div><div>  server_port_pu:</div><div>    type: OS::Neutron::Port</div><div>    properties:</div><div>      network_id: { get_param: public_network_id }</div><div><br></div><div><br></div><div>  utils_module:</div><div>    type: OS::Heat::SoftwareConfig</div><div>    properties:</div><div>      group: ungrouped</div><div>      config: { get_file: Common/heat-powershell-utils.psm1 }</div><div><br></div><div>  iis_drupal_module:</div><div>    type: OS::Heat::SoftwareConfig</div><div>    properties:</div><div>      group: ungrouped</div><div>      config: { get_file: IIS_Drupal.psm1 }</div><div><br></div><div>  iis_drupal_main:</div><div>    type: OS::Heat::SoftwareConfig</div><div>    properties:</div><div>      group: ungrouped</div><div>      config:</div><div>        str_replace:</div><div>          template: { get_file: IIS_Drupal.ps1 }</div><div>          params:</div><div>            sa_password: { get_param: sa_password }</div><div>            admin_username: { get_param: drupal_admin_username }</div><div>            admin_password: { get_param: drupal_admin_password }</div><div>            admin_email: { get_param: drupal_admin_email }</div><div>            website_name: { get_param: drupal_site_name }</div><div>            wait_handle_endpoint:</div><div>              { get_attr: [wait_handle, endpoint] }</div><div>            wait_handle_token:</div><div>              { get_attr: [wait_handle, token] }</div><div><br></div><div>  iis_drupal_init:</div><div>    type: OS::Heat::MultipartMime</div><div>    properties:</div><div>      parts:</div><div>        [</div><div>          {</div><div>            filename: "heat-powershell-utils.psm1",</div><div>            subtype: "x-cfninitdata",</div><div>            config: { get_resource: utils_module }</div><div>          },</div><div>          {</div><div>            filename: "IIS_Drupal.psm1",</div><div>            subtype: "x-cfninitdata",</div><div>            config: { get_resource: iis_drupal_module }</div><div>          },</div><div>          {</div><div>            filename: "cfn-userdata",</div><div>            subtype: "x-cfninitdata",</div><div>            config: { get_resource: iis_drupal_main }</div><div>          }</div><div>        ]</div><div><br></div><div>outputs:</div><div>  drupal_url:</div><div>    description: URL where you can access the Drupal web site</div><div>    value:</div><div>      str_replace:</div><div>        template: ></div><div>          URL: <a href="http://host" target="_blank">http://host</a></div><div>        params:</div><div>          host: { get_attr: [ server_port, server_port_pu ] }</div></div><div><br></div><div><br></div><div>But I got this errror:</div><div><br></div><div><div><div><p>Create Failed</p>
</div>
<div></div>

    <p>Resource Create Failed: Ht-15306c5 
Stackvalidationfailed: Ht-Ea96e26 Ht-E5bc283 Property Error : Iis Drupal
 Main: Config Ht-99828f1 The Referenced Attribute (Wait Handle Token) Is
 Incorrect.</p><p><br></p><p><br></p><p><br></p><p>Any idea?</p>

</div>
    <div></div></div></div>
<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div>