1Password/terraform-provider-onepassword

If I use the vault name when defining an item, and rerun terraform, it wants to recreate the item as it has a diff with the vault name versus vault UUID

scott-doyland-burrows opened this issue · 1 comments

Terraform 1.7.4
Provider 1.4.2
OnePassword CLI 2.25.0

I use this code:

resource "onepassword_item" "item" {

  vault = "example-vault"

  category = "login"
  username = "mylogin"
  password = "mypassword
}

This works, but when I rerun an apply it says the resource must be replaced and shows this as a diff.

~ vault = "khubz3ahotlrg2ze2xveqkijhy" -> "example-vault" # forces replacement

To fix this I must use the vault UUID rather than the vault name when creating the resource.

I should be able to use the vault name OR the vault UUID and not get a diff.

Closing this as a duplicate of #131.