Boundary aws dynamic host set multiple IP

When using dynamic host sets with instances with both public and internal IP’s it seems boundary picks up the internal IP by default

is there a way to set a filter or something so it picks up the external?

Yes - you can use preferred_endpoints to specify which addresses to prefer in which order.

the ec2 instances are auto discovered, is there a filter or something I can use for preferred_endpoints? the documentation is not very clear if I can use filters

can’t seem to use something like

dns:ec2-*

@jeff
if I use dns:* I get

 Error
host_sets.(Service).updatePluginInRepo: unable to update host set: plugin.(Repository).UpdateSet: set version mismatch, want=9914, got=9913: integrity violation: error #1105```

it seems the dns picks up the external hostname of the ec2 instance while the IP picks up the internal IP not the eip allocation to that instance

That error you’re getting seems like a bug – can you file a bug report so someone can take a look?

You may want to use cidr: instead to pick the right IP range.

@Jeff will do

but if I use cidr: it will always pick the internal IP not external

It shouldn’t, because it should pick the CIDR range you specify.