Skip to content

cli: support multiple deployments with coder deployment use #13325

Closed as not planned
@stirby

Description

@stirby

We don't currently support multiple deployments in the CLI, right now we only store one session token and one URL. We should allow the user to store multiple on each coder login call and have some state that points to the "active" deployment. Effectively we'd like to emulate kubectl contexts.

This hasn't been explicitly requested, but simplifies supporting multiple deployments in extensions and prepares for ongoing RBAC work.

We could achieve this with a very simple coder.yaml or deployments.yaml.

I'd propose that each "coder context" or simply "coder deployment" be keyed by the deployment url:

> coder deployment use dev.coder.com

Switched to https://dev.coder.com

> coder deployment show

https://dev.coder.com

> coder deployment use bananas.biz

No deployment found with the provided url, use "coder login..."

Or

> coder context use dev.coder.com

> coder context list

Edit: changed syntax to avoid top-level commands.

Metadata

Metadata

Assignees

Labels

cliArea: CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions