That gets you the locally assigned IP address for that unit, but not the VIP. Currently Juju doesn’t separately track the VIP. The charm HACluster has integration with MAAS to be able to reserve an IP address and then give it to the cluster.
I don’t see an obvious way to get the VIP, but I would hope that it would be reported in the ‘status’ action. Which you would access with:
Doing something like juju run --unit glance-hacluster/leader "network-get --format yaml ha" gives me the locally assigned IP address of the unit and unfortunately not the VIP
I don’t know why I didn’t think of it before … I just modified it slightly with the config-get action because this is the application that has the vip attribute and not the hacluster subordinate so at the end, I have this which is very clean and exactly what I wanted : juju run --unit <APP_NAME>/leader "config-get vip --format yaml"