feat: store project id and type on --save-as
- Dominant language
- TypeScript
- Stars
- 41
- Forks
- 24
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 56
Description
`--save-as` writes elasticsearch and kibana blocks only (`src/cloud/credentials.ts` `buildProjectContext`). The Cloud block and the project id are dropped. Later `reset-credentials`, `patch`, or `delete` need `--id` from memory or from the create JSON.
On `--save-as`:
- Keep the active `cloud` block on the new context (or copy it from `--use-context`)
- Store `project_id`, `project_type` (search / observability / security), and `region_id` on the context
- `elastic status --json` and `elastic config context list --json` show those fields
`reset-credentials --save-as ` should resolve `--id` from the context when omitted.
Acceptance: create with `--save-as demo`, then `elastic --use-context demo cloud serverless projects observability get` works without `--id`. Context YAML has `cloud` plus project metadata. Tests cover create and reset.
Contributor guide
Assessment
This issue has not been assessed yet.