anasinnyk/terraform-provider-onepassword

Deleting a Vault from 1Password doesn't trigger recreate

Opened this issue · 1 comments

Provider Version 0.4.1
Terraform Version 0.12.6

While testing this provider, I applyed a vault in my org's 1Password installation with

resource "onepassword_vault" "test" {
  name = "test"
}

I then manually deleted it from the 1Password web interface and ran the apply again.

  • Expected: The vault would be recreated.
  • Observed: During the state refresh the following error was emitted, stopping the run:
Error: some error in command [get vault 4so7dvevkgmznzwbd3cgoagnty]
Error: exit status 1
Output: [LOG] 2019/08/14 07:34:14 (ERROR) vault 4so7dvevkgmznzwbd3cgoagnty not found

We have some limitation here. If you delete it form UI application it removed forever, this provider use cli client. When we remove it from cli we cannot remove vault forever. We just move it to trash. Hm... maybe we should try re-create it if we have some problem like that. I will check it later. Thanks for this issue.