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

Raise exception if ip_ranges or groups have duplicate values. #16

Merged
merged 1 commit into from Jul 26, 2015

Conversation

Projects
None yet
2 participants
@satoruh
Copy link
Contributor

satoruh commented Jul 25, 2015

Adding validation codes for permission.

Problem

At first, apply the following DSL.

ec2 "vpc-XXXXXXXX" do
  security_group "default" do
    description "default VPC security group"

    ingress do
      permission :tcp, 443..443 do
        ip_ranges("192.0.2.1/32")   

        groups("default")
      end 
    end 

    egress do
      permission :any do
        ip_ranges("0.0.0.0/0")   
      end 
    end 
  end 
end

And apply the following DSL.

ec2 "vpc-XXXXXXXX" do
  security_group "default" do
    description "default VPC security group"

    ingress do
      permission :tcp, 443..443 do
        ip_ranges("192.0.2.1/32", "192.0.2.1/32")   

        groups("default", "default")   
      end 
    end 

    egress do
      permission :any do
        ip_ranges("0.0.0.0/0")   
      end 
    end 
  end 
end

Then piculet shows following messages, but do nothing.

Apply `Groupfile` to SecurityGroup
Update Permission: vpc-XXXXXXXX > default(ingress) > tcp 443..443
No change
@winebarrel

This comment has been minimized.

Copy link
Collaborator

winebarrel commented Jul 25, 2015

Thanks for your PR 👍

winebarrel pushed a commit that referenced this pull request Jul 26, 2015

Genki Sugawara
Merge pull request #16 from satoruh/master
Raise exception if ip_ranges or groups have duplicate values.

@winebarrel winebarrel merged commit 686f554 into codenize-tools:master Jul 26, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@winebarrel

This comment has been minimized.

Copy link
Collaborator

winebarrel commented Jul 26, 2015

v0.2.9.beta has been released.
Please try it out. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment