This is a known "issue" with Terraform. Basically, if a user wishes to use aws_security_group_rule resources, there can be no inline security group rules inside the aws_security_group resource. Further explanation can be found in this comment: #11011 (comment)
Happy to answer any further questions you have, however. Thanks!