<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>I’m trying to access the floating ip assigned to an instance created with a heat template and write it to file during creation of the instance, my approach is not working and I’m wondering if anyone has any suggestions on how I could archive this.</div>
<div><br>
</div>
<div>    server:</div>
<div>        type: OS::Nova::Server</div>
<div>        properties:</div>
<div>            name: { get_param: server_name }</div>
<div>            image: { get_param: image }</div>
<div>            flavor: { get_param: flavor }</div>
<div>            key_name: { get_param: key_name }</div>
<div>            scheduler_hints:</div>
<div>                group: {get_param: server_group }</div>
<div>            admin_user: { get_param: admin_user }</div>
<div>            networks:</div>
<div>              - port: { get_resource: test_data_server_port }</div>
<div>            user_data_format: RAW</div>
<div>            user_data:</div>
<div>                str_replace:</div>
<div>                    template: |</div>
<div>                        #!/bin/bash -v</div>
<div>                        echo '127.0.0.1 $SERVER_NAME' >> /etc/hosts</div>
<div>                        echo $PROJECT_ID > /etc/project_id</div>
<div>                        echo $FLOATING_IP > /etc/floating_ip</div>
<div>                        </div>
<div>                    params:</div>
<div>                        $SERVER_NAME: { get_param: server_name }</div>
<div>                        $PROJECT_ID: { get_param: 'OS::project_id' }</div>
<div>                        $FLOATING_IP: { get_param: 'OS::Nova::FloatingIP' }</div>
<div><br>
</div>
<div>    test_data_server_port:</div>
<div>        type: OS::Neutron::Port</div>
<div>        properties:</div>
<div>            network_id: { get_param: private_net_id }</div>
<div>            security_groups: [{ get_param: test_security_group }, default]</div>
<div>            replacement_policy: AUTO</div>
<div>            </div>
<div>    association:</div>
<div>        type: OS::Nova::FloatingIPAssociation</div>
<div>        properties:</div>
<div>            floating_ip: { get_resource: floating_ip }</div>
<div>            server_id: { get_resource: test_server }</div>
</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</body>
</html>