Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip-resource-types flag has no effect on resources that do not have a tags attribute name #505

Open
jenswegar opened this issue Apr 12, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@jenswegar
Copy link

Describe the bug
When tagging terraform files that contain e.g. helm_release or kubernetes_namespace, I get

[WARNING] failed to parse terraform block because failed to find tags attribute name for resource type helm_release

So I tried skipping those blocks by providing a --skip-resource-types helm_release to the command. But it does not seem to have any effect.

To Reproduce
Steps to reproduce the behavior:

  1. Create a terraform file containing a helm_release or kubernetes_namespace resource block
  2. Run cli command 'yor tag -d . --skip-resource-types helm_release'
  3. See error

Expected behavior
I expect there to be no warning and the scan to go through.

Screenshots

yor tag -d . --skip-resource-types helm_release
2024/04/12 15:01:02 [WARNING] failed to parse terraform block because failed to find tags attribute name for resource type helm_release
2024/04/12 15:01:02 [WARNING] failed to parse terraform block because failed to find tags attribute name for resource type kubernetes_namespace
2024/04/12 15:01:02 [WARNING] failed to parse terraform block because failed to find tags attribute name for resource type helm_release
2024/04/12 15:01:02 [WARNING] failed to parse terraform block because failed to find tags attribute name for resource type kubectl_manifest
  __    __
  \ \  / /
   \ \/ /___  _  ____
    \  /  _ \| |/  __|
    | |  |_| |   /
    |_|\____/|__|v0.1.191
 Yor Findings Summary
 Scanned Resources:	  22
 New Resources Traced: 	  0
 Updated Resources:	  0

Desktop (please complete the following information):

  • OS: macOS / iTerm
  • Yor Version 0.1.191
@ChanochShayner
Copy link
Contributor

Hey @jenswegar :)
This warning message is just a warning and does not affect the file tagging.
The reason that skip-resource-types is not working here is - the warning is in the praseFile flow before we start to tag the resources and look at the skip-resource-types list.

Copy link

stale bot commented May 18, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants