-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat: add ssh key data source #158
Conversation
@volodymyrZotov could take a look please |
@atammy-narmi Sure! Added this to the review list! Thanks for reminding about this! |
friendly ping |
@atammy-narmi, sorry for the delay. I wanted to bring to your attention that we've recently migrated to the new We really appreciate the time and effort that you have already put into this PR. If you have some additional time to spare and you're still interested in having this change applied, please go ahead and modify this PR to make it compatible with the latest v2 version of this provider, at which point we'd be happy to review it again. Thank you! 😊 |
Hey @atammy-narmi! As an addition to what @volodymyrZotov said, I've noticed that your commits are not signed. This repository requires all commits to be signed. If you work on changing this PR to make it compatible with the latest v2 version of the provider, it would be great to have your commits signed as well. Here is some guidelines in achieving this. Sign commits with 1PasswordYou can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process. Learn how to use 1Password to sign your commits. Sign commits with
|
OK, I'll work on updating this PR. |
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
aed8946
to
7c226ed
Compare
Signed-off-by: Abhinav Tamaskar <[email protected]>
7c226ed
to
23395c3
Compare
OK, I've done the required changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @atammy-narmi! 👋🏻
Summary
Thank you so much for your effort in adding this functionality. It is much appreciated.
Functional review: ✅
I've validated that I can get the SSH public and private key, as well as the notes for the SSH item if it exists.
❗ One thing worth noting is that the private key that the Terraform item data source will have is in PKCS#8 format and not in OpenSSH format. If we want to provide the private key in mutliple formats, it may be a bit more challenging.
Code review: ✅
The code looks straight forward and on point. A couple of things would be nice to add on top of what's been done here:
- A test case in which we get the SSH Key public and private key. This can be dummy data.
- It would be nice to include the
SSH Key
as a valid item category for the data source.
I've added a test. Is there anything blocking this from being merged? |
# Conflicts: # internal/provider/const.go # internal/provider/onepassword_item_data_source.go # internal/provider/onepassword_item_data_source_test.go # internal/provider/test_utils.go
Relates: #74
The only thing to add was support for replacing spaces with underscores and adding new fields in the data source. Now going forward it should be easier if someone wants to add more fields to the data source, as the spaces will get fixed easily.The above comment is no longer valid as the
data.Set
function is no longer available, so it seems like it needs to be done manually for now.Would be nice to get this in 😸