turbot / steampipe-mod-aws-tags

Is your AWS tagging strategy following best practice? This mod checks if your AWS resource tags are set correctly to help you manage them effectively using Powerpipe and Steampipe.
https://hub.powerpipe.io/mods/turbot/aws_tags
Apache License 2.0
19 stars 8 forks source link

*_expected_tag_values controls should evaluate resources without tags as 'skip' #32

Closed rajlearner17 closed 1 year ago

rajlearner17 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Below is the example outcome, where S3 buckets are evaluated based on s3_bucket_expected_tag_values

steampipe check control.s3_bucket_expected_tag_values

The query evaluates non-tagged buckets as OK; by nature of this mod, we should validate whether buckets are tagged with proper values specified in the .spvar file or not; in case the tag is missing, the control should show as **skip**

image

Steampipe version (steampipe -v) Example: v0.3.0

Plugin version (steampipe plugin list) Example: v0.5.0

To reproduce Steps to reproduce the behavior (please include relevant code and/or commands).

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

rajlearner17 commented 1 year ago

@Priyanka-Chatterjee-2000 for the case specified in steampipe-prohibited-tag-jun23, even though we have only one tag key matching, the reason specifies the entire set of the tag keys, which generates a view that all tag keys are available in the bucket. Can we be specific about which Key matches the reason?

+ S3 buckets should have appropriate tag values ................................................................................. 1 / 5 [==========]
  | 
  ALARM: steampipe-mandatory-tag-jun23 has unexpected tag values for tags: Environment. ..................................... us-east-1 138434731234
  OK   : my-chatgpt-workshop has expected tag values for tags: CostCenter, Environment, Password, created_by. .............. ap-south-1 138434731234
  OK   : steampipe-prohibited-tag-jun23 has expected tag values for tags: CostCenter, Environment, Password, created_by. .... us-east-1 138434731234
  SKIP : rk-macie-test-bucket has no tags. .................................................................................. us-east-1 138434734632
  SKIP : delete-expected-tag-values-no-tags has no tags. .................................................................... us-east-1 138434731234