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

Feature Request: Add fields to each items default section #17

Open
codezninja opened this issue Apr 29, 2021 · 1 comment
Open

Feature Request: Add fields to each items default section #17

codezninja opened this issue Apr 29, 2021 · 1 comment
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.

Comments

@codezninja
Copy link

Summary

In 1password UI each item has a default section with certain keys for different template types. You also have the ability to add different fields to the default section. It doesn't seem possible to edit that default section with custom fields through terraform currently.

I can add custom sections with my custom fields but I would like to also add certain fields to the default section for each item as well.

Proposed solution

resource "onepassword_item" "item" {
  vault = var.vault

  title    = var.name
  category = var.category

  username = var.username
  password = var.password
  database = var.database
  port     = var.port

  password_recipe {
    length  = var.password_recipe.length
    letters = var.password_recipe.letters
    digits  = var.password_recipe.digits
    symbols = var.password_recipe.symbols
  }

  // This will be the custom field in the default section
  field {
    label = "some label"
    type = "STRING"
    value = "some value"
  }

  field {
    label = "some label2"
    type = "CONCEALED"
    value = "some value2"
  }

  // This will be the rest of the custom sections and fields in those sections for the object
  dynamic "section" {
    for_each = var.sections
    content {
      label = section.value.label
      dynamic "field" {
        for_each = section.value.fields
        content {
          label = field.value.label
          type = field.value.type
          value = field.value.value
        }
      }
    }
  }

Is there a workaround to accomplish this today?

Not that I can tell looking through the source code

@edif2008 edif2008 added the tracked Issue is tracked in 1Password's internal ticketing system as well. label May 30, 2022
@salbracco24
Copy link

salbracco24 commented Nov 18, 2024

@edif2008 any updates on this? I would very much like this feature. It seems pretty essential, as given the current state, the 1P provider can do less than can be done from the 1P UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracked Issue is tracked in 1Password's internal ticketing system as well.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants