Terraform - Update - Read from Env Vars

Hello All

I am new to writing custom providers. I need some help

Right now I define the variables in the auto.tfvars or pass them through command line and the terraform apply (update) works fine. It reads any changes in the values and makes the necessary changes

Terraform - update scenario - compares the values with the tfstate file. Am i right??

However, I have seen that if I declare any variable as env variable may be using “export username=abc”, then then change the value during the 2nd apply -> it does not read the change in env variables.

Is there a way to achieve this -> that you declare varialbes as env variables and not pass them through command line or autotfvars, and the update still recognizes the changes??

Right now I am using
d.HasChange and d.GetChange