Add support for Global API Key in Cli#3253
Add support for Global API Key in Cli#3253Taohao Wang (taohaowang) wants to merge 4 commits intomainfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for creating Global API keys in the Confluent CLI, extending the existing API key management functionality to support a new resource type alongside Cloud, Flink, and Tableflow API keys.
Changes:
- Added "global" as a new resource type constant and integrated it throughout the API key lifecycle (create, list, lookup)
- Updated command documentation and help text to reference Global API keys
- Added test coverage for the new Global API key resource type
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/resource/resource.go | Added Global constant and updated LookupType function to recognize "global" as a valid resource type |
| internal/api-key/command_test.go | Added test case for Global API key resource type resolution |
| internal/api-key/command_list.go | Updated list and getResourceId functions to handle Global resource type |
| internal/api-key/command_create.go | Added example for Global API key creation and case handling in create function |
| internal/api-key/command.go | Updated help text, autocomplete suggestions, and resource type resolution to include Global API keys |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Daniel Ayaz (danielayaz)
left a comment
There was a problem hiding this comment.
Looks good to me
| Text: "Create a Cloud API key:", | ||
| Code: "confluent api-key create --resource cloud", | ||
| }, | ||
| examples.Example{ |
There was a problem hiding this comment.
Can we create the dedicated integration test in api_key_test.go to verify the global API key?
Something like:
{args: "api-key create --description human-output --resource global", fixture: "api-key/xxx.golden"},
|
Also, for the Release Note section, could you please revert it to its original format? The CLI release pipeline needs its original format to extract the release notes: |
4882a3d
|




Release Notes
New Features
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Confluent Cloud
Support UAK - Global API key creation
Blast Radius
Low blast radius - only impact UAK - global API key (which is a new feature)
This feature is not yet enabled in prod.
References
https://confluentinc.atlassian.net/browse/IDENTITY-5922
Test & Review