nrkno / terraform-provider-lastpass

Terraform Lastpass provider
Apache License 2.0
61 stars 7 forks source link

Timeout, unable to create new secret after following setup instructions #52

Open TheQueenIsDead opened 2 years ago

TheQueenIsDead commented 2 years ago

Hey there, recently added this provider to my project, but it's not quite working as intended it seems, any help diagnosing would be appreciated!

Versions

$ terraform version
Terraform v1.0.9
on linux_amd64
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/vault v2.24.0
+ provider registry.terraform.io/mongodb/mongodbatlas v1.0.1
+ provider registry.terraform.io/nrkno/lastpass v0.5.3

I have exported the following variables

export LPASS_DISABLE_PINENTRY=1
export LPASS_HOME=$HOME/lpass
export LPASS_AGENT_TIMEOUT=86400
export LASTPASS_USER=myname@myemail.com
export LASTPASS_PASSWORD=**************

And my resource config looks like this:

...
resource "lastpass_secret" "dev_password" {

  for_each = local.developers

  name = "${title(each.key)} MongoDB Atlas User - ${title(terraform.workspace)} "
  username = mongodbatlas_database_user.dev[each.key].username
  password = mongodbatlas_database_user.dev[each.key].password
  note = <<EOF
Connection Strings:
${mongodbatlas_cluster.hero.mongo_uri_with_options}
EOF
}

I have logged in with--trust on the CLI before I executed this, and the error I receive is as such

╷
│ Error: timeout, unable to create new secret
│ 
│   with lastpass_secret.dev_password["developer.name"],
│   on mongo_users_developers.tf line 18, in resource "lastpass_secret" "dev_password":
│   18: resource "lastpass_secret" "dev_password" {

The two factor auth request comes up on my phone and I accept promptly, is there anything I can try to fix this ~30 second timeout? Or any more logs I can provide to help aid this debugging?

Any help appreciated, thank you

TheQueenIsDead commented 2 years ago

It looks as though the provider has ~half worked? Resources have been created, albeit multiple times image