Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

creates security groups if they don't already exist #12

Merged
merged 6 commits into from
Aug 26, 2014

Conversation

elliothursh
Copy link
Contributor

This creates security groups on ec2 if they don't already exist.

@elliothursh
Copy link
Contributor Author

@NickLaMuro will you code review this before I try to run it?

end

def self.missing_security_groups
missing_security_groups = config_security_groups - security_groups.map{|sg| sg[:name]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The second part of this can be shorted to security_groups.map(&:name):

missing_security_groups = config_security_groups - security_groups.map(&:name)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this didn't work when running tests, but that could be because I screwed what :security_groups returns in my tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

I misread that. It isn't a method each of the elements, but a key in a hash, so you are right and it wouldn't work. Carry on.

elliothursh pushed a commit that referenced this pull request Aug 26, 2014
creates security groups if they don't already exist
@elliothursh elliothursh merged commit 6c735bb into master Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants