def _create_sg()

in ec2-provider/ec2_provider/todo_app_stack.py [0:0]


    def _create_sg(self) -> ec2.SecurityGroup:
        """Create a security group for the Todo EC2 instances"""
        sg = ec2.SecurityGroup(self, 'vpc-inbound-sg', vpc=self._vpc)

        sg.add_ingress_rule(
            ec2.Peer.ipv4(self._vpc.vpc_cidr_block),
            ec2.Port(
                protocol=ec2.Protocol.TCP,
                string_representation="Allow inbound 8080 from VPC CIDR block",
                from_port=PORT,
                to_port=PORT,
            )
        )

        return sg