https://github.com/joomcode/packer-plugin-external
Packer plugin for communicating with external programs
https://github.com/joomcode/packer-plugin-external
packer packer-datasource packer-plugin
Last synced: 2 months ago
JSON representation
Packer plugin for communicating with external programs
- Host: GitHub
- URL: https://github.com/joomcode/packer-plugin-external
- Owner: joomcode
- License: mpl-2.0
- Created: 2022-12-11T23:45:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T10:42:41.000Z (about 1 year ago)
- Last Synced: 2025-05-07T20:08:45.245Z (2 months ago)
- Topics: packer, packer-datasource, packer-plugin
- Language: Go
- Homepage:
- Size: 118 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Packer external data source plugin
A plugin for [Packer](https://www.packer.io/) which provides access to external commands. Compatible with Packer >= 1.7.0
## Usage
```hcl
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
```bash
make testacc
```This will run the acceptance tests for all plugins in this set.
# Requirements
- [Go](https://go.dev/doc/install) >= 1.22