1Password / terraform-provider-onepassword

Use the 1Password Terraform Provider to reference, create, or update items in your 1Password Vaults.
https://developer.1password.com/docs/terraform/
MIT License
324 stars 48 forks source link

1.2.0 use of sections does not work #96

Closed ralphkootker closed 1 year ago

ralphkootker commented 1 year ago

When using version 1.2.0 the usage of sections stopped working as expected compared to version 1.1.2 till 1.1.4:

` resource "onepassword_item" "workspace_details" { vault = var.vault_uuid

title = var.name category = "login" # Only supports login, database of notes

password = var.token

username = "not-required"

section { label = "Workspace" field { label = "workspace_id" type = "STRING" value = var.workspace_id } field { label = "workspace_url" type = "STRING" value = var.workspace_url } } } `

buginventor commented 1 year ago

Maybe this info will help with investigation. In the state there is no id for field and that's why it's not showing in GUI (app) nor UI (web). it looks like:

user@blabla dir % terraform state show onepassword_item.some_configuration
# onepassword_item.some_configuration:
resource "onepassword_item" "some_configuration" {
    category = "password"
    id       = "vaults/xxx/items/yyy"
    password = (sensitive value)
    tags     = [
        "some",
        "tags",
    ]
    title    = "Something xxx"
    uuid     = "xxx"
    vault    = "xxx"

    section {
        id    = "1-2-2-3-4"
        label = "Label x"

        field {
            id      = ""
            label   = "XML"
            type    = "CONCEALED"
            value   = (sensitive value)
        }
    }
}
gogetdane commented 1 year ago

+1 this. We've downgraded to 1.1.4. Terraform reports resources as existing, yet in the UI and CLI resources do not contain sections.

If I add a new section in TF, the apply output shows the expected sections although none exist on the item in 1P. We've pinned to 1.1.4, tainted affected resources and recreated.

col commented 1 year ago

We're having the same issue. This is a pretty significant bug! I'm disappointed this is not getting more attention. 😞

JBG-brad commented 1 year ago

With the time gap between releases and the lack of attention to major bugs I'm curious if the 1Password has abandoned this project.

volodymyrZotov commented 1 year ago

Hi @JBG-brad. This one is currently on our radar and we'll try to address it as soon as possible. I understand how frustrating it is. Sorry for the delay.

edif2008 commented 1 year ago

FIx pushed with the 1.2.1 release.