fix: use provider credentials if they are set in extractClusterApiKeyAndApiSecret #328
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current behavior:
With the following API Key based provider authentication:
Any CRUD operations on a
kafka_acl
results in the ACL's referenced credentials being used for authentication instead of thecloud_api_key
andcloud_api_secret
defined in the provider block.Expected behavior:
I would expect the creation, reading, deletion, or update of a
kafka_acl
to use the provider's configured APIKey/secret defined in theprovider "confluent" { .. }
block.However, because
isKafkaMetadataSet
checks for thekafka_rest_endpoint
to be set in order for the provider's APIkey/secret to be used for CRUD of akafka_acl
, this is not happening. Instead the CRUD operations of a KafkaACL are using the API Key referenced in thekafka_acl
'scredentials
block. Essentially this block is executed instead of this one.I am wondering if there is a specific reason why the confluent provider is using the ACL's referenced credentials for authentication versus the credentials defined in the
provider
block? If there is no special reason for this, I think #328 would be a good solution for this problem.fixes #329