robinpellegrims / pellegrims

Nx monorepo with open source projects
MIT License
49 stars 21 forks source link

fix(nx-remotecache-s3): add config for provider call for role assumption #262

Closed biz812 closed 10 months ago

biz812 commented 11 months ago

When your AWS config has a role arn configured like this:

[profile developer]
role_arn = arn:aws:iam::<account_number>:role/<aws_role>
region = us-east-2
source_profile = default

Using the remote cache runner will result in this error: Error: Profile developer requires a role to be assumed, but no role assumption callback was provided.

This can be remedied by adding the roleAssumer config value to defaultProvider call.

Adding this value is a no-op for configurations that do not use role assumption.

robinpellegrims commented 10 months ago

I'm sorry, must have missed this PR. Looks good to me, thanks!

robinpellegrims commented 10 months ago

@biz812 some test in s3-client.spec.ts is failing because of the new config added. Could you adapt the test?

biz812 commented 10 months ago

@biz812 some test in s3-client.spec.ts is failing because of the new config added. Could you adapt the test?

Oops, sorry about that. Test updated 👍