1Password / terraform-provider-onepassword

Use the 1Password Terraform Provider to reference, create, or update items in your 1Password Vaults.
https://developer.1password.com/docs/terraform/
MIT License
324 stars 48 forks source link

Error: decoding response: invalid character '<' looking for beginning of value while applying terraform code #105

Closed Aiswarya-997 closed 12 months ago

Aiswarya-997 commented 12 months ago

Your environment

Terraform Provider Version:1.2.1

Connect Server Version:

OS:Windows

Terraform Version:Terraform v1.6.3 on windows_amd64

What happened?

When I run terraform apply i get below error: 2023-11-22T10:32:49.155+0100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot 2023-11-22T10:32:49.156+0100 [ERROR] vertex "onepassword_item.demo_login" error: decoding response: invalid character '<' looking for beginning of value ╷ │ Error: decoding response: invalid character '<' looking for beginning of value │ │ with onepassword_item.demo_login, │ on main.tf line 23, in resource "onepassword_item" "demo_login": │ 23: resource "onepassword_item" "demo_login" { │ ╵ ╷ │ Error: decoding response: invalid character '<' looking for beginning of value │ │ with onepassword_item.demo_db, │ on main.tf line 31, in resource "onepassword_item" "demo_db": │ 31: resource "onepassword_item" "demo_db" { │ ╵ I am trying with the exact code on the repo, except the URL. The credentials work perfectly with 1password CLI.

What did you expect to happen?

1password item should have created.

Steps to reproduce

  1. Use the same example in the repo with my 1password URL configured. Vault id and service account token was given as input while running terraform plan using var.tfvars file. Terraform apply resulted in the error.

Notes & Logs