Azure / Azure/azure-functions-core-tools

Support a way to commit a local.settings.json template to source control

Open
#2,070 9 comments 18 reactions 0 assignees View on GitHub
feature
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

Currently, local.settings.json can contain secrets and it should not be added to source control (we add it to .gitignore by default).

Would be great to be able to commit a template to source control and Core Tools (and VS Code) can use it to generate a local.settings.json.

For example, a repo can include a local.settings.sample.json or local.settings.template.json (actual name TBD, maybe support multiple names), and if one doesn't exist, Core Tools can automatically copy it to local.settings.json on `func start` or `func init` and let the user know that it has done that.

In addition, Core tools can add more gestures or automation. For example, it could provide a way to sync the template (something like `func settings sync`) that takes entries in local.settings.json that are missing in the template and adds them to the template as empty strings. It can also take what's in the template and missing from local.settings.json and copy them the other way too (in this case, copy the actual values).

/cc @ijoosong

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing `func start` and `func init` entry points, then determine how `local.settings.json` and the proposed template names are handled. The scope includes generating the local file and possibly a `func settings sync` command, so done requires a maintainer decision on the template naming and synchronization behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cli, devtools
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.