pluralsh/plural-cli

The `plural` cli fails when using role switching for AWS

Closed this issue · 1 comments

Summary

When the AWS cli is configured to switch role, the plural cli fails when targeting the destination account.

Reproduction

Configure your AWS cli such that it can switch role from a "root" account to a "destination" account.

For example, your ~/.aws/config file should look like this:

[profile main]
region = eu-west-1
output = json

[profile destination]
role_arn = arn:aws:iam::ACCOUNTID:role/OrganizationAccountAccessRole
source_profile = main

Then run the following in your plural repo:

$ export AWS_PROFILE=destination
$ plural build
Building workspace for bootstrap
2022/04/08 19:42:44 Failed to create terraform state bucket XXX: NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Additional Info about Your Environment

Ubuntu 21.10

I believe this is fixed by c153390