Ask Your Question
0

How to get floating IP of an instance in a template

asked 2013-10-15 19:22:26 -0500

sasokavcic66 gravatar image

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.

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2013-10-17 09:46:49 -0500

shardy gravatar image

Raised bug #1240893 to add the missing attributes_schema

edit flag offensive delete link more
0

answered 2013-10-16 21:18:55 -0500

sasokavcic66 gravatar image

Thanks Zane Bitter, that solved my question.

edit flag offensive delete link more
0

answered 2013-10-16 21:18:43 -0500

sasokavcic66 gravatar image

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

edit flag offensive delete link more
0

answered 2013-10-16 21:11:52 -0500

Reference documentation is here http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::FloatingIP (http://docs.openstack.org/developer/h...)

edit flag offensive delete link more
0

answered 2013-10-16 08:57:29 -0500

zaneb gravatar image

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.

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: 2013-10-15 19:22:26 -0500

Seen: 442 times

Last updated: Oct 17 '13