Skip to content

Olivr/terraform-provider-gpg

Repository files navigation

GPG Terraform Provider

Terraform provider to generate a PGP key pair just like GPG would 🔐. Using GopenPGP under the hood.

Using the provider

View the documentation on Terraform registry or in the docs folder

terraform {
  required_providers {
    gpg = {
      source = "Olivr/gpg"
    }
  }
}

resource "gpg_private_key" "key" {
    name = "John Doe"
    email = "[email protected]"
}

Contributing

If you wish to work on the provider, you'll need:

To compile the provider, run make. This will build the provider and put the provider binary in the $GOPATH/bin directory.

Add the local build to your local Terraform plugins so you can test it in your project context.

mkdir -p ~/.terraform.d/plugins/registry.terraform.io/Olivr/gpg/0.0.1/$(go env GOOS)_$(go env GOARCH)
ln -s $(go env GOPATH)/bin/terraform-provider-gpg ~/.terraform.d/plugins/registry.terraform.io/Olivr/gpg/0.0.1/$(go env GOOS)_$(go env GOARCH)/terraform-provider-gpg

In order to run the full suite of Acceptance tests, run make test.

To generate or update documentation, run make doc.

Maintaining

To release, just push a new tag respecting Semver:

VERSION=v0.1.0
git tag $VERSION main
git push origin $VERSION