terraform-provider-onepassword icon indicating copy to clipboard operation
terraform-provider-onepassword copied to clipboard

Recreate item when it is missing

Open miguelaferreira opened this issue 1 year ago • 4 comments

Your environment

Terraform Provider Version: 1.1.4 (due to this bug on later versions)

Connect Server Version: latest which at this moment should be 1.7.1

OS: Linux (running the container that 1Password provides)

Terraform Version: v1.4.6

What happened?

I used the item resource to create an item in a vault. Then I deleted the item in the vault, and ran terraform again. Terraform threw an error after refresh saying that the item wasn't found.

What did you expect to happen?

I expected that terraform would recreate the item.

Steps to reproduce

  1. Create an item using the provider
  2. Delete the item
  3. Run terraform again

Notes & Logs

miguelaferreira avatar Jul 24 '23 08:07 miguelaferreira

Yes this is still a problem:

│ Error: op error: "abc123" isn't an item in the "abc123" vault.

Ramblurr avatar Feb 22 '24 10:02 Ramblurr

Same issue for me, complains that the item can't be found.

maxexcloo avatar May 17 '24 01:05 maxexcloo

Still getting this issue on 1.4.3, which I'm stuck on due to broken sections on data resources

josh-thisisbud avatar Aug 02 '24 11:08 josh-thisisbud

Just tried 2.1.0, still an issue I get

╷
│ Error: 1Password Item read error
│ 
│   with onepassword_item.onepassword_password_item,
│   on cdk.tf.json line 77, in resource.onepassword_item.onepassword_password_item:
│   77:       }
│ 
│ Could not get item '<item uuid redacted>' from vault
│ '<vault uuid redacted>', got error: Found 0 item(s) in vault
│ "<vault uuid redacted>" with title "<item uuid redacted>"
╵

josh-thisisbud avatar Aug 05 '24 09:08 josh-thisisbud