Replace the ingress/egress properties of aws_security_group resources with aws_vpc_security_group_ingress_rule resources and likewise for egress in course materials.
See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule#:~:text=NOTE:,-Using%20aws_vpc_security_group_egress_rule%20and
Using aws_vpc_security_group_egress_rule and aws_vpc_security_group_ingress_rule resources is the current best practice. Avoid using the aws_security_group_rule resource and the ingress and egress arguments of the aws_security_group resource for configuring in-line rules, as they struggle with managing multiple CIDR blocks, and tags and descriptions due to the historical lack of unique IDs.
Replace the
ingress/egressproperties ofaws_security_groupresources withaws_vpc_security_group_ingress_ruleresources and likewise for egress in course materials.See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc_security_group_ingress_rule#:~:text=NOTE:,-Using%20aws_vpc_security_group_egress_rule%20and