-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_security_group_rule: Prevent crash when reading rules fr…
…om groups containing an ALL/-1 protocol rule The rule searching logic was missing `nil` checks. This crash was only triggered under the context of other rules existing in the group having `FromPort` and `ToPort` in comparison to the local rule not having `FromPort` and `ToPort`. This also prevents an errant difference when `to_port` is specified as 65535 in an ALL/-1 protocol rule, which is allowed by the API and previously supported in Terraform without this difference. ``` --- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidTypeError (1.53s) --- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidCIDR (1.70s) --- PASS: TestAccAWSSecurityGroupRule_Ingress_VPC (22.23s) --- PASS: TestAccAWSSecurityGroupRule_EgressDescription (21.89s) --- PASS: TestAccAWSSecurityGroupRule_Egress (25.56s) --- PASS: TestAccAWSSecurityGroupRule_MultipleRuleSearching_AllProtocolCrash (26.06s) --- PASS: TestAccAWSSecurityGroupRule_Issue5310 (26.90s) --- PASS: TestAccAWSSecurityGroupRule_Ingress_Classic (27.31s) --- PASS: TestAccAWSSecurityGroupRule_Description_AllPorts (34.32s) --- PASS: TestAccAWSSecurityGroupRule_Description_AllPorts_ToPort65535 (36.12s) --- PASS: TestAccAWSSecurityGroupRule_IngressDescription_updates (35.41s) --- PASS: TestAccAWSSecurityGroupRule_EgressDescription_updates (37.68s) --- PASS: TestAccAWSSecurityGroupRule_IngressDescription (39.34s) --- PASS: TestAccAWSSecurityGroupRule_Ingress_Ipv6 (41.93s) --- PASS: TestAccAWSSecurityGroupRule_Ingress_Protocol (42.58s) --- PASS: TestAccAWSSecurityGroupRule_SelfReference (43.87s) --- PASS: TestAccAWSSecurityGroupRule_SelfSource (45.94s) --- PASS: TestAccAWSSecurityGroupRule_MultiIngress (25.31s) --- PASS: TestAccAWSSecurityGroupRule_PartialMatching_Source (48.62s) --- PASS: TestAccAWSSecurityGroupRule_PartialMatching_basic (51.84s) --- PASS: TestAccAWSSecurityGroupRule_PrefixListEgress (57.50s) --- PASS: TestAccAWSSecurityGroupRule_MultiDescription (88.64s) --- PASS: TestAccAWSSecurityGroupRule_Race (274.35s) ```
- Loading branch information
Showing
2 changed files
with
197 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters