hashicorp / hashicorp/consul-template

Add check command for templates

Open
#1,060 5 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
4.8k
Forks
801
Avg merge
4h 5m
Merged PRs (30d)
6

Description

Hi, would it be possible to add a check command for rendered templates? I imagine something like

  • If check command is configured, render template first to a temporary location
  • Run check command with the temporary location as first argument
  • If the check command returns with rc 0, render the template to the destination
  • Otherwise log a warning and do not render the template to the destination

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing the existing template-rendering flow and configuration handling, then determine where a temporary render and check command would fit. Done means configured checks run before destination rendering, with successful checks allowing the render and failures logging a warning without replacing the destination.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.