hashicorp / hashicorp/nomad-pack

[feature request] Make variable source pluggable

Open
#473 2 comments 0 reactions 0 assignees View on GitHub
hcc/jira stage/needs-discussion theme/template/function type/enhancement
Dominant language
Go
Stars
447
Forks
65
PR merge metrics
No merged PRs in 30d

Description

Currently variable need to be provided either on CLI or as a file. This may be a limiting factor to the uses of this tool. I think being able to have multiple sources for variables can be very beneficial to this tool.

As an example:
1. Pack that defines variables A, B and C
2. Consul KV has key value pairs for B and C
3. Running the pack with variables A and B and also pointing it to Consul KV as another variable source
4. The output will use A and B as provided from CLI and C as available in Consul KV (B on CLI considered an override)

As an alternative -- extend templating engine to be able to query some of other Hashicorp tools for the data, such as Consul KV, Nomad Variables and Vault secrets engines.

I think this request also supersedes #409 with a bit of higher-level/wider scope.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing how CLI and file variables are loaded, then examine the requested precedence between those sources and Consul KV; done would require an agreed design for multiple variable sources and the alternative HashiCorp integrations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.