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
826 stars 123 forks source link

`--tag-prefix` doesn't work for git tag group #357

Closed lonegunmanb closed 1 year ago

lonegunmanb commented 1 year ago

Describe the bug yor version 0.1.170 on Windows

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/Azure/terraform-azurerm-network.git
  2. cd terraform-azurerm-network
  3. Run cli command 'yor tag -d ${pwd} -skip-dirs /examples -tag-prefix mytags'

The generated tags were:

tags = merge(var.tags, {
    git_commit           = "c506f86f75a34ad34c2b4437e8076f1f06bf6a00"
    git_file             = "main.tf"
    git_last_modified_at = "2022-11-23 09:20:55"
    git_last_modified_by = "xxx@hotmail.com"
    git_org              = "Azure"
    git_repo             = "terraform-azurerm-network"
    my_tags_yor_trace    = "be5dacae-bd25-4e94-bcaa-40eb839d953e"
  })

Expected behavior All git_xxx tags should contains my_tags_ prefix.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here (e.g. code snippets).