terraform-provider-command

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

README

Command Terraform provider

Execute commands and extract output.


Usage

Initialise the provider:

terraform {
  required_providers {
    command = {
      source = "LukeCarrier/command"
    }
  }
}

provider "command" {}

Then use the data source:

TODO

output "json_multi" {
  value = TODO
}

Hacking

Get the dependencies:

go mod download
go build

Run the unit tests:

go test ./...

To test a Terraform state, you'll need to create a .terraformrc and set TF_CLI_CONFIG_FILE to its path. See /integration/fixtures/example.terraformrc for an example.

Signing

Generate a new key (use Keybase, GnuPG's CLI is a dumpster fire), then import it into a temporary local keyring:

export GNUPGHOME="$(mktemp -d)"
keybase pgp export -q email@addr -s \
    | gpg --import --allow-secret-key-import --pinentry-mode=loopback

Export the private key, and paste the result into a new GitHub secret named GPG_PRIVATE_KEY:

gpg --armor --export-secret-key email@addr

Add the passphrase to a secret named PASSPHRASE.

Finally, export the public key and paste the result into the Terraform registry:

gpg --armor --export email@addr

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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