Skip to content

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

@anthonychu

Description

@anthonychu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions