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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables required even when pulumi config is setup #101

Closed
brucemackenzie opened this issue Jan 19, 2022 · 1 comment 路 Fixed by #137
Closed

Environment variables required even when pulumi config is setup #101

brucemackenzie opened this issue Jan 19, 2022 · 1 comment 路 Fixed by #137
Assignees
Labels
area/import An issue related to `pulumi import` or the import resource option. kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@brucemackenzie
Copy link

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

Was trying to adopt an existing MongoDB project.
Following directions here: https://www.pulumi.com/registry/packages/mongodbatlas/installation-configuration/

I was getting 401's when trying to import:

 error: Preview failed: refreshing urn:pulumi:mongo::mongo::mongodbatlas:index/project:Project::Center: 1 error occurred:
        * error getting project(<projectid>): GET https://cloud.mongodb.com/api/atlas/v1.0/groups/<projectid>: 401 (request "") You are not authorized for this resource.

Steps to reproduce

  1. Set the config values
pulumi config set mongodbatlas:publicKey XXXXXXXXXXXXXX --secret 
pulumi config set mongodbatlas:privateKey YYYYYYYYYYYYYY --secret
  1. Try to import
    Expected: success
    Actual: 401 error

When I did this:

export MONGODB_ATLAS_PUBLIC_KEY=XXXXXXXXXXXXXX 
export MONGODB_ATLAS_PRIVATE_KEY=YYYYYYYYYYYYYY

the import succeeded.

@brucemackenzie brucemackenzie added the kind/bug Some behavior is incorrect or out of spec label Jan 19, 2022
@stack72 stack72 added the area/import An issue related to `pulumi import` or the import resource option. label Jan 24, 2022
@Remscar
Copy link

Remscar commented Jul 1, 2022

Encountered this also, quite frustrating.

@stack72 stack72 added this to the 0.75 milestone Jul 20, 2022
@stack72 stack72 self-assigned this Jul 20, 2022
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/import An issue related to `pulumi import` or the import resource option. kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants