Skip to content

Commit

Permalink
Fix missing values in auth error messages, update link (#2367)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas11 committed Feb 13, 2023
1 parent 4b8e587 commit 339e72f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions provider/resources.go
Expand Up @@ -343,6 +343,9 @@ func preConfigureCallback(vars resource.PropertyMap, c shim.ResourceConfig) erro
Profile: stringValue(vars, "profile", []string{"AWS_PROFILE"}),
Token: stringValue(vars, "token", []string{"AWS_SESSION_TOKEN"}),
Region: stringValue(vars, "region", []string{"AWS_REGION", "AWS_DEFAULT_REGION"}),

CallerName: "Pulumi AWS Classic",
CallerDocumentationURL: "https://www.pulumi.com/registry/packages/aws/installation-configuration/",
}

if details, ok := vars["assumeRole"]; ok {
Expand Down Expand Up @@ -406,11 +409,8 @@ func preConfigureCallback(vars resource.PropertyMap, c shim.ResourceConfig) erro

if _, err := awsbase.GetAwsConfig(context.Background(), config); err != nil {
return fmt.Errorf("unable to validate AWS credentials. \n"+
"Details: %v\n\n"+
"Make sure you have: \n\n"+
" \t • Set your AWS region, e.g. `pulumi config set aws:region us-west-2` \n"+
" \t • Configured your AWS credentials as per https://pulumi.io/install/aws.html \n"+
" \t You can also set these via cli using `aws configure`. \n\n", err)
"Details: %v\n"+
"Make sure you have set your AWS region, e.g. `pulumi config set aws:region us-west-2`. \n", err)
}

return nil
Expand Down

0 comments on commit 339e72f

Please sign in to comment.