terraform-provider-berglas

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

Terraform Berglas Provider

This is a Terraform provider for interacting with Berglas.

Secrets will be stored in plaintext in the Terraform state. You should only use this with provider with Terraform remote state. For more information, please see sensitive state.

Installation

  1. Download the latest compiled binary from GitHub releases.

  2. Unzip/untar the archive.

  3. Move it into $HOME/.terraform.d/plugins:

    $ mkdir -p $HOME/.terraform.d/plugins
    $ mv terraform-provider-berglas $HOME/.terraform.d/plugins/terraform-provider-berglas
    
  4. Create your Terraform configurations as normal, and run terraform init:

    $ terraform init
    

    This will find the plugin locally.

  5. If you haven't already, bootstrap berglas

Optionally

If using terraform v0.13+ you can create a versions.tf file to pull the plugin during terraform init without installing it locally:

terraform {
  required_providers {
    berglas = {
      source  = "sethvargo/berglas"
      version = "~> 0.1"
    }
  }
}

Usage

  1. Create a Terraform configuration file:

    resource "berglas_secret" "demo" {
      bucket    = "my-bucket"
      key       = "projects/${var.project_id}/locations/global/keyRings/berglas/cryptoKeys/berglas-key"
      name      = "demo"
      plaintext = "p@s$w0rd!"
    }
    
  2. Run terraform init to pull in the provider:

    $ terraform init
    
  3. Run terraform plan and terraform apply:

    $ terraform plan
    
    $ terraform apply
    

Examples

For more examples, please see the examples folder in this repository.

Reference

See the documentation.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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