Skip to content

Generate guessing the type of file #101

@xescugc

Description

@xescugc

Instead of having the --tfstate and --hcl would be good to directly use one or the other based on the file.

If used like inframap generate hcl.tf it's easy as we know the file extension, the hard part is if it's piped like cat hcl.tf | inframap generate, in this case the best guess is to try to marshal it with JSON and if it's invalid then try with HCL and return error if also invalid.

This would improve a lot the user experience as it would remove the need of --tfstate and --hcl making it much simpler and intuitive to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions