Skip to content

Use of AWS non default credentials profile - Same issue as closed #18402 #20599

@Marcus-James-Adams

Description

@Marcus-James-Adams

Terraform version 0.11.11 on Ubuntu 16.04
gives the following error

$ AWS_PROFILE=marcus terraform init
Initializing modules...
- module.vpc

Initializing the backend...

Error configuring the backend "s3": 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

Please update the configuration in your Terraform files to fix this error.
If you'd like to update the configuration interactively without storing
the values in your configuration, run "terraform init".

AWS config file

[default]
output = json
region = eu-west-2

[profile marcusa]
role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/marcusa
source_profile = default
region = us-east-1
output = json

credentials

[default]
aws_access_key_id = xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

following some of the suggestions in #18402
I tried
AWS_SDK_LOAD_CONFIG=1 AWS_PROFILE=marcus terraform init
this then works ok.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions