terraform provider aws secret key and aws_secret_access_key code example
Example: env variable for access key and secret key in terraform
#Terraform env variable for provider AWS
$ export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"
$ export AWS_DEFAULT_REGION="us-west-2"
$ terraform plan