This issue was originally opened by @nhooey as hashicorp/terraform#24491. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.12.24
Expected Behavior
When Terraform runs, it should detect when an aws_security_group_rule is being added to an aws_security_group that already has inline rules, and warn the user.
NOTE on Security Groups and Security Group Rules: Terraform currently provides both a standalone Security Group Rule resource (a single ingress or egress rule), and a Security Group resource with ingress and egress rules defined in-line. At this time you cannot use a Security Group with in-line rules in conjunction with any Security Group Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.
It would also help if the documentation said "WARNING" instead of "note". Right now it kind of sounds like it's whispering "train"...
This issue was originally opened by @nhooey as hashicorp/terraform#24491. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Expected Behavior
When Terraform runs, it should detect when an
aws_security_group_rule
is being added to anaws_security_group
that already has inline rules, and warn the user.Actual Behavior
Only the documentation warns the user.
References
The
aws_security_group_rule
documentation says:It would also help if the documentation said "WARNING" instead of "note". Right now it kind of sounds like it's whispering "train"...