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 fields to each items default section #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

priscilasolis
Copy link

Resolves: #17

Description:
There is currently no ability to add custom fields outside of a section with the 1Password Terraform provider.

Solution:
A list of fields can now be defined outside of a section. Applying this is similar to how we currently implement fields inside a section.

It's important to note that in order to make this happen some other updates had to take place:

  • A secure_note category is added because there was no way to add fields without a password (also referenced in Feature Request: allow onepassword_item resource to be created without a password #66).
  • Include note_value in the resource as it was previously set in the data source.
  • Delete purpose value from from the fields as it can cause a collision with the note_value argument when NOTES is set as the purpose.
  • Fix bug where it wasn't capturing deleted fields from an existing item and therefore wasn't trying to recreate the deleted fields when running terraform apply.

Priscila Solís García added 2 commits May 9, 2023 11:32
This commit adds the ability to set a list of fields for any type of 1Password item.
In addition to this, some additional updates were made to support this:

- Include "note_value" in the resource as it was previously set in the data source
- Delete "purpose" from the fields as it can cause a collision with the note_value argument
- Fix bug where it wasn't capturing deleted fields from an existing item
- Add "secure_note" category
@edif2008
Copy link
Member

Hey @priscilasolis! 👋🏻

Thank you for making this contribution and apologies for the late response.

I wanted to bring to your attention that we've recently migrated to the new terraform-plugin-framework. With this big change, this PR is no longer applicable to the latest version of the provider.

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.

I've also 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 1Password

You 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 ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing

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.

Feature Request: Add fields to each items default section
3 participants