Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

influx cli support multiple profiles #15302

Closed
gitirabassi opened this issue Sep 30, 2019 · 3 comments · Fixed by #17170
Closed

influx cli support multiple profiles #15302

gitirabassi opened this issue Sep 30, 2019 · 3 comments · Fixed by #17170

Comments

@gitirabassi
Copy link
Contributor

gitirabassi commented Sep 30, 2019

as of now you can configure the influx cli with either INFLUX_HOST and INFLUX_TOKEN or the token setup in ~/.influxdbv2/credentials and this is a good starting point.

But soon will rise the need to be handling multiple instances and endpoints or credentials for th e same instance for testing/debug purposes. I'd like to be able to have profiles just like the aws cli with the ~/.influxdbv2/credentials file looking something like

[default]
address = "http://localhost:9999"
token = "xxxxx"

[staging]
address = "https://example.com:9999"
token = "xxxx"

[frankfurt]
address = "https://eu-central-1-1.aws.influxcloud.net"
token = "xxxx"

and the usage can be along the lines of influx --profile=frankfurt bucket find or setup the INFLUX_PROFILE=frankfurt env variable

@gitirabassi gitirabassi changed the title influx cli support multiple "profiles" influx cli support multiple profiles Sep 30, 2019
@imogenkinsman
Copy link
Contributor

imogenkinsman commented Dec 11, 2019

I love this idea, it's like kubectx/kubens. Would be great to see a UX like those too.

@russorat
Copy link
Contributor

i agree this would be useful. that was the original reason we used a file.

@imogenkinsman
Copy link
Contributor

Let's spike this out and present it at demo day to see if product likes the UX.

My preference is to borrow heavily from kubectx, as that's an experience that developers are familiar with: https://github.com/ahmetb/kubectx#kubectx1, but open to other ideas on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants