Skip to content

neticdk/terraform-provider-lastpass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-provider-lastpass

release Go Report Card GoDoc

The Lastpass provider is used to read, manage, or destroy secrets inside Lastpass. Goodbye secret .tfvars files 👋

⚠️ Warning: This provider uses an unofficial LastPass API. With that comes the unfortunate risk of Lastpass releasing breaking changes without previous notice.

terraform {
  required_providers {
    random = {
      source = "hashicorp/random"
      version = "3.1.0"
    }
    lastpass = {
      source = "neticdk/lastpass"
      version = "~> 1.0"
    }
  }
}

provider lastpass {
  baseurl = "https://lastpass.eu"
  trust = true
  enable_2fa = true
}

resource "random_password" "pw" {
  length = 32
  special = false
}

resource "lastpass_secret" "mysecret" {
    name = "My site"
    username = "foobar"
    password = random_password.pw.result
    share = "Shared-TeamX"
    url = "https://example.com"
    notes = <<EOF
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sed elit nec orci
cursus rhoncus. Morbi lacus turpis, volutpat in lobortis vel, mattis nec magna.
Cras gravida libero vitae nisl iaculis ultrices. Fusce odio ligula, pharetra ac
viverra semper, consequat quis risus.
EOF
}

data "lastpass_secret" "mysecret" {
    id = resource.lastpass_secret.mysecret.id
}

Documentation and examples can be found inside the Terraform registry:

License

Apache

About

Terraform Lastpass provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.4%
  • Makefile 6.6%