Skip to content

Make partial config handling more intuitive in sync command #3

@fcantournet

Description

@fcantournet

There are many config flags inherited from vaultctl for the sync command.

We can probably do a better Job at deducing the intent of the user from the actual input instead of relying on flag such as --skip-policies

A first step was to default --skip-policies to true when the -p flag isn't set.
The logic behind it is that is we don't specify a policy directory to sync with, then we don't want to sync the policies.

We can extend that logic and generally make a difference between specifying an empty object
e.g :

auths:   <- this is empty purposefully
backends:
 ... actual stuff ...

And the absence of the object alltogether :
e.g:

backends:   <- no empty auths anywhere
 ... actual stuff...

We can generally use this heuristic to determine if we want to sync to empty or no sync at all.

This has to be done after we parsed all the config files, when we have a complete model.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions