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

make the providerCredentialOpts error clearer #559

Merged
merged 4 commits into from
Apr 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. For more details, see: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/eks/#ClusterOptions-providerCredentialOpts")
jaxxstorm marked this conversation as resolved.
Show resolved Hide resolved
}
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. For more details, see: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/eks/#ClusterOptions-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. For more details, see: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/eks/#ClusterOptions-providerCredentialOpts")
}

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