Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure of pulumi preview with AWS_PROFILE #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Apr 15, 2021

When I do pulumi new https://github.com/pulumi/apps/eks and then AWS_PROFILE=devsandbox pulumi preview in the generated app, it fails with:

    error: Running program '/Users/anton/apps/eks' failed with an unhandled exception:
    Error: providerCredentialOpts and AWS_PROFILE must be set together
        at new Cluster (/Users/anton/apps/eks/node_modules/@pulumi/cluster.ts:1385:19)
        at Object.<anonymous> (/Users/anton/apps/eks/index.ts:21:17)
        at Module._compile (internal/modules/cjs/loader.js:1137:30)
        at Module.m._compile (/Users/anton/apps/eks/node_modules/ts-node/src/index.ts:439:23)
        at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
        at Object.require.extensions.<computed> [as .ts] (/Users/anton/apps/eks/node_modules/ts-node/src/index.ts:442:12)
        at Module.load (internal/modules/cjs/loader.js:985:32)
        at Function.Module._load (internal/modules/cjs/loader.js:878:14)
        at Module.require (internal/modules/cjs/loader.js:1025:19)
        at require (internal/modules/cjs/helpers.js:72:18)

Adding empty providerCredentialOpts fixes it for me. But this sounds fishy.

I have created devsandbox profile via aws configure sso.

IN addition to that, the dashboard arg is triggering a deprecation warning.

pulumi version
v2.25.0

pulumi plugin ls
NAME        KIND      VERSION  SIZE    INSTALLED       LAST USED
aws         resource  3.38.1   253 MB  29 minutes ago  29 minutes ago
docker      resource  2.10.0   39 MB   29 minutes ago  29 minutes ago
kubernetes  resource  2.9.1    71 MB   29 minutes ago  12 minutes ago

aws --version
aws-cli/2.1.29 Python/3.8.8 Darwin/19.6.0 source/x86_64 prompt/off

Let me test if the change breaks other auth methods.

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 15, 2021

The env var authentication method works before and after the change.

export AWS_ACCESS_KEY_ID=..
export AWS_SECRET_ACCESS_KEY=..
export AWS_SESSION_TOKEN=..

I think the AWS_PROFILE authentication method should work without the boilerplate addition, so let me look at the code that originates the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant