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

provider/aws: Add plan-level validation for SG CIDR blocks #12765

Merged
merged 1 commit into from
Mar 16, 2017

Commits on Mar 16, 2017

  1. provider/aws: Add plan-level validation for SG CIDR blocks

    Adds plan-level validation for both IPv4 and IPv6 CIDR Blocks in an AWS SecurityGroup resource, as well as the AWS Security Group Rule resource.
    
    ```
    $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSecurityGroup_invalidCIDRBlock'
    ==> Checking that code complies with gofmt requirements...
    go generate $(go list ./... | grep -v /terraform/vendor/)
    2017/03/16 11:32:54 Generated command/internal_plugin_list.go
    TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSecurityGroup_invalidCIDRBlock -timeout 120m
    === RUN   TestAccAWSSecurityGroup_invalidCIDRBlock
    --- PASS: TestAccAWSSecurityGroup_invalidCIDRBlock (0.01s)
    PASS
    ok      github.com/hashicorp/terraform/builtin/providers/aws    0.017s
    ```
    
    ```
    $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSecurityGroupRule_ExpectInvalidCIDR'
    ==> Checking that code complies with gofmt requirements...
    go generate $(go list ./... | grep -v /terraform/vendor/)
    2017/03/16 11:46:21 Generated command/internal_plugin_list.go
    TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSecurityGroupRule_ExpectInvalidCIDR -timeout 120m
    === RUN   TestAccAWSSecurityGroupRule_ExpectInvalidCIDR
    --- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidCIDR (0.01s)
    PASS
    ok      github.com/hashicorp/terraform/builtin/providers/aws    0.016s
    ```
    grubernaut committed Mar 16, 2017
    Configuration menu
    Copy the full SHA
    9252650 View commit details
    Browse the repository at this point in the history