Skip to content

Add function to get instance with specific tags#6

Merged
tonerdo merged 2 commits intomasterfrom
feature/get-instance-with-tags
Aug 31, 2018
Merged

Add function to get instance with specific tags#6
tonerdo merged 2 commits intomasterfrom
feature/get-instance-with-tags

Conversation

@tonerdo
Copy link
Copy Markdown
Contributor

@tonerdo tonerdo commented Aug 31, 2018

This PR is meant to address a need in https://github.com/gruntwork-io/package-elk/pull/43. Specifically this comment https://github.com/gruntwork-io/package-elk/pull/43#discussion_r213864939 about using tags to retrieve IPs instead of ASG names.

The PR includes the following:

  1. A function aws_get_instances_with_tag within aws.sh that simply returns the json result from the call to the aws-cli
  2. A function aws_wrapper_get_ips_with_tag within aws-wrapper.sh that calls the aws_get_instances_with_tag function and returns the public or private IPs of the instances
  3. Tests which have not yet been added because I'm still trying to figure out bats

Copy link
Copy Markdown
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

Code looks good, but please add a test in the tests folder!

@tonerdo tonerdo merged commit 8f7678f into master Aug 31, 2018
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.

2 participants