Re: Retrieving external ip in .erb template

Stevo Slavić <sslavic at>

Thanks for reply Dmitriy!

I needed a script that gives me static vip of instance, one which does not
change (without changes to deployment manifest).
I tried and found out that spec.networks.marshal_dump.first[1].ip gives me
elastic ip, not the static vip of instance.

I'm worried, if templates get applied only during "bosh deploy", if events,
other than "bosh deploy", are possible where elastic ip can change without
templates being reevaluated, then advertised ip in configuration file will
be stale/outdated, not in sync with actual elastic ip of vm, and kafka will
not be reachable through advertised ip, but it will be accessible through
static vip, resulting in all sorts of failures.

So, is it possible that elastic ip changes without templates being
reevaluated? If yes, then I need a way to determine instance static vip in
configuration file template.

Kind regards,
Stevo Slavic.

On Wed, May 27, 2015 at 3:02 AM, Dmitriy Kalinin <dkalinin(a)>

Concourse release ( does something like

Your example should work also.

On Fri, May 22, 2015 at 8:16 AM, Stevo Slavić <sslavic(a)> wrote:

Hello Bosh community,

Is it possible to retrieve external ip in .erb template?

I'd like to release/deploy Apache Kafka using Bosh, and one of the
properties to configure in Kafka is - every instance needs to know it's external ip, to
advertise it to others.

Should something like:<%= spec.networks.marshal_dump.first[1].ip %>


Kind regards,
Stevo Slavic.

cf-bosh mailing list

Join to automatically receive all group messages.