How to enable traffic between AWS Sagemaker domain SG and EFS SG

Hi , I have created a Sagemaker domain through terraform and AWS automatically creates EFS and its inbound and outbound security group.

Challenge is that we need to allow domain SG all traffic in EFS SG firewall rule via terraform, which i am unable to achieve as EFS SG is created in the backend .

Is there any way we can achieve this through terraform or we have to do it manually after domain is created?