Get instance hostname (RHEL/CentOS) in HEAT template

asked 2019-05-13 06:34:58 -0500

pierre_l gravatar image

I'm a user of OpenStack in my company.

I can create instances/stack with HEAT on one tenant/project.

The CentOS/RHEL instances created have a hostname like "".
I don't know how they are attributed, and I can't find this value from my HEAT template.

I tried to find it with:

{ get_attr: [my_instance] }
{ get_attr: [my_instance, show] }

Do you know how to get this value in a HEAT template to output it in the "outputs" part (or to use it like a variable for other name resources)?

edit retag flag offensive close merge delete


The OS::Nova::Server resource has an instance_name attribute. OS::Neutron::Port has a dns_assignment attribute which contains the FQDN. You can derive the port from the server resource, though I don't remember how.

Heat can't find a hostname that was set by the instance itself.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-15 07:57:13 -0500 )edit