-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Conversation
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 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run all TestAccAWSSecurityGroup
tests and repost results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks!
This (supposedly, see #12892 ) breaks our plan when using CIDR blocks from different sources:
If i remove either the ones from a variable or the ones from a resource, it works as expected. |
@jangrewe This is actually a core issue, and unrelated to this PR. The PR did, however, bring the core issue with list-type validation to the surface. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
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.
Fixes: #9481