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

Fix EC2 semgrep prefer-aws-go-sdk-pointer-conversion-conditional errors #24468

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 29, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates: #12992.

Fixes:

Findings:

  internal/service/ec2/ec2_eip.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        305┆ d.Set("vpc", *address.Domain == ec2.DomainTypeVpc)
          ⋮┆----------------------------------------
        312┆ if *address.Domain == ec2.DomainTypeVpc && net.ParseIP(id) != nil {


  internal/service/ec2/ec2_spot_instance_request.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        352┆ if *ni.Attachment.DeviceIndex == 0 {


  internal/service/ec2/flex.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

         39┆ vpc := group.VpcId != nil && *group.VpcId != ""
          ⋮┆----------------------------------------
         55┆ if *perm.IpProtocol == "-1" && (*perm.FromPort != 0 || *perm.ToPort != 0) {
          ⋮┆----------------------------------------
         55┆ if *perm.IpProtocol == "-1" && (*perm.FromPort != 0 || *perm.ToPort != 0) {
          ⋮┆----------------------------------------
         55┆ if *perm.IpProtocol == "-1" && (*perm.FromPort != 0 || *perm.ToPort != 0) {
          ⋮┆----------------------------------------
        148┆ if g.UserId != nil && *g.UserId != "" && (ownerId == nil || *ownerId != *g.UserId) {
          ⋮┆----------------------------------------
        148┆ if g.UserId != nil && *g.UserId != "" && (ownerId == nil || *ownerId != *g.UserId) {
          ⋮┆----------------------------------------
        153┆ vpc := g.GroupName == nil || *g.GroupName == ""


  internal/service/ec2/vpc_security_group.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        650┆ if *g.GroupId == groupId {
          ⋮┆----------------------------------------
        733┆ if group.VpcId == nil || *group.VpcId == "" {
          ⋮┆----------------------------------------
        760┆ if group.VpcId == nil || *group.VpcId == "" {


  internal/service/ec2/vpc_security_group_rule.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        180┆ isVPC := sg.VpcId != nil && *sg.VpcId != ""
          ⋮┆----------------------------------------
        412┆ return *b[i].GroupId < *b[j].GroupId
          ⋮┆----------------------------------------
        415┆ return *b[i].GroupName < *b[j].GroupName
          ⋮┆----------------------------------------
        425┆ if p.ToPort != nil && r.ToPort != nil && *p.ToPort != *r.ToPort {
          ⋮┆----------------------------------------
        429┆ if p.FromPort != nil && r.FromPort != nil && *p.FromPort != *r.FromPort {
          ⋮┆----------------------------------------
        433┆ if p.IpProtocol != nil && r.IpProtocol != nil && *p.IpProtocol != *r.IpProtocol {
          ⋮┆----------------------------------------
        443┆ if *ip.CidrIp == *rip.CidrIp {
          ⋮┆----------------------------------------
        459┆ if *ipv6.CidrIpv6 == *ipv6ip.CidrIpv6 {
          ⋮┆----------------------------------------
        475┆ if *pl.PrefixListId == *rpl.PrefixListId {
          ⋮┆----------------------------------------
        492┆ if *ip.GroupId == *rip.GroupId {
          ⋮┆----------------------------------------
        499┆ if *ip.GroupName == *rip.GroupName {
          ⋮┆----------------------------------------
        518┆ if ip.FromPort != nil && *ip.FromPort > 0 {
          ⋮┆----------------------------------------
        521┆ if ip.ToPort != nil && *ip.ToPort > 0 {
          ⋮┆----------------------------------------
        603┆ if sg.VpcId != nil && *sg.VpcId != "" {
          ⋮┆----------------------------------------
        631┆ if sg.VpcId == nil || *sg.VpcId == "" {
% go test ./internal/service/ec2
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	13.866s
% make testacc TESTARGS='-run=TestAccEC2EIP_TagsEC2\|TestAccEC2SpotInstanceRequest_networkInterfaceAttributes\|TestAccEC2SecurityGroup' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccEC2EIP_TagsEC2\|TestAccEC2SpotInstanceRequest_networkInterfaceAttributes\|TestAccEC2SecurityGroup -timeout 180m
=== RUN   TestAccEC2EIP_TagsEC2VPC_withVPCTrue
=== PAUSE TestAccEC2EIP_TagsEC2VPC_withVPCTrue
=== RUN   TestAccEC2EIP_TagsEC2VPC_withoutVPCTrue
=== PAUSE TestAccEC2EIP_TagsEC2VPC_withoutVPCTrue
=== RUN   TestAccEC2EIP_TagsEC2Classic_withVPCTrue
=== PAUSE TestAccEC2EIP_TagsEC2Classic_withVPCTrue
=== RUN   TestAccEC2EIP_TagsEC2Classic_withoutVPCTrue
=== PAUSE TestAccEC2EIP_TagsEC2Classic_withoutVPCTrue
=== RUN   TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
=== PAUSE TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
=== RUN   TestAccEC2SecurityGroupDataSource_basic
=== PAUSE TestAccEC2SecurityGroupDataSource_basic
=== RUN   TestAccEC2SecurityGroupRule_Ingress_vpc
=== PAUSE TestAccEC2SecurityGroupRule_Ingress_vpc
=== RUN   TestAccEC2SecurityGroupRule_IngressSourceWithAccount_id
=== PAUSE TestAccEC2SecurityGroupRule_IngressSourceWithAccount_id
=== RUN   TestAccEC2SecurityGroupRule_Ingress_protocol
=== PAUSE TestAccEC2SecurityGroupRule_Ingress_protocol
=== RUN   TestAccEC2SecurityGroupRule_Ingress_icmpv6
=== PAUSE TestAccEC2SecurityGroupRule_Ingress_icmpv6
=== RUN   TestAccEC2SecurityGroupRule_Ingress_ipv6
=== PAUSE TestAccEC2SecurityGroupRule_Ingress_ipv6
=== RUN   TestAccEC2SecurityGroupRule_Ingress_classic
=== PAUSE TestAccEC2SecurityGroupRule_Ingress_classic
=== RUN   TestAccEC2SecurityGroupRule_multiIngress
=== PAUSE TestAccEC2SecurityGroupRule_multiIngress
=== RUN   TestAccEC2SecurityGroupRule_egress
=== PAUSE TestAccEC2SecurityGroupRule_egress
=== RUN   TestAccEC2SecurityGroupRule_selfReference
=== PAUSE TestAccEC2SecurityGroupRule_selfReference
=== RUN   TestAccEC2SecurityGroupRule_expectInvalidTypeError
=== PAUSE TestAccEC2SecurityGroupRule_expectInvalidTypeError
=== RUN   TestAccEC2SecurityGroupRule_expectInvalidCIDR
=== PAUSE TestAccEC2SecurityGroupRule_expectInvalidCIDR
=== RUN   TestAccEC2SecurityGroupRule_PartialMatching_basic
=== PAUSE TestAccEC2SecurityGroupRule_PartialMatching_basic
=== RUN   TestAccEC2SecurityGroupRule_PartialMatching_source
=== PAUSE TestAccEC2SecurityGroupRule_PartialMatching_source
=== RUN   TestAccEC2SecurityGroupRule_issue5310
=== PAUSE TestAccEC2SecurityGroupRule_issue5310
=== RUN   TestAccEC2SecurityGroupRule_race
=== PAUSE TestAccEC2SecurityGroupRule_race
=== RUN   TestAccEC2SecurityGroupRule_selfSource
=== PAUSE TestAccEC2SecurityGroupRule_selfSource
=== RUN   TestAccEC2SecurityGroupRule_prefixListEgress
=== PAUSE TestAccEC2SecurityGroupRule_prefixListEgress
=== RUN   TestAccEC2SecurityGroupRule_ingressDescription
=== PAUSE TestAccEC2SecurityGroupRule_ingressDescription
=== RUN   TestAccEC2SecurityGroupRule_egressDescription
=== PAUSE TestAccEC2SecurityGroupRule_egressDescription
=== RUN   TestAccEC2SecurityGroupRule_IngressDescription_updates
=== PAUSE TestAccEC2SecurityGroupRule_IngressDescription_updates
=== RUN   TestAccEC2SecurityGroupRule_EgressDescription_updates
=== PAUSE TestAccEC2SecurityGroupRule_EgressDescription_updates
=== RUN   TestAccEC2SecurityGroupRule_Description_allPorts
=== PAUSE TestAccEC2SecurityGroupRule_Description_allPorts
=== RUN   TestAccEC2SecurityGroupRule_DescriptionAllPorts_nonZeroPorts
=== PAUSE TestAccEC2SecurityGroupRule_DescriptionAllPorts_nonZeroPorts
=== RUN   TestAccEC2SecurityGroupRule_MultipleRuleSearching_allProtocolCrash
=== PAUSE TestAccEC2SecurityGroupRule_MultipleRuleSearching_allProtocolCrash
=== RUN   TestAccEC2SecurityGroupRule_multiDescription
=== PAUSE TestAccEC2SecurityGroupRule_multiDescription
=== RUN   TestAccEC2SecurityGroup_allowAll
=== PAUSE TestAccEC2SecurityGroup_allowAll
=== RUN   TestAccEC2SecurityGroup_sourceSecurityGroup
=== PAUSE TestAccEC2SecurityGroup_sourceSecurityGroup
=== RUN   TestAccEC2SecurityGroup_ipRangeAndSecurityGroupWithSameRules
=== PAUSE TestAccEC2SecurityGroup_ipRangeAndSecurityGroupWithSameRules
=== RUN   TestAccEC2SecurityGroup_ipRangesWithSameRules
=== PAUSE TestAccEC2SecurityGroup_ipRangesWithSameRules
=== RUN   TestAccEC2SecurityGroup_basic
=== PAUSE TestAccEC2SecurityGroup_basic
=== RUN   TestAccEC2SecurityGroup_disappears
=== PAUSE TestAccEC2SecurityGroup_disappears
=== RUN   TestAccEC2SecurityGroup_egressMode
=== PAUSE TestAccEC2SecurityGroup_egressMode
=== RUN   TestAccEC2SecurityGroup_ingressMode
=== PAUSE TestAccEC2SecurityGroup_ingressMode
=== RUN   TestAccEC2SecurityGroup_ruleGathering
=== PAUSE TestAccEC2SecurityGroup_ruleGathering
=== RUN   TestAccEC2SecurityGroup_forceRevokeRulesTrue
=== PAUSE TestAccEC2SecurityGroup_forceRevokeRulesTrue
=== RUN   TestAccEC2SecurityGroup_forceRevokeRulesFalse
=== PAUSE TestAccEC2SecurityGroup_forceRevokeRulesFalse
=== RUN   TestAccEC2SecurityGroup_ipv6
=== PAUSE TestAccEC2SecurityGroup_ipv6
=== RUN   TestAccEC2SecurityGroup_Name_generated
=== PAUSE TestAccEC2SecurityGroup_Name_generated
=== RUN   TestAccEC2SecurityGroup_Name_terraformPrefix
=== PAUSE TestAccEC2SecurityGroup_Name_terraformPrefix
=== RUN   TestAccEC2SecurityGroup_namePrefix
=== PAUSE TestAccEC2SecurityGroup_namePrefix
=== RUN   TestAccEC2SecurityGroup_NamePrefix_terraformPrefix
=== PAUSE TestAccEC2SecurityGroup_NamePrefix_terraformPrefix
=== RUN   TestAccEC2SecurityGroup_self
=== PAUSE TestAccEC2SecurityGroup_self
=== RUN   TestAccEC2SecurityGroup_vpc
=== PAUSE TestAccEC2SecurityGroup_vpc
=== RUN   TestAccEC2SecurityGroup_vpcNegOneIngress
=== PAUSE TestAccEC2SecurityGroup_vpcNegOneIngress
=== RUN   TestAccEC2SecurityGroup_vpcProtoNumIngress
=== PAUSE TestAccEC2SecurityGroup_vpcProtoNumIngress
=== RUN   TestAccEC2SecurityGroup_multiIngress
=== PAUSE TestAccEC2SecurityGroup_multiIngress
=== RUN   TestAccEC2SecurityGroup_change
=== PAUSE TestAccEC2SecurityGroup_change
=== RUN   TestAccEC2SecurityGroup_ruleDescription
=== PAUSE TestAccEC2SecurityGroup_ruleDescription
=== RUN   TestAccEC2SecurityGroup_defaultEgressVPC
=== PAUSE TestAccEC2SecurityGroup_defaultEgressVPC
=== RUN   TestAccEC2SecurityGroup_defaultEgressClassic
=== PAUSE TestAccEC2SecurityGroup_defaultEgressClassic
=== RUN   TestAccEC2SecurityGroup_drift
=== PAUSE TestAccEC2SecurityGroup_drift
=== RUN   TestAccEC2SecurityGroup_driftComplex
=== PAUSE TestAccEC2SecurityGroup_driftComplex
=== RUN   TestAccEC2SecurityGroup_invalidCIDRBlock
=== PAUSE TestAccEC2SecurityGroup_invalidCIDRBlock
=== RUN   TestAccEC2SecurityGroup_tags
=== PAUSE TestAccEC2SecurityGroup_tags
=== RUN   TestAccEC2SecurityGroup_cidrAndGroups
=== PAUSE TestAccEC2SecurityGroup_cidrAndGroups
=== RUN   TestAccEC2SecurityGroup_ingressWithCIDRAndSGsVPC
=== PAUSE TestAccEC2SecurityGroup_ingressWithCIDRAndSGsVPC
=== RUN   TestAccEC2SecurityGroup_ingressWithCIDRAndSGsClassic
=== PAUSE TestAccEC2SecurityGroup_ingressWithCIDRAndSGsClassic
=== RUN   TestAccEC2SecurityGroup_egressWithPrefixList
=== PAUSE TestAccEC2SecurityGroup_egressWithPrefixList
=== RUN   TestAccEC2SecurityGroup_ingressWithPrefixList
=== PAUSE TestAccEC2SecurityGroup_ingressWithPrefixList
=== RUN   TestAccEC2SecurityGroup_ipv4AndIPv6Egress
=== PAUSE TestAccEC2SecurityGroup_ipv4AndIPv6Egress
=== RUN   TestAccEC2SecurityGroup_failWithDiffMismatch
=== PAUSE TestAccEC2SecurityGroup_failWithDiffMismatch
=== RUN   TestAccEC2SecurityGroup_ruleLimitExceededAppend
=== PAUSE TestAccEC2SecurityGroup_ruleLimitExceededAppend
=== RUN   TestAccEC2SecurityGroup_ruleLimitCIDRBlockExceededAppend
=== PAUSE TestAccEC2SecurityGroup_ruleLimitCIDRBlockExceededAppend
=== RUN   TestAccEC2SecurityGroup_ruleLimitExceededPrepend
=== PAUSE TestAccEC2SecurityGroup_ruleLimitExceededPrepend
=== RUN   TestAccEC2SecurityGroup_ruleLimitExceededAllNew
=== PAUSE TestAccEC2SecurityGroup_ruleLimitExceededAllNew
=== RUN   TestAccEC2SecurityGroup_rulesDropOnError
=== PAUSE TestAccEC2SecurityGroup_rulesDropOnError
=== RUN   TestAccEC2SecurityGroupsDataSource_tag
=== PAUSE TestAccEC2SecurityGroupsDataSource_tag
=== RUN   TestAccEC2SecurityGroupsDataSource_filter
=== PAUSE TestAccEC2SecurityGroupsDataSource_filter
=== RUN   TestAccEC2SecurityGroupsDataSource_empty
=== PAUSE TestAccEC2SecurityGroupsDataSource_empty
=== CONT  TestAccEC2EIP_TagsEC2VPC_withVPCTrue
=== CONT  TestAccEC2SecurityGroup_ingressMode
=== CONT  TestAccEC2SecurityGroupRule_issue5310
--- PASS: TestAccEC2SecurityGroupRule_issue5310 (20.84s)
=== CONT  TestAccEC2SecurityGroup_egressMode
--- PASS: TestAccEC2EIP_TagsEC2VPC_withVPCTrue (29.04s)
=== CONT  TestAccEC2SecurityGroup_disappears
--- PASS: TestAccEC2SecurityGroup_disappears (17.22s)
=== CONT  TestAccEC2SecurityGroup_basic
--- PASS: TestAccEC2SecurityGroup_ingressMode (48.74s)
=== CONT  TestAccEC2SecurityGroup_ipRangesWithSameRules
--- PASS: TestAccEC2SecurityGroup_egressMode (44.02s)
=== CONT  TestAccEC2SecurityGroup_ipRangeAndSecurityGroupWithSameRules
--- PASS: TestAccEC2SecurityGroup_basic (20.23s)
=== CONT  TestAccEC2SecurityGroup_sourceSecurityGroup
--- PASS: TestAccEC2SecurityGroup_ipRangesWithSameRules (23.33s)
=== CONT  TestAccEC2SecurityGroup_allowAll
--- PASS: TestAccEC2SecurityGroup_ipRangeAndSecurityGroupWithSameRules (25.47s)
=== CONT  TestAccEC2SecurityGroupRule_multiDescription
--- PASS: TestAccEC2SecurityGroup_sourceSecurityGroup (24.46s)
=== CONT  TestAccEC2SecurityGroupRule_egressDescription
--- PASS: TestAccEC2SecurityGroup_allowAll (23.19s)
=== CONT  TestAccEC2SecurityGroupRule_ingressDescription
--- PASS: TestAccEC2SecurityGroupRule_egressDescription (17.63s)
=== CONT  TestAccEC2SecurityGroupRule_prefixListEgress
--- PASS: TestAccEC2SecurityGroupRule_ingressDescription (17.94s)
=== CONT  TestAccEC2SecurityGroupRule_selfSource
--- PASS: TestAccEC2SecurityGroupRule_selfSource (23.31s)
=== CONT  TestAccEC2SecurityGroupRule_race
--- PASS: TestAccEC2SecurityGroupRule_prefixListEgress (33.91s)
=== CONT  TestAccEC2SecurityGroup_driftComplex
--- PASS: TestAccEC2SecurityGroupRule_multiDescription (63.54s)
=== CONT  TestAccEC2SecurityGroupsDataSource_empty
--- PASS: TestAccEC2SecurityGroupsDataSource_empty (9.89s)
=== CONT  TestAccEC2SecurityGroupsDataSource_filter
--- PASS: TestAccEC2SecurityGroup_driftComplex (25.39s)
=== CONT  TestAccEC2SecurityGroupsDataSource_tag
--- PASS: TestAccEC2SecurityGroupsDataSource_filter (18.27s)
=== CONT  TestAccEC2SecurityGroup_rulesDropOnError
--- PASS: TestAccEC2SecurityGroupsDataSource_tag (19.10s)
=== CONT  TestAccEC2SecurityGroupRule_IngressDescription_updates
--- PASS: TestAccEC2SecurityGroup_rulesDropOnError (47.41s)
=== CONT  TestAccEC2SecurityGroupRule_MultipleRuleSearching_allProtocolCrash
--- PASS: TestAccEC2SecurityGroupRule_IngressDescription_updates (30.05s)
=== CONT  TestAccEC2SecurityGroupRule_DescriptionAllPorts_nonZeroPorts
--- PASS: TestAccEC2SecurityGroupRule_MultipleRuleSearching_allProtocolCrash (16.84s)
=== CONT  TestAccEC2SecurityGroupRule_Description_allPorts
--- PASS: TestAccEC2SecurityGroupRule_DescriptionAllPorts_nonZeroPorts (28.69s)
=== CONT  TestAccEC2SecurityGroupRule_EgressDescription_updates
--- PASS: TestAccEC2SecurityGroupRule_Description_allPorts (30.39s)
=== CONT  TestAccEC2SecurityGroup_ingressWithPrefixList
--- PASS: TestAccEC2SecurityGroupRule_EgressDescription_updates (29.83s)
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededPrepend
--- PASS: TestAccEC2SecurityGroupRule_race (155.28s)
=== CONT  TestAccEC2SecurityGroup_ruleLimitCIDRBlockExceededAppend
--- PASS: TestAccEC2SecurityGroup_ingressWithPrefixList (35.24s)
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededAppend
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededPrepend
    vpc_security_group_test.go:2595: Step 2/3, expected an error but got none
--- FAIL: TestAccEC2SecurityGroup_ruleLimitExceededPrepend (39.19s)
=== CONT  TestAccEC2SecurityGroup_failWithDiffMismatch
=== CONT  TestAccEC2SecurityGroup_ruleLimitCIDRBlockExceededAppend
    vpc_security_group_test.go:2534: Step 2/3, expected an error but got none
--- FAIL: TestAccEC2SecurityGroup_ruleLimitCIDRBlockExceededAppend (33.40s)
=== CONT  TestAccEC2SecurityGroup_ipv4AndIPv6Egress
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededAppend
    vpc_security_group_test.go:2487: Step 2/3, expected an error but got none
--- FAIL: TestAccEC2SecurityGroup_ruleLimitExceededAppend (36.64s)
=== CONT  TestAccEC2SecurityGroup_vpc
--- PASS: TestAccEC2SecurityGroup_failWithDiffMismatch (22.84s)
=== CONT  TestAccEC2SecurityGroup_drift
--- PASS: TestAccEC2SecurityGroup_vpc (19.84s)
=== CONT  TestAccEC2SecurityGroup_defaultEgressClassic
--- PASS: TestAccEC2SecurityGroup_drift (16.62s)
=== CONT  TestAccEC2SecurityGroup_defaultEgressVPC
--- PASS: TestAccEC2SecurityGroup_ipv4AndIPv6Egress (30.53s)
=== CONT  TestAccEC2SecurityGroup_ruleDescription
--- PASS: TestAccEC2SecurityGroup_defaultEgressClassic (10.72s)
=== CONT  TestAccEC2SecurityGroup_change
--- PASS: TestAccEC2SecurityGroup_defaultEgressVPC (22.18s)
=== CONT  TestAccEC2SecurityGroup_multiIngress
--- PASS: TestAccEC2SecurityGroup_change (38.00s)
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededAllNew
--- PASS: TestAccEC2SecurityGroup_multiIngress (24.80s)
=== CONT  TestAccEC2SecurityGroup_vpcProtoNumIngress
--- PASS: TestAccEC2SecurityGroup_ruleDescription (54.43s)
=== CONT  TestAccEC2SecurityGroup_cidrAndGroups
--- PASS: TestAccEC2SecurityGroup_vpcProtoNumIngress (21.44s)
=== CONT  TestAccEC2SecurityGroup_tags
--- PASS: TestAccEC2SecurityGroup_cidrAndGroups (26.28s)
=== CONT  TestAccEC2SecurityGroup_invalidCIDRBlock
=== CONT  TestAccEC2SecurityGroup_ruleLimitExceededAllNew
    vpc_security_group_test.go:2640: Step 2/3, expected an error but got none
--- PASS: TestAccEC2SecurityGroup_invalidCIDRBlock (2.50s)
=== CONT  TestAccEC2SecurityGroup_egressWithPrefixList
--- FAIL: TestAccEC2SecurityGroup_ruleLimitExceededAllNew (40.90s)
=== CONT  TestAccEC2SecurityGroupRule_Ingress_ipv6
--- PASS: TestAccEC2SecurityGroupRule_Ingress_ipv6 (21.03s)
=== CONT  TestAccEC2SecurityGroupRule_PartialMatching_source
--- PASS: TestAccEC2SecurityGroup_tags (48.50s)
=== CONT  TestAccEC2SecurityGroupRule_PartialMatching_basic
--- PASS: TestAccEC2SecurityGroup_egressWithPrefixList (35.77s)
=== CONT  TestAccEC2SecurityGroup_vpcNegOneIngress
--- PASS: TestAccEC2SecurityGroup_vpcNegOneIngress (23.34s)
=== CONT  TestAccEC2SecurityGroupRule_expectInvalidCIDR
--- PASS: TestAccEC2SecurityGroupRule_PartialMatching_source (25.19s)
=== CONT  TestAccEC2SecurityGroupRule_expectInvalidTypeError
--- PASS: TestAccEC2SecurityGroupRule_expectInvalidCIDR (1.41s)
=== CONT  TestAccEC2SecurityGroupRule_egress
--- PASS: TestAccEC2SecurityGroupRule_expectInvalidTypeError (1.00s)
=== CONT  TestAccEC2SecurityGroupRule_selfReference
--- PASS: TestAccEC2SecurityGroupRule_PartialMatching_basic (29.80s)
=== CONT  TestAccEC2SecurityGroupDataSource_basic
--- PASS: TestAccEC2SecurityGroupRule_egress (19.48s)
=== CONT  TestAccEC2SecurityGroupRule_multiIngress
--- PASS: TestAccEC2SecurityGroupRule_selfReference (22.99s)
=== CONT  TestAccEC2SecurityGroupRule_Ingress_icmpv6
--- PASS: TestAccEC2SecurityGroupDataSource_basic (20.14s)
=== CONT  TestAccEC2SecurityGroupRule_Ingress_classic
--- PASS: TestAccEC2SecurityGroupRule_multiIngress (19.76s)
=== CONT  TestAccEC2EIP_TagsEC2Classic_withoutVPCTrue
--- PASS: TestAccEC2EIP_TagsEC2Classic_withoutVPCTrue (3.49s)
=== CONT  TestAccEC2SpotInstanceRequest_networkInterfaceAttributes
--- PASS: TestAccEC2SecurityGroupRule_Ingress_icmpv6 (21.76s)
=== CONT  TestAccEC2EIP_TagsEC2Classic_withVPCTrue
--- PASS: TestAccEC2SecurityGroupRule_Ingress_classic (17.92s)
=== CONT  TestAccEC2SecurityGroup_ingressWithCIDRAndSGsClassic
--- PASS: TestAccEC2SecurityGroup_ingressWithCIDRAndSGsClassic (12.18s)
=== CONT  TestAccEC2EIP_TagsEC2VPC_withoutVPCTrue
--- PASS: TestAccEC2EIP_TagsEC2Classic_withVPCTrue (17.67s)
=== CONT  TestAccEC2SecurityGroupRule_Ingress_protocol
--- PASS: TestAccEC2SecurityGroupRule_Ingress_protocol (22.55s)
=== CONT  TestAccEC2SecurityGroupRule_Ingress_vpc
--- PASS: TestAccEC2EIP_TagsEC2VPC_withoutVPCTrue (27.67s)
=== CONT  TestAccEC2SecurityGroup_Name_generated
--- PASS: TestAccEC2SecurityGroupRule_Ingress_vpc (18.24s)
=== CONT  TestAccEC2SecurityGroup_self
--- PASS: TestAccEC2SecurityGroup_Name_generated (20.82s)
=== CONT  TestAccEC2SecurityGroup_NamePrefix_terraformPrefix
--- PASS: TestAccEC2SecurityGroup_self (21.32s)
=== CONT  TestAccEC2SecurityGroup_namePrefix
--- PASS: TestAccEC2SecurityGroup_NamePrefix_terraformPrefix (22.45s)
=== CONT  TestAccEC2SecurityGroup_Name_terraformPrefix
--- PASS: TestAccEC2SecurityGroup_namePrefix (22.27s)
=== CONT  TestAccEC2SecurityGroup_ingressWithCIDRAndSGsVPC
--- PASS: TestAccEC2SecurityGroup_Name_terraformPrefix (19.89s)
=== CONT  TestAccEC2SecurityGroup_forceRevokeRulesTrue
--- PASS: TestAccEC2SecurityGroup_ingressWithCIDRAndSGsVPC (24.72s)
=== CONT  TestAccEC2SecurityGroup_forceRevokeRulesFalse
--- PASS: TestAccEC2SpotInstanceRequest_networkInterfaceAttributes (137.50s)
=== CONT  TestAccEC2SecurityGroup_ruleGathering
--- PASS: TestAccEC2SecurityGroup_ruleGathering (36.29s)
=== CONT  TestAccEC2SecurityGroup_ipv6
--- PASS: TestAccEC2SecurityGroup_ipv6 (20.77s)
=== CONT  TestAccEC2SecurityGroupRule_IngressSourceWithAccount_id
--- PASS: TestAccEC2SecurityGroupRule_IngressSourceWithAccount_id (20.48s)
--- PASS: TestAccEC2SecurityGroup_forceRevokeRulesFalse (958.43s)
--- PASS: TestAccEC2SecurityGroup_forceRevokeRulesTrue (988.98s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	1635.288s
FAIL
make: *** [testacc] Error 1

The failures occur in nightly CI.

@github-actions github-actions bot added linter Pertains to changes to or issues with the various linters. service/ec2 Issues and PRs that pertain to the ec2 service. service/vpc Issues and PRs that pertain to the vpc service. size/S Managed by automation to categorize the size of a PR. labels Apr 29, 2022
@ewbankkit ewbankkit added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Apr 29, 2022
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label May 2, 2022
Copy link
Member

@bschaatsbergen bschaatsbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the 2 comments (that are just out of curiousity), LGTM

Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ewbankkit ewbankkit merged commit 770ffc4 into main May 3, 2022
@ewbankkit ewbankkit deleted the td-semgrep-prefer-aws-go-sdk-pointer-conversion-conditional-ec2 branch May 3, 2022 21:06
@github-actions github-actions bot added this to the v4.13.0 milestone May 3, 2022
github-actions bot pushed a commit that referenced this pull request May 3, 2022
@github-actions
Copy link

github-actions bot commented May 5, 2022

This functionality has been released in v4.13.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter Pertains to changes to or issues with the various linters. service/ec2 Issues and PRs that pertain to the ec2 service. service/vpc Issues and PRs that pertain to the vpc service. size/S Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants