Navigation Menu

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

Add support for Vultr #159

Merged
merged 4 commits into from Feb 10, 2023
Merged

Add support for Vultr #159

merged 4 commits into from Feb 10, 2023

Conversation

arunsathiya
Copy link
Contributor

Add support for Vultr. Fixes #158.

  • The shell plugin supports importing of API Key from ~/.vultr-cli.yaml file.
  • Provisions the credential as an environment variable VULTR_API_KEY

Testing steps

  • Sign up for a Vultr account.
  • Get an API Token from this page. You'll need to set up billing to get a token though.
  • Set up Vultr CLI using vultr-cli account, and create a file at ~/.vultr-cli.yaml with the content: api-key: key-goes-here
  • Checkout this branch and run make vultr/build
  • Run op plugin init vultr-cli, and source shell plugin alias as well by running source ~/.op/plugins.sh
  • Follow on-screen instructions to import your token from the config file.
  • Restart shell and run vultr-cli and notice that the credential is now fetched from the 1Password item and provisioned as an environment variable.

Example secret:

➜  shell-plugins git:(add/vultr) make vultr/example-secrets
go run cmd/contrib/main.go vultr/example-secrets
API Key:
  API Key: MH0SBC3BVWH27A00Q9CCCVKJKDUWCEXAMPLE

Thanks and feedback welcome!

Copy link
Member

@hculea hculea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you so much for this addition! ❤️ I've only left a couple of nitpicks.

plugins/vultr/vultr-cli.go Outdated Show resolved Hide resolved
plugins/vultr/api_key.go Show resolved Hide resolved
@arunsathiya
Copy link
Contributor Author

Thanks for raising some great points, @hculea! I have addressed your feedback above.

@hculea
Copy link
Member

hculea commented Jan 25, 2023

Awesome! It now looks good to me, many thanks for this addition!

Code review ✅

Copy link
Member

@SimonBarendse SimonBarendse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank your for another great addition, Arun! 💚

@AndyTitu AndyTitu merged commit 5c8ee89 into 1Password:main Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New plugin: Vultr
4 participants