1Password / terraform-provider-onepassword

Use the 1Password Terraform Provider to reference, create, or update items in your 1Password Vaults.
https://1password.com/secrets
MIT License
314 stars 41 forks source link

Fails if a managed item moved to another vault #166

Open zzhanabek opened 1 month ago

zzhanabek commented 1 month ago

Your environment

Terraform Provider Version: 1.4.1

CLI Version: 2.24.0

OS: Alpine Linux v3.18

Terraform Version: 1.8.3.

What happened?

Got error:

│ Error: op error: "MASKED_ID_OF_ITEM" isn't an item in the "MASKED_ID_OF_VAULT" vault.
│ 
│   with MASKED.onepassword_item.MASKED,
│   on main.tf line 29, in resource "onepassword_item" "MASKED":
│   29: resource "onepassword_item" "MASKED" {
│ 

even when I have this lifecycle:

  lifecycle {
    ignore_changes = [vault]
  }

What did you expect to happen?

Ignore vault changes or recreate in resources vault

Steps to reproduce

  1. create a resource "onepassword_item"
  2. Apply changes
  3. Move newly created item somewhere else
  4. repeat