Skip to content

Feature(cli-v2): Support generating a plugin configuration to a directory #1788

@erezrokah

Description

@erezrokah

Is your feature request related to a problem? Please describe.

Given that the sync command requires a directory as an argument, I'd expect the generate command to support that too.
For example:

# Should output to `examples/my_azure_config.yml` even if the directory doesn't exist
cloudquery gen source azure --output examples/my_azure_config.yml 

# Should output to `examples/azure.yml`
cloudquery gen source azure --output examples

Then I can

cloudquery sync examples

Describe the solution you'd like

  1. Create the directory path if it's nested
  2. If output flag doesn't end with .yml or .yaml assume it's a directory and write the config file to it

Describe alternatives you've considered

Manually creating directories before running the generate command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions