In reading the docs over at Terraform it says there are 3 options for finding AWS credientials:
- Static Credentials( embedded in the source file )
- Environment variables.
- From the AWS credentials file
I am trying to have my setup just use the credential file. I've checked that the environment variables are cleared and I have left the relevant variables in Terraform blank.
When I do this and run 'Terraform Plan' I get the error:
No Valid credential sources found for AWS Provider.
I've even tried adding the location of my credentials file into my provider block and that didn't help either:
provider "aws" {
region = "${var.region}"
profile = "${var.profile}"
shared_credentials_file = "/Users/david/.aws/credentials"
profile = "testing"
}
Is there something I'm missing to get Terraform to read this file and not require environment variables?
export AWS_ACCESS_KEY_ID="*************"
export AWS_SECRET_ACCESS_KEY="="*************"
export AWS_DEFAULT_REGION="us-west-1"
– Fefar Ravi