Skip to content

Commit

Permalink
Merge pull request #559 from pulumi/jaxxstorm/provider-cred-error
Browse files Browse the repository at this point in the history
make the providerCredentialOpts error clearer
  • Loading branch information
jaxxstorm committed Apr 16, 2021
2 parents 95c46c4 + dbc260c commit 41eb565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnetverson}}
- run: dotnet nuget add source ${{ github.workspace }}/nuget
- name: Download provider binary
uses: actions/download-artifact@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased
_(none)_

- Update wording for providerCredentialOpt errors
[#559](https://github.com/pulumi/pulumi-eks/pull/559)

## 0.23.0 (Released March 22, 2021)

Expand Down
6 changes: 3 additions & 3 deletions nodejs/eks/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1379,15 +1379,15 @@ export class Cluster extends pulumi.ComponentResource {
// Check that AWS provider credential options are set for the kubeconfig
// to use with the given auth method.
if (opts?.provider && !args.providerCredentialOpts) {
throw new Error("providerCredentialOpts and an AWS provider instance must be set together");
throw new Error("It looks like you're using an explicit AWS provider. Please specify this provider in providerCredentialOpts.");
}
if (process.env.AWS_PROFILE && !args.providerCredentialOpts) {
throw new Error("providerCredentialOpts and AWS_PROFILE must be set together");
throw new Error("It looks like you're using AWS profiles. Please specify this profile in providerCredentialOpts.");
}
const awsConfig = new pulumi.Config("aws");
const awsProfile = awsConfig.get("profile");
if (awsProfile && !args.providerCredentialOpts) {
throw new Error("providerCredentialOpts and AWS config setting aws:profile must be set together");
throw new Error("It looks like you've set an AWS profile in your stack config. Please specify this profile providerCredentialOpts.");
}

// Create the core resources required by the cluster.
Expand Down

0 comments on commit 41eb565

Please sign in to comment.