-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_security_group_rule: Remove from state when rule not found #39834
Conversation
% make testacc TESTARGS='-run=TestAccVPCSecurityGroupRule_disappears' PKG=ec2 make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPCSecurityGroupRule_disappears -timeout 360m 2024/10/22 10:45:08 Initializing Terraform AWS Provider... === RUN TestAccVPCSecurityGroupRule_disappears === PAUSE TestAccVPCSecurityGroupRule_disappears === CONT TestAccVPCSecurityGroupRule_disappears vpc_security_group_rule_test.go:370: Step 1/1 error: Expected a non-empty plan, but got an empty refresh plan --- FAIL: TestAccVPCSecurityGroupRule_disappears (15.96s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 21.542s FAIL make: *** [testacc] Error 1
Community NoteVoting for Prioritization
For Submitters
|
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.
LGTM 🚀
> make testacc TESTARGS='-run=TestAccVPCSecurityGroupRule_' PKG=ec2 ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 4 -run=TestAccVPCSecurityGroupRule_ -timeout 360m
2024/10/22 09:00:12 Initializing Terraform AWS Provider...
=== RUN TestAccVPCSecurityGroupRule_Ingress_vpc
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_vpc
=== RUN TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id
=== PAUSE TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id
=== RUN TestAccVPCSecurityGroupRule_Ingress_protocol
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_protocol
=== RUN TestAccVPCSecurityGroupRule_Ingress_icmpv6
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_icmpv6
=== RUN TestAccVPCSecurityGroupRule_Ingress_ipv6
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_ipv6
=== RUN TestAccVPCSecurityGroupRule_egress
=== PAUSE TestAccVPCSecurityGroupRule_egress
=== RUN TestAccVPCSecurityGroupRule_disappears
=== PAUSE TestAccVPCSecurityGroupRule_disappears
=== RUN TestAccVPCSecurityGroupRule_selfReference
=== PAUSE TestAccVPCSecurityGroupRule_selfReference
=== RUN TestAccVPCSecurityGroupRule_expectInvalidTypeError
=== PAUSE TestAccVPCSecurityGroupRule_expectInvalidTypeError
=== RUN TestAccVPCSecurityGroupRule_expectInvalidCIDR
=== PAUSE TestAccVPCSecurityGroupRule_expectInvalidCIDR
=== RUN TestAccVPCSecurityGroupRule_PartialMatching_basic
=== PAUSE TestAccVPCSecurityGroupRule_PartialMatching_basic
=== RUN TestAccVPCSecurityGroupRule_PartialMatching_source
=== PAUSE TestAccVPCSecurityGroupRule_PartialMatching_source
=== RUN TestAccVPCSecurityGroupRule_issue5310
=== PAUSE TestAccVPCSecurityGroupRule_issue5310
=== RUN TestAccVPCSecurityGroupRule_race
=== PAUSE TestAccVPCSecurityGroupRule_race
=== RUN TestAccVPCSecurityGroupRule_selfSource
=== PAUSE TestAccVPCSecurityGroupRule_selfSource
=== RUN TestAccVPCSecurityGroupRule_prefixListEgress
=== PAUSE TestAccVPCSecurityGroupRule_prefixListEgress
=== RUN TestAccVPCSecurityGroupRule_prefixListEmptyString
=== PAUSE TestAccVPCSecurityGroupRule_prefixListEmptyString
=== RUN TestAccVPCSecurityGroupRule_ingressDescription
=== PAUSE TestAccVPCSecurityGroupRule_ingressDescription
=== RUN TestAccVPCSecurityGroupRule_egressDescription
=== PAUSE TestAccVPCSecurityGroupRule_egressDescription
=== RUN TestAccVPCSecurityGroupRule_IngressDescription_updates
=== PAUSE TestAccVPCSecurityGroupRule_IngressDescription_updates
=== RUN TestAccVPCSecurityGroupRule_EgressDescription_updates
=== PAUSE TestAccVPCSecurityGroupRule_EgressDescription_updates
=== RUN TestAccVPCSecurityGroupRule_Description_allPorts
=== PAUSE TestAccVPCSecurityGroupRule_Description_allPorts
=== RUN TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts
=== PAUSE TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts
=== RUN TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash
=== PAUSE TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash
=== RUN TestAccVPCSecurityGroupRule_multiDescription
=== PAUSE TestAccVPCSecurityGroupRule_multiDescription
=== RUN TestAccVPCSecurityGroupRule_Ingress_multipleIPv6
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_multipleIPv6
=== RUN TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists
=== RUN TestAccVPCSecurityGroupRule_Ingress_peeredVPC
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_peeredVPC
=== RUN TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6
=== RUN TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf
=== RUN TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource
=== PAUSE TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource
=== RUN TestAccVPCSecurityGroupRule_protocolChange
=== PAUSE TestAccVPCSecurityGroupRule_protocolChange
=== CONT TestAccVPCSecurityGroupRule_Ingress_vpc
=== CONT TestAccVPCSecurityGroupRule_prefixListEmptyString
=== CONT TestAccVPCSecurityGroupRule_multiDescription
=== CONT TestAccVPCSecurityGroupRule_protocolChange
--- PASS: TestAccVPCSecurityGroupRule_prefixListEmptyString (1.92s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource
--- PASS: TestAccVPCSecurityGroupRule_Ingress_vpc (17.53s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf
--- PASS: TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource (26.60s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6
--- PASS: TestAccVPCSecurityGroupRule_protocolChange (42.68s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_peeredVPC
vpc_security_group_rule_test.go:1370: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
--- SKIP: TestAccVPCSecurityGroupRule_Ingress_peeredVPC (0.00s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists
--- PASS: TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf (25.52s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_multipleIPv6
--- PASS: TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6 (18.90s)
=== CONT TestAccVPCSecurityGroupRule_EgressDescription_updates
--- PASS: TestAccVPCSecurityGroupRule_multiDescription (61.04s)
=== CONT TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash
--- PASS: TestAccVPCSecurityGroupRule_Ingress_multipleIPv6 (19.73s)
=== CONT TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts
--- PASS: TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists (26.16s)
=== CONT TestAccVPCSecurityGroupRule_Description_allPorts
--- PASS: TestAccVPCSecurityGroupRule_EgressDescription_updates (24.09s)
=== CONT TestAccVPCSecurityGroupRule_egressDescription
--- PASS: TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash (20.03s)
=== CONT TestAccVPCSecurityGroupRule_IngressDescription_updates
--- PASS: TestAccVPCSecurityGroupRule_egressDescription (16.11s)
=== CONT TestAccVPCSecurityGroupRule_expectInvalidTypeError
--- PASS: TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts (25.01s)
=== CONT TestAccVPCSecurityGroupRule_prefixListEgress
--- PASS: TestAccVPCSecurityGroupRule_expectInvalidTypeError (1.03s)
=== CONT TestAccVPCSecurityGroupRule_selfSource
--- PASS: TestAccVPCSecurityGroupRule_Description_allPorts (25.31s)
=== CONT TestAccVPCSecurityGroupRule_race
--- PASS: TestAccVPCSecurityGroupRule_IngressDescription_updates (25.10s)
=== CONT TestAccVPCSecurityGroupRule_issue5310
--- PASS: TestAccVPCSecurityGroupRule_selfSource (19.66s)
=== CONT TestAccVPCSecurityGroupRule_PartialMatching_source
--- PASS: TestAccVPCSecurityGroupRule_prefixListEgress (29.84s)
=== CONT TestAccVPCSecurityGroupRule_PartialMatching_basic
--- PASS: TestAccVPCSecurityGroupRule_issue5310 (16.20s)
=== CONT TestAccVPCSecurityGroupRule_expectInvalidCIDR
--- PASS: TestAccVPCSecurityGroupRule_expectInvalidCIDR (1.54s)
=== CONT TestAccVPCSecurityGroupRule_ingressDescription
--- PASS: TestAccVPCSecurityGroupRule_PartialMatching_source (22.13s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_ipv6
--- PASS: TestAccVPCSecurityGroupRule_ingressDescription (16.34s)
=== CONT TestAccVPCSecurityGroupRule_selfReference
--- PASS: TestAccVPCSecurityGroupRule_PartialMatching_basic (26.45s)
=== CONT TestAccVPCSecurityGroupRule_disappears
--- PASS: TestAccVPCSecurityGroupRule_Ingress_ipv6 (19.20s)
=== CONT TestAccVPCSecurityGroupRule_egress
--- PASS: TestAccVPCSecurityGroupRule_disappears (14.70s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_protocol
--- PASS: TestAccVPCSecurityGroupRule_selfReference (19.70s)
=== CONT TestAccVPCSecurityGroupRule_Ingress_icmpv6
--- PASS: TestAccVPCSecurityGroupRule_egress (16.05s)
=== CONT TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id
--- PASS: TestAccVPCSecurityGroupRule_Ingress_protocol (19.99s)
--- PASS: TestAccVPCSecurityGroupRule_Ingress_icmpv6 (20.26s)
--- PASS: TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id (16.98s)
--- PASS: TestAccVPCSecurityGroupRule_race (140.25s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 241.164s
This functionality has been released in v5.73.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! |
Description
Remove the
aws_security_group_rule
resource from state when Read finds no matching rule.Relations
Closes #39566.
Closes #39463.
Output from Acceptance Testing
Before fix
After fix