title: Terraform throwing error, "No valid credential sources found for AWS Provider" on Windows
body: <p>I started learning Terraform. I am now trying to deploy an EC2 instance to the AWS following the tutorial. I am using Windows 10. I have configured the AWS credentials on my laptop and I have been using it to deploy my applications to the ElasticBeanstalk. But it seems not to be working with Terraform.</p>
  <p>I have an example.tf file with the following code.</p>
  <pre><code>terraform {
    required_providers {
      aws = {
        source  = &quot;hashicorp/aws&quot;
        version = &quot;~&gt; 2.70&quot;
      }
    }
  }
  
  provider &quot;aws&quot; {
    profile = &quot;default&quot;
    region  = &quot;us-west-1&quot;
  }
  
  resource &quot;aws_instance&quot; &quot;example&quot; {
    ami           = &quot;ami-830c94e3&quot;
    instance_type = &quot;t2.micro&quot;
  }
  </code></pre>
  <p>To deploy, I have run the following command.</p>
  <pre><code>terraform apply
  </code></pre>
  <p>Then I got the following error.</p>
  <pre><code>Error: No valid credential sources found for AWS Provider.
          Please see https://terraform.io/docs/providers/aws/index.html for more information on
          providing credentials for the AWS Provider
  </code></pre>
  <p>Instead of using profile, when I use, acess_key and access_secret, it is working as expected. But there are AWS credentials already configured on my machine. I cannot just figure out why it is not working. What is wrong with my configuration and how can I fix it?</p>
  <p>This is my ~/.aws/config file.</p>
  <p><a href="https://i.stack.imgur.com/oC2Sg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oC2Sg.jpg" alt="enter image description here" /></a></p>
  <p>This is my ~/.aws/credentials file.</p>
  <p><a href="https://i.stack.imgur.com/TG6Wf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TG6Wf.jpg" alt="enter image description here" /></a></p>