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

Error message/hint is wrong when credentials are specified incorrectly in stack config file #170

Open
MitchellGerdisch opened this issue Jul 25, 2023 · 1 comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features

Comments

@MitchellGerdisch
Copy link

What happened?

As per https://www.pulumi.com/registry/packages/confluentcloud/installation-configuration/#configuring-credentials
the confluent cloud credentials should (now) be named cloudApiKey and cloudApiSecret

However, code I had from a prerelease version of the provider had the confluent cloud credentials set up using the wrong names as such:

config:
  confluentcloud:apiKey: XXXXXXXXXXX
  confluentcloud:apiSecret:
    secure:
        YYYYYYYYYYYYYY

When I run pulumi up, I get this error message which is referencing the old names:

  pulumi:providers:confluentcloud (default_1_23_0):
    error: pulumi:providers:confluentcloud resource 'default_1_23_0' has a problem: could not validate provider configuration: Invalid or unknown key. Check `pulumi config get confluentcloud:apiSecret`.
    error: pulumi:providers:confluentcloud resource 'default_1_23_0' has a problem: could not validate provider configuration: Invalid or unknown key. Check `pulumi config get confluentcloud:apiKey`.

So, it took a bit of time to notice in the docs that the names of the creds are cloudApiSecret and cloudApiKey.

Expected Behavior

The error message/hint should use the correct names for the credentials.

Steps to reproduce

  1. Create a simple confluentcloud project such as this code: https://github.com/pulumi/pulumi-confluentcloud/tree/main/examples/environment/py
  2. Set up the credentials (don't have to be valid) in a stack config using the incorrect confluentcloud:apiKey and/or confluentcloud:apiSecret names
  3. Run pulumi up
  4. See the error message and note the hint uses the same names you did (which are not correct).
  5. Replace the names with cloudApiKey and cloudApiSecret
  6. Run pulumi up
  7. See that you do not receive an error message about credentials

Output of pulumi about

CLI
Version 3.76.0
Go Version go1.20.6
Go Compiler gc

Plugins
NAME VERSION
confluentcloud 1.23.0
python unknown

Host
OS darwin
Version 13.4.1
Arch x86_64

This project is written in python: executable='/Users/mitch/Downloads/pinecone-zen-3215/confluent/venv/bin/python3' version='3.11.3
'

Current Stack: team-ce/confluent/production

Found no resources associated with team-ce/production

Found no pending operations associated with team-ce/production

Backend
Name pulumi.com

Dependencies:
NAME VERSION
pip 22.3.1
pulumi-confluentcloud 1.23.0
setuptools 65.5.0

Additional context

No response

Contributing

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).

@MitchellGerdisch MitchellGerdisch added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jul 25, 2023
@rquitales
Copy link
Member

Thanks for reporting this enhancement. It will be helpful for users to migrate to the new config. It looks like the config is specified within the bridge-metadata.json file:

"cloudApiKey": "cloud_api_key",
"cloudApiSecret": "cloud_api_secret",

@t0yv0 do you know of a way to specify deprecated config fields with tf-bridge?

@rquitales rquitales added impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jul 26, 2023
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 kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants