packer-plugin-external

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

README

Packer external data source plugin

A plugin for Packer which provides access to external commands. Compatible with Packer >= 1.7.0

Usage

packer {
  required_plugins {
    external = {
      version = ">= 0.0.2"
      source  = "github.com/joomcode/external"
    }
  }
}

data "external" "example" {
  program = ["jq", "{ \"foo\": .key1 }"]
  query = {
    key1 = "val1"
  }
}

data "external-raw" "example" {
  program = ["rev"]
  query   = "hello"
}

locals {
  external_result = data.external.example.result["foo"] # "val1"
  raw_result      = data.external-raw.example.result # "olleh\n"
}

See docs for more detailed information.

Running Acceptance Tests

make testacc

This will run the acceptance tests for all plugins in this set.

Requirements

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
datasource
raw

Jump to

Keyboard shortcuts

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