Check out example codes for "CLI configuration File in terraform ?". It will help you in understanding the concepts better.

Code Example 1

Location of the CLI Configuration File:->

Windows --->
    the file must be named <terraform.rc> and placed in the relevant user's <%APPDATA%> directory.
All other systems --->
    the file must be named <.terraformrc> placed directly in the home directory of the relevant user.

Environment Variable ---> 
    <TF_CLI_CONFIG_FILE environment variable.>

Learn ReactJs, React Native from akashmittal.com