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

aws implementation points to Terraform help page #722

Closed
cowwoc opened this issue Aug 28, 2019 · 4 comments
Closed

aws implementation points to Terraform help page #722

cowwoc opened this issue Aug 28, 2019 · 4 comments
Assignees
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively
Milestone

Comments

@cowwoc
Copy link

cowwoc commented Aug 28, 2019

Given:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

// Create an AWS resource (S3 Bucket)
const bucket = new aws.s3.Bucket("my-bucket");

// Export the name of the bucket
export const bucketName = bucket.id;

When I run pulumi up I get:

Previewing update (dev):

     Type                 Name         Plan       Info                                                                                                                                                                                                                                                                        +   pulumi:pulumi:Stack  sparrow-dev  create                                                                                                                                                                                                                                                                                     └─ aws:s3:Bucket     my-bucket               1 error                                                                                                                                                                                                                                                                    
Diagnostics:
  aws:s3:Bucket (my-bucket):
    error: 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

Notice that the error message asks me to visit terraform's website.

@cowwoc cowwoc changed the title aws providers points to Terraform help page aws implementation points to Terraform help page Aug 28, 2019
@pgavlin
Copy link
Member

pgavlin commented Aug 28, 2019

Thanks for filing! I'm going to move this to https://github.com/pulumi/pulumi-aws.

@pgavlin pgavlin transferred this issue from pulumi/pulumi Aug 28, 2019
@lukehoban lukehoban self-assigned this Aug 28, 2019
@lukehoban lukehoban added this to the 0.26 milestone Aug 28, 2019
@lukehoban
Copy link
Member

I am pretty sure this was regressed in #580, related to the comment I left at the time: #580 (comment).

Looking at where this error message is produced, all 4 cases are as part of getting an error from creds.Get() which that PR removed.

cc @jen20

@lukehoban
Copy link
Member

lukehoban commented Aug 28, 2019

In particular - that discussion notes:

I don't think removing the call to Get on the returned Credentials struct is strictly necessary to fix the bug, but I also don't think it buys us anything to do it.

However, the issue here is exactly the reason we need to do it - to report good error messages early for cases where creds.Get() will fail.

@lukehoban lukehoban modified the milestones: 0.26, 0.27 Aug 29, 2019
@lukehoban lukehoban added the impact/usability Something that impacts users' ability to use the product easily and intuitively label Sep 6, 2019
@lukehoban lukehoban assigned stack72 and unassigned lukehoban and jen20 Sep 17, 2019
@stack72
Copy link
Contributor

stack72 commented Sep 19, 2019

Hi all,

I have tried to recreate this today - when using the latest pulumi-aws from npm, I get the following error when not supplying any credentials at all:

$ pulumi up
Previewing update (dev):

     Type                 Name                       Plan       Info
 +   pulumi:pulumi:Stack  missing-creds-message-dev  create
     └─ aws:s3:Bucket     my-bucket                             1 error

Diagnostics:
  aws:s3:Bucket (my-bucket):
    error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see https://pulumi.io/install/aws.html for details on configuration

This is what we had hoped would happen with #580

@cowwoc if you still see this error on the latest version of pulumi-aws, then please do let me know

Paul

@stack72 stack72 closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively
Projects
None yet
Development

No branches or pull requests

5 participants