Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

(CLOUD-269) Allow setting ingress rules for default security groups in VPC #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

garethr
Copy link
Contributor

@garethr garethr commented Mar 19, 2015

Due to default security groups all being named default we couldn't
reference them previously due to unique resouce naming conflicts. This
patch allows for a composite namevar only in the case of the default
group. Note that the composite name populates the VPC field
automatically, so you don't have to duplicate the information in a
separate property.

@garethr
Copy link
Contributor Author

garethr commented Mar 19, 2015

Note that this still requires some acceptance tests to verify the functionality before merging.

This relates to a conversation I had a few days ago with @keymone.

@garethr garethr changed the title Allow setting ingress rules for default security groups in VPC (WIP) Allow setting ingress rules for default security groups in VPC Mar 19, 2015
@mks-m
Copy link

mks-m commented Mar 23, 2015

@garethr i had to change title patterns to make it work:

def self.title_patterns
    [ [ /^(([\w\-]+)::(default))$/,
        [ [ :name, lambda {|x| x} ],
          [ :vpc, lambda {|x| x} ],
          [ :group_name, lambda {|x| x} ] ] ],
      [ /^((.*))$/,
        [ [ :name, lambda {|x| x} ],
          [ :group_name, lambda {|x| x} ] ] ] ]
  end

seems like it's not possible to specify custom group_name with this implementation? like:

ec2_securitygroup { "long unique name across regions":
  group_name => "shorter per-region unique name"
}

or am i missing some obvious way to do that?

@garethr
Copy link
Contributor Author

garethr commented Mar 23, 2015

@keymone Ah, that's probably better to be a bit more liberal for the second capture. Thanks, will change.

Correct on the second formulation not working with this PR. Reversing this becomes much more difficult so I stuck to just what you can't do at the moment - ie. default security groups in VPCs.

Due to default security groups all being named default we couldn't
reference them previously due to unique resouce naming conflicts. This
patch allows for a composite namevar only in the case of the default
group. Note that the composite name populates the VPC field
automatically, so you don't have to duplicate the information in a
separate property.
@garethr garethr force-pushed the support-vpc-default-security-groups branch from ff56d68 to 138a2ec Compare April 7, 2015 08:14
@garethr garethr changed the title (WIP) Allow setting ingress rules for default security groups in VPC (CLOUD-269) Allow setting ingress rules for default security groups in VPC Apr 7, 2015
@mks-m
Copy link

mks-m commented Jul 8, 2015

@garethr is there any progress with this? i can't access https://tickets.puppetlabs.com/browse/CLOUD-269 to check. we're using this patch for a while now and it's working just fine.

@garethr
Copy link
Contributor Author

garethr commented Jul 10, 2015

@keymone unfortunately no progress to report, mainly due to other prioritise I'm afraid. I'll update this issue whenever things do move.

@ceturc
Copy link

ceturc commented Jul 28, 2016

This looks like excellent work. I have multiple VPCs and this fix will really help me manage my security groups with Puppet. Right now, during an apply, puppet just picks the first one it finds with a matching name - kind of dangerous! I look forward to seeing this pulled into the published forge module.

@ccaum
Copy link
Contributor

ccaum commented Dec 14, 2017

Any update on this? Otherwise I'm going to close due to age.

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

Successfully merging this pull request may close these issues.

4 participants