terraform-provider-pass

command module
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: MIT Imports: 11 Imported by: 0

README

terraform-provider-pass Build status

A Terraform provider to source credentials from your pass store.

[!WARNING] Please note that passwords will end up in your statefile as plaintext. Only use this provider if you are comfortable accepting this risk. Otherwise consider alternatives, like handling your credentials as variables.

This provider is not intended for wider consumption, hence why it isn't published to the Terraform registry.

The provider can be installed from my own registry.

# Install and configure the provider
terraform {
  required_providers {
    pass = {
        source = "nicholas.cloud/nchlswhttkr/pass"
        version = "<~ 0.4"
    }
  }
}

provider "pass" {
  # Defaults to $PASSWORD_STORE_DIR, if set in environment
  store = "/path/to/.password-store"
}

You can read passwords from the pass_password data source.

# Read credentials from your password store
data "pass_password" "read" {
  name = "read"
}

resource "local_sensitive_file" "hello_world" {
  content  = data.pass_password.read.password
  filename = "hello.txt"
}

Passwords can also be created with a pass_password resource.

# Store credentials from other sources to your password store
resource "pass_password" "write" {
  name     = "write"
  password = "hunter2"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL