-
Notifications
You must be signed in to change notification settings - Fork 152
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
Tags property is considered null if any tag has a value "none" or "null" #343
Comments
Hi @askainet, This is actually intended. Then its value condition be null is simply a specialized version of Then its value condition match the search regex, checking for the general "null like" values such as As a result, If this is not what you're looking for, I would reccommend using the following scenario with a regex appropriate for you:
Alternatively, you could use the @case_sensitive tag to prevent |
Hi @Kudbettin, thanks for your reply.
Then this example in the documentation is wrong, as it leads to false positives. Is there an actual way to properly test for empty sets of tags in resources? |
You're absolutely right. I looked a bit into this issue today and we definitely need improvements on both how the step works and is documented. #352 addresses some of the issues. I will update the documentation depending on the final version of the step. Thanks for bringing this up! I can ping the issue once the pr makes into a release, but please feel free to let us know if something comes up. |
Hi @askainet, Could you give |
I can confirm the scenario works as expected in |
Thanks for trying again! :) Closing the issue since its confirmed as solved. |
This issue's conversation is now locked. If you want to continue this discussion please open a new issue. |
Description :
When the value of any tag in a resource matches
/^(none|null)$/i
, the resource is considered as not having tags.To Reproduce
terraform-compliance -p ./plan.json -f compliance
python3 package
Unexpected failed scenario
Expected behavior :
Tags property should not be considered null if any tag has a string value "none" or "null". A smarter better way to check if the tags property is really empty should be implemented to allow setting "none" and "null" as valid values for a tag.
Tested versions :
The text was updated successfully, but these errors were encountered: