pulumi / pulumi-confluentcloud

A Confluent Pulumi resource package, providing multi-language access to Confluent
Apache License 2.0
8 stars 3 forks source link

Update documentation, update error messages for confluent.Environment.get #364

Open tklusz opened 8 months ago

tklusz commented 8 months ago

Hello!

Issue details

The error message for confluent.Environment.get() returns a 401 Unauthorized: Unauthorized when attempting to call the function without having an API key set. This error message should be updated similar to the error message that occurs when an invalid API Key is set 401 Unauthorized: invalid API key: make sure you're using a Cloud API Key and not a Cluster API Key: <docs>. Something like 401 Unauthorized: unset API key: make sure you set a Cloud API Key: <docs>.

The documentation also needs to be updated to make a clearer distinction between "Confluent Cloud" and "Cloud API Key", calling a key a "Confluent Cloud API key" is ambiguous, as it could be referring to an API key for the "Confluent Cloud" product, or specifically a "Cloud API Key" for Confluent Cloud, a specific type of key in the platform (which is required in this case). That documentation is here - https://www.pulumi.com/registry/packages/confluentcloud/installation-configuration/

I recommend changing the terminology, specifically calling out the difference between Cloud API Key and Cluster API Key. The stack configuration is a bit more clear than the environment variable, being confluentcloud:cloudApiKey instead of CONFLUENT_CLOUD_API_KEY which is more ambiguous.

The README for this project should also be updated to refer to the "Cloud API Key" specifically, as it makes no distinction, i.e. the documentation says the API key for Confluent Cloud should be the Cloud API Key for Confluent Cloud.

Affected area/feature

Error messages for confluentcloud:index:Environment / confluent.Environment.get(), documentation.

iwahbe commented 8 months ago

Hi @tklusz. Thanks for the feedback.


Related: https://github.com/pulumi/pulumi-terraform-bridge/issues/1585