anasinnyk/terraform-provider-onepassword

Adding Password Deletes Vault

Closed this issue · 1 comments

OP Version: 0.6.1
Provider: 0.5.0

Trying to add a password to a vault with the following command:

resource "onepassword_item_password" "this" { name = "Password From Terraform" url = "https://example.com" password = "adsfnkoang9-24-ht0h09gah-2-d" vault = "Test Terraform Provider" }

When apply is run the following message is show. If executed the vault is deleted and then it tries to ad the password.

n execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:

  • create
  • destroy

Terraform will perform the following actions:

onepassword_item_password.this will be created

  • resource "onepassword_item_password" "this" {
    • id = (known after apply)
    • name = "Password From Terraform"
    • password = (sensitive value)
    • url = "https://example.com"
    • vault = "Test Terraform Provider"
      }

onepassword_vault.this will be destroyed

  • resource "onepassword_vault" "this" {
    • id = "k5a6iatzrmdddok5lc3z222avm" -> null
    • name = "Test Terraform Provider" -> null
      }

Plan: 1 to add, 0 to change, 1 to destroy.
It shouldn't be deleting the vault.

Corrupted terraform.tfstatefile