Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapted elbas gem to handle private-IP-hostnames #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

afquinn
Copy link

@afquinn afquinn commented Oct 26, 2022

Adapted the instance collection to take the hostnames of both public OR private Hostnames

@@ -8,7 +8,7 @@ class InstanceCollection < Base
def initialize(ids)
@ids = ids
@instances = query_instances_by_ids(ids).map do |i|
Instance.new(i.instance_id, i.public_dns_name, i.state.code)
Instance.new(i.instance_id, i.public_dns_name.present? || i.private_ip_address, i.state.code)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want presence here, since present? will return a boolean as far as I know 🤔

@lserman
Copy link
Owner

lserman commented Oct 27, 2022

Hello, wow, this is a blast from the past!

I don't know much about how AWS deployments are working these days. What is the use case for private IP and will this change affect existing users in any way? Perhaps there are users who have instances without public IPs that are currently being ignored by this gem. If they have private IPs though, wouldn't this change how the gem functions for them?

Maybe the inclusion of private IPs can be a configuration option, or maybe the list of instances can be completely overridable by a configuration lambda that receives the instance list and returns which ones should be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants