Add ecctl project list command for serverless projects#753
Open
Add ecctl project list command for serverless projects#753
ecctl project list command for serverless projects#753Conversation
Introduce support for Elastic Cloud Serverless projects in ecctl,
starting with the ability to list projects. The command calls the
Serverless Projects API (`/api/v1/serverless/projects/{type}`) for
elasticsearch, observability, and security project types.
- Add `pkg/project/` API layer with types, validation, and HTTP client
- Add `cmd/project/` with parent command and `list` subcommand
- Support `--type` flag to filter by project type
- Add text formatter template for tabular output
- Regenerate bindata.go and docs
- Include unit tests with 87.5% coverage
Co-authored-by: Cursor <cursoragent@cursor.com>
633a9c1 to
8e7118a
Compare
tobio
reviewed
Feb 17, 2026
Member
tobio
left a comment
There was a problem hiding this comment.
LGTM, though I tend to think we should be adding support in cloud-sdk-go first and using that here. Though that's a wider decision.
| func init() { | ||
| Command.AddCommand(listCmd) | ||
|
|
||
| listCmd.Flags().String("type", "", "Filters by project type (elasticsearch, observability, security)") |
Member
There was a problem hiding this comment.
Does it make sense to support multiple type flags?
project list --type elasticsearch --type security
Contributor
Author
There was a problem hiding this comment.
Yes, but I can also add that as a follow up? didn't want to go deep with this PR since i'm totally vibing it hehe.
Member
There was a problem hiding this comment.
It feels like if we're supporting Serverless API's in ecctl, then we should also support those APIs in cloud-sdk-go, i.e this file should be added there instead of directly into ecctl?
Co-authored-by: Toby Brain <tobio85@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ecctl project listcommand that queries the Elastic Cloud Serverless Projects API to list elasticsearch, observability, and security projectspkg/project/API layer with types, validation, and direct HTTP client calls to/api/v1/serverless/projects/{type}endpoints--typeflag to filter by a specific project type; omitting lists all typesTest plan
make lintpasses with 0 issuesmake unitpasses — all existing tests continue to pass, newcmd/projecttests passmake bindataregenerated successfullymake docsregenerated successfullyecctl project --helpandecctl project listshow correct outputMade with Cursor