Skip to content

Feature Request: Allow knife vault commands to be executed on .json files #341

@kmmceachern

Description

@kmmceachern

Describe the Enhancement

Ansible vaults can be shown in git with some modifications to a .gitattributes and .gitconfig file. It would be great if some changes could be made to enable this for Chef vaults.

Describe the Need

Since knife vault show <vault>/<item>.json isn't a valid command, there's no way to enable git to decrypt and diff vaults automatically (at least none I have been able to find).

I'd like to request functionality be added for knife vault show commands to accept a new <vault>/<item>.json path-based syntax, in addition to the existing <vault> <item> syntax.

Current Alternative

The only method I know of right now to diff vault changes is: check out the base branch in git, knife vault show <vault> <item> -Fj > /tmp/diff1.json, then check out the feature branch and knife vault show <vault> <item> -Fj > /tmp/diff2.json, then diff /tmp/diff1.json /tmp/diff2.json.

Can We Help You Implement This?

Please let me know if there's any more information I can provide to help make this happen! I'm not a Ruby dev though, so I lack the skillset to make this change myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage: Feature RequestIndicates an issue requesting new functionality.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions