bridgecrewio / yor

Extensible auto-tagger for your IaC files. The ultimate way to link entities in the cloud back to the codified resource which created it.
https://www.yor.io
Apache License 2.0
808 stars 123 forks source link

Update list-tags command inside customTagExamples.md #411

Closed exe-r closed 1 year ago

exe-r commented 1 year ago

List tags runs without --

propose change from yor --list-tags > yor list-tags

yor --list-tags | echo $?
130

yor list-tags | echo $?
0

if ran with --

yor --list-tags
Incorrect Usage. flag provided but not defined: -list-tags

NAME:
   yor - enrich IaC files with tags automatically

USAGE:
   yor [global options] command [command options] [arguments...]

VERSION:
   0.1.183

DESCRIPTION:
   Yor, the IaC auto-tagger

AUTHOR:
   Bridgecrew <support@bridgecrew.io>

COMMANDS:
   list-tags        List the tags yor will create if possible
   list-tag-groups  List the tag groups that will be applied by yor
   tag              apply tagging across your directory
   help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)
2023/07/20 09:28:26 [ERROR] flag provided but not defined: -list-tags

Ran without as command

yor list-tags
+------------+----------------------+--------------------------------+
|   GROUP    |       TAG KEY        |          DESCRIPTION           |
+------------+----------------------+--------------------------------+
| git        | git_org              | The entity which owns the      |
|            |                      | repository where this resource |
|            |                      | is provisioned in IaC          |
+            +----------------------+--------------------------------+
|            | git_repo             | The repository where this      |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_file             | The file (including path)      |
|            |                      | in the repository where this   |
|            |                      | resource is provisioned in IaC |
+            +----------------------+--------------------------------+
|            | git_commit           | The hash of the latest commit  |
|            |                      | which edited this resource     |
+            +----------------------+--------------------------------+
|            | git_modifiers        | The users who modified this    |
|            |                      | resource                       |
+            +----------------------+--------------------------------+
|            | git_last_modified_at | The last time this resource's  |
|            |                      | configuration was modified     |
+            +----------------------+--------------------------------+
|            | git_last_modified_by | The last user who modified     |
|            |                      | this resource                  |
+------------+----------------------+--------------------------------+
| simple     |                      |                                |
+------------+----------------------+--------------------------------+
| external   |                      |                                |
+------------+----------------------+--------------------------------+
| code2cloud | yor_trace            | A UUID tag that allows easily  |
|            |                      | finding the root IaC config of |
|            |                      | the resource                   |
+            +----------------------+--------------------------------+
|            | yor_name             | A tag that states the resource |
|            |                      | name in the IaC config file    |
+------------+----------------------+--------------------------------+

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

gruebel commented 1 year ago

thanks for the contribution 🏆