Files
floci/compatibility-tests/compat-terraform
Allen Sanborn 21d9e7b8f4 test(ec2): cover security group rule sources at the Terraform layer (#3308)
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.
2026-09-09 22:15:15 -04:00
..