hashicorp / hashicorp/consul-template

Local mode for defaultOrKey func

Open
#1,339 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
4.8k
Forks
801
Avg merge
4h 5m
Merged PRs (30d)
6

Description

Hi, we use consul-template in production and it fits perfectly our needs.

We want to have a single conf file for multiple environments (staging, prod, local, etc).

Problem with the local case, when developer needs to run the code during development/testing. We have defaults for every config key we load from consul in case if the key will not be available there. What we want is to have the possibility to render config without actual connection to Consul, and fill config with default values where possible.

Will you accept PR with such enhancement and if will which form will be acceptable? e.g. CLI flag `--offline`?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by locating the defaultOrKey function and the existing CLI entry points. Determine how an offline or local mode should avoid connecting to Consul while still rendering available defaults, and define completion as rendering the configuration successfully without an actual Consul connection.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.