Using .env file from react application to pass the variables to Terraform resource

Hii all, I have doubt that how can I handle environment variable in terraform ?
In my scenario I have create s3 bucket using terraform resource but the terraform file was inside the react file.I need to share the bucket name via .env file → this file was in root directory of react application. How can i give bucket name in .env file and this file was accessed by the terraform resource to achieve bucket creation .This was my question!

Majorly user defined passing variable to terraform via .env ?

I not sure, but you can’t. Because you can’t use code/vars in provider section.