How to get floating IP of an instance in a template

Asked by Saso Kavcic

I have an EC2 instance with a neutron port with a fixed IP address. I also allocate a floating IP for this instance/port using neutron resources. I am wondering if it is possible to get this allocated floating IP in the template using FnGetAtt or some other function in order to display it in the outputs section or use it in some other place.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Heat Edit question
Assignee:
No assignee Edit question
Solved by:
Zane Bitter
Solved:
Last query:
Last reply:
Revision history for this message
Best Zane Bitter (zaneb) said :
#1

Yes, but sadly it's undocumented (feel free to raise a bug for that). Basically the Neutron floating IP resource will provide attributes that correspond to the names of fields you can get back from the Neutron API/client. As far as I can establish, these are 'id', 'fixed_ip_address', 'floating_ip_address' and 'port_id'.

So {"Fn::GetAtt": ["MyFloatingIpResource", "floating_ip_address"]} should do what you want.

Revision history for this message
Steve Baker (steve-stevebaker) said :
#2
Revision history for this message
Saso Kavcic (sasokavcic66) said :
#3

Yes, but there are no attributes listed, like for the other resources.

Revision history for this message
Saso Kavcic (sasokavcic66) said :
#4

Thanks Zane Bitter, that solved my question.

Revision history for this message
Steven Hardy (shardy) said :
#5

Raised bug #1240893 to add the missing attributes_schema