Mixing Terraform standalone security_group_rule resource and security_group resource with inline ingress/egress rules results in rules being overwritten during Terraform apply.
Security group rules will be overwritten and will result in unintended blocking of network traffic
Either define all of a security group’s rules inline, or none of the security group’s rules inline
The following example will fail the aws-vpc-disallow-mixed-sgr check.
The following example will pass the aws-vpc-disallow-mixed-sgr check.