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

Prevent creation of duplicate aws_network_acl_rule resources #36326

Merged
merged 16 commits into from
Mar 12, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Mar 12, 2024

Description

Checks for existence of network ACL rule or route with identical attributes during resource Create and returns error if found.

Relations

Closes #36324.
Relates #35747.
Closes #34462.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccVPCNetworkACLRule_' 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=TestAccVPCNetworkACLRule_ -timeout 360m
=== RUN   TestAccVPCNetworkACLRule_basic
=== PAUSE TestAccVPCNetworkACLRule_basic
=== RUN   TestAccVPCNetworkACLRule_disappears
=== PAUSE TestAccVPCNetworkACLRule_disappears
=== RUN   TestAccVPCNetworkACLRule_Disappears_networkACL
=== PAUSE TestAccVPCNetworkACLRule_Disappears_networkACL
=== RUN   TestAccVPCNetworkACLRule_Disappears_ingressEgressSameNumber
=== PAUSE TestAccVPCNetworkACLRule_Disappears_ingressEgressSameNumber
=== RUN   TestAccVPCNetworkACLRule_ipv6
=== PAUSE TestAccVPCNetworkACLRule_ipv6
=== RUN   TestAccVPCNetworkACLRule_ipv6ICMP
=== PAUSE TestAccVPCNetworkACLRule_ipv6ICMP
=== RUN   TestAccVPCNetworkACLRule_ipv6VPCAssignGeneratedIPv6CIDRBlockUpdate
=== PAUSE TestAccVPCNetworkACLRule_ipv6VPCAssignGeneratedIPv6CIDRBlockUpdate
=== RUN   TestAccVPCNetworkACLRule_allProtocol
=== PAUSE TestAccVPCNetworkACLRule_allProtocol
=== RUN   TestAccVPCNetworkACLRule_tcpProtocol
=== PAUSE TestAccVPCNetworkACLRule_tcpProtocol
=== RUN   TestAccVPCNetworkACLRule_duplicate
=== PAUSE TestAccVPCNetworkACLRule_duplicate
=== CONT  TestAccVPCNetworkACLRule_basic
=== CONT  TestAccVPCNetworkACLRule_ipv6ICMP
=== CONT  TestAccVPCNetworkACLRule_tcpProtocol
--- PASS: TestAccVPCNetworkACLRule_ipv6ICMP (30.12s)
=== CONT  TestAccVPCNetworkACLRule_allProtocol
--- PASS: TestAccVPCNetworkACLRule_tcpProtocol (34.08s)
=== CONT  TestAccVPCNetworkACLRule_Disappears_ingressEgressSameNumber
--- PASS: TestAccVPCNetworkACLRule_basic (40.56s)
=== CONT  TestAccVPCNetworkACLRule_ipv6
--- PASS: TestAccVPCNetworkACLRule_Disappears_ingressEgressSameNumber (24.15s)
=== CONT  TestAccVPCNetworkACLRule_ipv6VPCAssignGeneratedIPv6CIDRBlockUpdate
--- PASS: TestAccVPCNetworkACLRule_allProtocol (32.69s)
=== CONT  TestAccVPCNetworkACLRule_Disappears_networkACL
--- PASS: TestAccVPCNetworkACLRule_ipv6 (26.71s)
=== CONT  TestAccVPCNetworkACLRule_disappears
--- PASS: TestAccVPCNetworkACLRule_Disappears_networkACL (24.67s)
=== CONT  TestAccVPCNetworkACLRule_duplicate
--- PASS: TestAccVPCNetworkACLRule_disappears (24.51s)
--- PASS: TestAccVPCNetworkACLRule_duplicate (12.87s)
--- PASS: TestAccVPCNetworkACLRule_ipv6VPCAssignGeneratedIPv6CIDRBlockUpdate (55.36s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	121.326s
% make testacc TESTARGS='-run=TestAccVPCRoute_\|TestAccVPCRouteTable_\|TestAccVPCDefaultRouteTable_' 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=TestAccVPCRoute_\|TestAccVPCRouteTable_\|TestAccVPCDefaultRouteTable_ -timeout 360m
=== RUN   TestAccVPCDefaultRouteTable_basic
=== PAUSE TestAccVPCDefaultRouteTable_basic
=== RUN   TestAccVPCDefaultRouteTable_Disappears_vpc
=== PAUSE TestAccVPCDefaultRouteTable_Disappears_vpc
=== RUN   TestAccVPCDefaultRouteTable_Route_mode
=== PAUSE TestAccVPCDefaultRouteTable_Route_mode
=== RUN   TestAccVPCDefaultRouteTable_swap
=== PAUSE TestAccVPCDefaultRouteTable_swap
=== RUN   TestAccVPCDefaultRouteTable_ipv4ToTransitGateway
=== PAUSE TestAccVPCDefaultRouteTable_ipv4ToTransitGateway
=== RUN   TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint
=== PAUSE TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint
=== RUN   TestAccVPCDefaultRouteTable_vpcEndpointAssociation
=== PAUSE TestAccVPCDefaultRouteTable_vpcEndpointAssociation
=== RUN   TestAccVPCDefaultRouteTable_tags
=== PAUSE TestAccVPCDefaultRouteTable_tags
=== RUN   TestAccVPCDefaultRouteTable_conditionalCIDRBlock
=== PAUSE TestAccVPCDefaultRouteTable_conditionalCIDRBlock
=== RUN   TestAccVPCDefaultRouteTable_prefixListToInternetGateway
=== PAUSE TestAccVPCDefaultRouteTable_prefixListToInternetGateway
=== RUN   TestAccVPCDefaultRouteTable_revokeExistingRules
=== PAUSE TestAccVPCDefaultRouteTable_revokeExistingRules
=== RUN   TestAccVPCRouteTable_basic
=== PAUSE TestAccVPCRouteTable_basic
=== RUN   TestAccVPCRouteTable_disappears
=== PAUSE TestAccVPCRouteTable_disappears
=== RUN   TestAccVPCRouteTable_Disappears_subnetAssociation
=== PAUSE TestAccVPCRouteTable_Disappears_subnetAssociation
=== RUN   TestAccVPCRouteTable_ipv4ToInternetGateway
=== PAUSE TestAccVPCRouteTable_ipv4ToInternetGateway
=== RUN   TestAccVPCRouteTable_ipv4ToInstance
=== PAUSE TestAccVPCRouteTable_ipv4ToInstance
=== RUN   TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway
=== PAUSE TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway
=== RUN   TestAccVPCRouteTable_tags
=== PAUSE TestAccVPCRouteTable_tags
=== RUN   TestAccVPCRouteTable_requireRouteDestination
=== PAUSE TestAccVPCRouteTable_requireRouteDestination
=== RUN   TestAccVPCRouteTable_requireRouteTarget
=== PAUSE TestAccVPCRouteTable_requireRouteTarget
=== RUN   TestAccVPCRouteTable_Route_mode
=== PAUSE TestAccVPCRouteTable_Route_mode
=== RUN   TestAccVPCRouteTable_ipv4ToTransitGateway
=== PAUSE TestAccVPCRouteTable_ipv4ToTransitGateway
=== RUN   TestAccVPCRouteTable_ipv4ToVPCEndpoint
=== PAUSE TestAccVPCRouteTable_ipv4ToVPCEndpoint
=== RUN   TestAccVPCRouteTable_ipv4ToCarrierGateway
=== PAUSE TestAccVPCRouteTable_ipv4ToCarrierGateway
=== RUN   TestAccVPCRouteTable_ipv4ToLocalGateway
=== PAUSE TestAccVPCRouteTable_ipv4ToLocalGateway
=== RUN   TestAccVPCRouteTable_ipv4ToVPCPeeringConnection
=== PAUSE TestAccVPCRouteTable_ipv4ToVPCPeeringConnection
=== RUN   TestAccVPCRouteTable_vgwRoutePropagation
=== PAUSE TestAccVPCRouteTable_vgwRoutePropagation
=== RUN   TestAccVPCRouteTable_conditionalCIDRBlock
=== PAUSE TestAccVPCRouteTable_conditionalCIDRBlock
=== RUN   TestAccVPCRouteTable_ipv4ToNatGateway
=== PAUSE TestAccVPCRouteTable_ipv4ToNatGateway
=== RUN   TestAccVPCRouteTable_IPv6ToNetworkInterface_unattached
=== PAUSE TestAccVPCRouteTable_IPv6ToNetworkInterface_unattached
=== RUN   TestAccVPCRouteTable_IPv4ToNetworkInterfaces_unattached
=== PAUSE TestAccVPCRouteTable_IPv4ToNetworkInterfaces_unattached
=== RUN   TestAccVPCRouteTable_vpcMultipleCIDRs
=== PAUSE TestAccVPCRouteTable_vpcMultipleCIDRs
=== RUN   TestAccVPCRouteTable_gatewayVPCEndpoint
=== PAUSE TestAccVPCRouteTable_gatewayVPCEndpoint
=== RUN   TestAccVPCRouteTable_multipleRoutes
=== PAUSE TestAccVPCRouteTable_multipleRoutes
=== RUN   TestAccVPCRouteTable_prefixListToInternetGateway
=== PAUSE TestAccVPCRouteTable_prefixListToInternetGateway
=== RUN   TestAccVPCRouteTable_localRoute
=== PAUSE TestAccVPCRouteTable_localRoute
=== RUN   TestAccVPCRouteTable_localRouteAdoptUpdate
=== PAUSE TestAccVPCRouteTable_localRouteAdoptUpdate
=== RUN   TestAccVPCRouteTable_localRouteImportUpdate
=== PAUSE TestAccVPCRouteTable_localRouteImportUpdate
=== RUN   TestAccVPCRoute_basic
=== PAUSE TestAccVPCRoute_basic
=== RUN   TestAccVPCRoute_disappears
=== PAUSE TestAccVPCRoute_disappears
=== RUN   TestAccVPCRoute_Disappears_routeTable
=== PAUSE TestAccVPCRoute_Disappears_routeTable
=== RUN   TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway
=== PAUSE TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway
=== RUN   TestAccVPCRoute_ipv6ToInternetGateway
=== PAUSE TestAccVPCRoute_ipv6ToInternetGateway
=== RUN   TestAccVPCRoute_ipv6ToInstance
=== PAUSE TestAccVPCRoute_ipv6ToInstance
=== RUN   TestAccVPCRoute_IPv6ToNetworkInterface_unattached
=== PAUSE TestAccVPCRoute_IPv6ToNetworkInterface_unattached
=== RUN   TestAccVPCRoute_ipv6ToVPCPeeringConnection
=== PAUSE TestAccVPCRoute_ipv6ToVPCPeeringConnection
=== RUN   TestAccVPCRoute_ipv6ToVPNGateway
=== PAUSE TestAccVPCRoute_ipv6ToVPNGateway
=== RUN   TestAccVPCRoute_ipv4ToVPNGateway
=== PAUSE TestAccVPCRoute_ipv4ToVPNGateway
=== RUN   TestAccVPCRoute_ipv4ToInstance
=== PAUSE TestAccVPCRoute_ipv4ToInstance
=== RUN   TestAccVPCRoute_IPv4ToNetworkInterface_unattached
=== PAUSE TestAccVPCRoute_IPv4ToNetworkInterface_unattached
=== RUN   TestAccVPCRoute_IPv4ToNetworkInterface_attached
=== PAUSE TestAccVPCRoute_IPv4ToNetworkInterface_attached
=== RUN   TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments
=== PAUSE TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments
=== RUN   TestAccVPCRoute_ipv4ToVPCPeeringConnection
=== PAUSE TestAccVPCRoute_ipv4ToVPCPeeringConnection
=== RUN   TestAccVPCRoute_ipv4ToNatGateway
=== PAUSE TestAccVPCRoute_ipv4ToNatGateway
=== RUN   TestAccVPCRoute_ipv6ToNatGateway
=== PAUSE TestAccVPCRoute_ipv6ToNatGateway
=== RUN   TestAccVPCRoute_doesNotCrashWithVPCEndpoint
=== PAUSE TestAccVPCRoute_doesNotCrashWithVPCEndpoint
=== RUN   TestAccVPCRoute_ipv4ToTransitGateway
=== PAUSE TestAccVPCRoute_ipv4ToTransitGateway
=== RUN   TestAccVPCRoute_ipv6ToTransitGateway
=== PAUSE TestAccVPCRoute_ipv6ToTransitGateway
=== RUN   TestAccVPCRoute_ipv4ToCarrierGateway
=== PAUSE TestAccVPCRoute_ipv4ToCarrierGateway
=== RUN   TestAccVPCRoute_ipv4ToLocalGateway
=== PAUSE TestAccVPCRoute_ipv4ToLocalGateway
=== RUN   TestAccVPCRoute_ipv6ToLocalGateway
=== PAUSE TestAccVPCRoute_ipv6ToLocalGateway
=== RUN   TestAccVPCRoute_conditionalCIDRBlock
=== PAUSE TestAccVPCRoute_conditionalCIDRBlock
=== RUN   TestAccVPCRoute_IPv4Update_target
=== PAUSE TestAccVPCRoute_IPv4Update_target
=== RUN   TestAccVPCRoute_IPv6Update_target
=== PAUSE TestAccVPCRoute_IPv6Update_target
=== RUN   TestAccVPCRoute_ipv4ToVPCEndpoint
=== PAUSE TestAccVPCRoute_ipv4ToVPCEndpoint
=== RUN   TestAccVPCRoute_ipv6ToVPCEndpoint
=== PAUSE TestAccVPCRoute_ipv6ToVPCEndpoint
=== RUN   TestAccVPCRoute_localRoute
=== PAUSE TestAccVPCRoute_localRoute
=== RUN   TestAccVPCRoute_localRouteUpdate
=== PAUSE TestAccVPCRoute_localRouteUpdate
=== RUN   TestAccVPCRoute_prefixListToInternetGateway
=== PAUSE TestAccVPCRoute_prefixListToInternetGateway
=== RUN   TestAccVPCRoute_prefixListToVPNGateway
=== PAUSE TestAccVPCRoute_prefixListToVPNGateway
=== RUN   TestAccVPCRoute_prefixListToInstance
=== PAUSE TestAccVPCRoute_prefixListToInstance
=== RUN   TestAccVPCRoute_PrefixListToNetworkInterface_unattached
=== PAUSE TestAccVPCRoute_PrefixListToNetworkInterface_unattached
=== RUN   TestAccVPCRoute_PrefixListToNetworkInterface_attached
=== PAUSE TestAccVPCRoute_PrefixListToNetworkInterface_attached
=== RUN   TestAccVPCRoute_prefixListToVPCPeeringConnection
=== PAUSE TestAccVPCRoute_prefixListToVPCPeeringConnection
=== RUN   TestAccVPCRoute_prefixListToNatGateway
=== PAUSE TestAccVPCRoute_prefixListToNatGateway
=== RUN   TestAccVPCRoute_prefixListToTransitGateway
=== PAUSE TestAccVPCRoute_prefixListToTransitGateway
=== RUN   TestAccVPCRoute_prefixListToCarrierGateway
=== PAUSE TestAccVPCRoute_prefixListToCarrierGateway
=== RUN   TestAccVPCRoute_prefixListToLocalGateway
=== PAUSE TestAccVPCRoute_prefixListToLocalGateway
=== RUN   TestAccVPCRoute_prefixListToEgressOnlyInternetGateway
=== PAUSE TestAccVPCRoute_prefixListToEgressOnlyInternetGateway
=== RUN   TestAccVPCRoute_duplicate
=== PAUSE TestAccVPCRoute_duplicate
=== CONT  TestAccVPCDefaultRouteTable_basic
=== CONT  TestAccVPCRoute_Disappears_routeTable
=== CONT  TestAccVPCRoute_duplicate
--- PASS: TestAccVPCRoute_duplicate (16.62s)
=== CONT  TestAccVPCRoute_prefixListToEgressOnlyInternetGateway
--- PASS: TestAccVPCRoute_Disappears_routeTable (26.01s)
=== CONT  TestAccVPCRoute_prefixListToLocalGateway
    vpc_route_test.go:2123: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_prefixListToLocalGateway (0.84s)
=== CONT  TestAccVPCRoute_prefixListToCarrierGateway
--- PASS: TestAccVPCDefaultRouteTable_basic (33.92s)
=== CONT  TestAccVPCRoute_prefixListToTransitGateway
--- PASS: TestAccVPCRoute_prefixListToCarrierGateway (32.62s)
=== CONT  TestAccVPCRoute_prefixListToNatGateway
--- PASS: TestAccVPCRoute_prefixListToEgressOnlyInternetGateway (43.41s)
=== CONT  TestAccVPCRoute_prefixListToVPCPeeringConnection
--- PASS: TestAccVPCRoute_prefixListToVPCPeeringConnection (31.52s)
=== CONT  TestAccVPCRoute_PrefixListToNetworkInterface_attached
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_attached (75.33s)
=== CONT  TestAccVPCRoute_PrefixListToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_unattached (33.50s)
=== CONT  TestAccVPCRoute_prefixListToInstance
--- PASS: TestAccVPCRoute_prefixListToNatGateway (213.49s)
=== CONT  TestAccVPCRoute_prefixListToVPNGateway
--- PASS: TestAccVPCRoute_prefixListToInstance (80.27s)
=== CONT  TestAccVPCRoute_prefixListToInternetGateway
--- PASS: TestAccVPCRoute_prefixListToInternetGateway (30.30s)
=== CONT  TestAccVPCRoute_localRouteUpdate
--- PASS: TestAccVPCRoute_localRouteUpdate (55.79s)
=== CONT  TestAccVPCRoute_localRoute
--- PASS: TestAccVPCRoute_prefixListToTransitGateway (343.07s)
=== CONT  TestAccVPCRoute_ipv6ToVPCEndpoint
--- PASS: TestAccVPCRoute_localRoute (24.25s)
=== CONT  TestAccVPCRoute_ipv4ToVPCEndpoint
--- PASS: TestAccVPCRoute_prefixListToVPNGateway (176.69s)
=== CONT  TestAccVPCRoute_IPv6Update_target
--- PASS: TestAccVPCRoute_ipv4ToVPCEndpoint (356.42s)
=== CONT  TestAccVPCRoute_IPv4Update_target
--- PASS: TestAccVPCRoute_ipv6ToVPCEndpoint (377.43s)
=== CONT  TestAccVPCRoute_conditionalCIDRBlock
--- PASS: TestAccVPCRoute_IPv6Update_target (347.41s)
=== CONT  TestAccVPCRoute_ipv6ToLocalGateway
    vpc_route_test.go:1053: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv6ToLocalGateway (0.38s)
=== CONT  TestAccVPCRoute_ipv4ToLocalGateway
    vpc_route_test.go:1006: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv4ToLocalGateway (0.20s)
=== CONT  TestAccVPCRoute_ipv4ToCarrierGateway
--- PASS: TestAccVPCRoute_conditionalCIDRBlock (65.91s)
=== CONT  TestAccVPCRoute_ipv6ToTransitGateway
--- PASS: TestAccVPCRoute_ipv4ToCarrierGateway (34.75s)
=== CONT  TestAccVPCRoute_ipv4ToTransitGateway
--- PASS: TestAccVPCRoute_ipv6ToTransitGateway (334.80s)
=== CONT  TestAccVPCRoute_doesNotCrashWithVPCEndpoint
--- PASS: TestAccVPCRoute_ipv4ToTransitGateway (324.30s)
=== CONT  TestAccVPCRoute_ipv6ToNatGateway
--- PASS: TestAccVPCRoute_doesNotCrashWithVPCEndpoint (37.25s)
=== CONT  TestAccVPCRoute_ipv4ToNatGateway
--- PASS: TestAccVPCRoute_ipv6ToNatGateway (222.97s)
=== CONT  TestAccVPCRoute_ipv4ToVPCPeeringConnection
--- PASS: TestAccVPCRoute_IPv4Update_target (642.96s)
=== CONT  TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments
--- PASS: TestAccVPCRoute_ipv4ToNatGateway (202.21s)
=== CONT  TestAccVPCRoute_IPv4ToNetworkInterface_attached
--- PASS: TestAccVPCRoute_ipv4ToVPCPeeringConnection (26.09s)
=== CONT  TestAccVPCRoute_IPv4ToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_unattached (28.49s)
=== CONT  TestAccVPCRoute_ipv4ToInstance
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_attached (70.74s)
=== CONT  TestAccVPCRoute_ipv4ToVPNGateway
--- PASS: TestAccVPCRoute_ipv4ToInstance (69.97s)
=== CONT  TestAccVPCRoute_ipv6ToVPNGateway
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments (162.75s)
=== CONT  TestAccVPCRoute_ipv6ToVPCPeeringConnection
--- PASS: TestAccVPCRoute_ipv6ToVPCPeeringConnection (36.82s)
=== CONT  TestAccVPCRoute_IPv6ToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_ipv4ToVPNGateway (126.53s)
=== CONT  TestAccVPCRoute_ipv6ToInstance
--- PASS: TestAccVPCRoute_IPv6ToNetworkInterface_unattached (38.76s)
=== CONT  TestAccVPCRoute_ipv6ToInternetGateway
--- PASS: TestAccVPCRoute_ipv6ToVPNGateway (146.49s)
=== CONT  TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway
--- PASS: TestAccVPCRoute_ipv6ToInternetGateway (38.36s)
=== CONT  TestAccVPCRouteTable_Route_mode
--- PASS: TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway (44.86s)
=== CONT  TestAccVPCRoute_disappears
--- PASS: TestAccVPCRoute_ipv6ToInstance (105.77s)
=== CONT  TestAccVPCRoute_basic
--- PASS: TestAccVPCRoute_disappears (25.67s)
=== CONT  TestAccVPCRouteTable_localRouteImportUpdate
--- PASS: TestAccVPCRoute_basic (29.75s)
=== CONT  TestAccVPCRouteTable_localRouteAdoptUpdate
--- PASS: TestAccVPCRouteTable_Route_mode (66.11s)
=== CONT  TestAccVPCRouteTable_localRoute
--- PASS: TestAccVPCRouteTable_localRoute (26.14s)
=== CONT  TestAccVPCRouteTable_prefixListToInternetGateway
--- PASS: TestAccVPCRouteTable_prefixListToInternetGateway (34.62s)
=== CONT  TestAccVPCRouteTable_multipleRoutes
--- PASS: TestAccVPCRouteTable_localRouteAdoptUpdate (67.11s)
=== CONT  TestAccVPCRouteTable_gatewayVPCEndpoint
--- PASS: TestAccVPCRouteTable_localRouteImportUpdate (96.51s)
=== CONT  TestAccVPCRouteTable_vpcMultipleCIDRs
--- PASS: TestAccVPCRouteTable_gatewayVPCEndpoint (38.27s)
=== CONT  TestAccVPCRouteTable_IPv4ToNetworkInterfaces_unattached
--- PASS: TestAccVPCRouteTable_vpcMultipleCIDRs (46.63s)
=== CONT  TestAccVPCRouteTable_IPv6ToNetworkInterface_unattached
--- PASS: TestAccVPCRouteTable_IPv6ToNetworkInterface_unattached (40.65s)
=== CONT  TestAccVPCRouteTable_ipv4ToNatGateway
--- PASS: TestAccVPCRouteTable_IPv4ToNetworkInterfaces_unattached (80.26s)
=== CONT  TestAccVPCRouteTable_conditionalCIDRBlock
--- PASS: TestAccVPCRouteTable_conditionalCIDRBlock (53.05s)
=== CONT  TestAccVPCRouteTable_vgwRoutePropagation
--- PASS: TestAccVPCRouteTable_multipleRoutes (192.16s)
=== CONT  TestAccVPCRouteTable_ipv4ToVPCPeeringConnection
--- PASS: TestAccVPCRouteTable_ipv4ToVPCPeeringConnection (26.27s)
=== CONT  TestAccVPCRouteTable_ipv4ToLocalGateway
    vpc_route_table_test.go:532: skipping since no Outposts found
--- SKIP: TestAccVPCRouteTable_ipv4ToLocalGateway (0.77s)
=== CONT  TestAccVPCRouteTable_ipv4ToCarrierGateway
--- PASS: TestAccVPCRouteTable_ipv4ToCarrierGateway (27.23s)
=== CONT  TestAccVPCRouteTable_ipv4ToVPCEndpoint
--- PASS: TestAccVPCRouteTable_ipv4ToNatGateway (186.09s)
=== CONT  TestAccVPCRouteTable_ipv4ToTransitGateway
--- PASS: TestAccVPCRouteTable_vgwRoutePropagation (288.89s)
=== CONT  TestAccVPCDefaultRouteTable_revokeExistingRules
--- PASS: TestAccVPCRouteTable_ipv4ToTransitGateway (282.59s)
=== CONT  TestAccVPCRouteTable_requireRouteTarget
--- PASS: TestAccVPCRouteTable_requireRouteTarget (13.00s)
=== CONT  TestAccVPCRouteTable_requireRouteDestination
--- PASS: TestAccVPCRouteTable_ipv4ToVPCEndpoint (348.46s)
=== CONT  TestAccVPCRouteTable_tags
--- PASS: TestAccVPCDefaultRouteTable_revokeExistingRules (145.13s)
=== CONT  TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway
--- PASS: TestAccVPCRouteTable_tags (56.34s)
=== CONT  TestAccVPCRouteTable_ipv4ToInstance
--- PASS: TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway (46.53s)
=== CONT  TestAccVPCRouteTable_ipv4ToInternetGateway
--- PASS: TestAccVPCRouteTable_ipv4ToInternetGateway (42.39s)
=== CONT  TestAccVPCRouteTable_Disappears_subnetAssociation
--- PASS: TestAccVPCRouteTable_Disappears_subnetAssociation (24.72s)
=== CONT  TestAccVPCRouteTable_disappears
--- PASS: TestAccVPCRouteTable_ipv4ToInstance (85.02s)
=== CONT  TestAccVPCRouteTable_basic
--- PASS: TestAccVPCRouteTable_disappears (22.98s)
=== CONT  TestAccVPCDefaultRouteTable_swap
--- PASS: TestAccVPCRouteTable_basic (25.87s)
=== CONT  TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint
--- PASS: TestAccVPCDefaultRouteTable_swap (72.86s)
=== CONT  TestAccVPCDefaultRouteTable_ipv4ToTransitGateway
--- PASS: TestAccVPCRouteTable_requireRouteDestination (328.38s)
=== CONT  TestAccVPCDefaultRouteTable_prefixListToInternetGateway
--- PASS: TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint (377.29s)
=== CONT  TestAccVPCDefaultRouteTable_conditionalCIDRBlock
--- PASS: TestAccVPCDefaultRouteTable_prefixListToInternetGateway (100.52s)
=== CONT  TestAccVPCDefaultRouteTable_tags
--- PASS: TestAccVPCDefaultRouteTable_conditionalCIDRBlock (106.13s)
=== CONT  TestAccVPCDefaultRouteTable_vpcEndpointAssociation
--- PASS: TestAccVPCDefaultRouteTable_vpcEndpointAssociation (63.07s)
=== CONT  TestAccVPCDefaultRouteTable_Route_mode
--- PASS: TestAccVPCDefaultRouteTable_tags (110.60s)
=== CONT  TestAccVPCDefaultRouteTable_Disappears_vpc
--- PASS: TestAccVPCDefaultRouteTable_ipv4ToTransitGateway (342.46s)
--- PASS: TestAccVPCDefaultRouteTable_Disappears_vpc (41.66s)
--- PASS: TestAccVPCDefaultRouteTable_Route_mode (112.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	3038.113s

% make testacc TESTARGS='-run=TestAccVPCNetworkACLRule_duplicate' 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=TestAccVPCNetworkACLRule_duplicate -timeout 360m
=== RUN   TestAccVPCNetworkACLRule_duplicate
=== PAUSE TestAccVPCNetworkACLRule_duplicate
=== CONT  TestAccVPCNetworkACLRule_duplicate
--- PASS: TestAccVPCNetworkACLRule_duplicate (21.78s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	29.034s
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. generators Relates to code generators. service/vpc Issues and PRs that pertain to the vpc service. size/M Managed by automation to categorize the size of a PR. labels Mar 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 12, 2024
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Mar 12, 2024
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Mar 12, 2024
@ewbankkit ewbankkit changed the title [WIP] Prevent creation of duplicate aws_network_acl_rule resources Prevent creation of duplicate aws_network_acl_rule resources Mar 12, 2024
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

% make testacc PKG=ec2 TESTS="TestAccVPCNetworkACLRule_duplicate|TestAccVPCRoute_duplicate"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCNetworkACLRule_duplicate|TestAccVPCRoute_duplicate'  -timeout 360m
=== RUN   TestAccVPCNetworkACLRule_duplicate
=== PAUSE TestAccVPCNetworkACLRule_duplicate
=== RUN   TestAccVPCRoute_duplicate
=== PAUSE TestAccVPCRoute_duplicate
=== CONT  TestAccVPCNetworkACLRule_duplicate
=== CONT  TestAccVPCRoute_duplicate
--- PASS: TestAccVPCNetworkACLRule_duplicate (10.44s)
--- PASS: TestAccVPCRoute_duplicate (12.49s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        16.954s

@ewbankkit ewbankkit merged commit 8cc1b14 into main Mar 12, 2024
36 checks passed
@ewbankkit ewbankkit deleted the f-aws_network_acl_rule-duplicate branch March 12, 2024 19:45
@github-actions github-actions bot added this to the v5.41.0 milestone Mar 12, 2024
github-actions bot pushed a commit that referenced this pull request Mar 12, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 14, 2024
Copy link

This functionality has been released in v5.41.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!

Copy link

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 Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. generators Relates to code generators. service/vpc Issues and PRs that pertain to the vpc service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants