mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 14:57:54 -05:00
Regression coverage for #2266 at the layer where the bug actually bit. When AuthorizeSecurityGroupIngress dropped the source group, the Terraform provider's create-wait could not find the rule it had just created and the apply failed with "couldn't find resource", which no API-level assertion reproduces. The quieter half of the same bug, a rule that comes back without its source, applies cleanly and then shows as drift forever, which only an empty re-plan catches. Both spellings are exercised because they read the source back through different APIs: aws_security_group_rule polls DescribeSecurityGroups, and aws_vpc_security_group_ingress_rule polls DescribeSecurityGroupRules. A CIDR rule sits alongside them so a group carrying both kinds cannot lose the reference, and a CIDR rule cannot sprout a phantom one. The fix itself is already covered by Ec2SecurityGroupRuleSourcesIntegrationTest and by an AWS CLI case in sdk-test-awscli; this adds the Terraform layer, which had none.