aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.4k stars 576 forks source link

Fix tagging examples #3448

Closed michael-k closed 4 days ago

michael-k commented 4 days ago

Issue #, if available: n/a

Description of changes: The examples no longer worked with cfn-lint v1. The PropertiesTagsRequired probably didn't work with v0 either, because it didn't account for resources that use objects as tags, eg. AWS::SSM::Parameter.

Instead of "Tags" in schema.schema["properties"] I wanted to use (schema.schema.get("tagging") or {}).get("taggable"), but that doesn't work with AWS::ApiGatewayV2::Stage ("tagging" not in schema.schema, but the resource supports tags). Happend to have that resource in our test suite, there might be more where this doesn't work. (See also this message at discord.)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.29%. Comparing base (3724d31) to head (8106318).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3448 +/- ## ========================================== - Coverage 93.30% 93.29% -0.01% ========================================== Files 324 324 Lines 11055 11055 Branches 2316 2316 ========================================== - Hits 10315 10314 -1 Misses 415 415 - Partials 325 326 +1 ``` | [Flag](https://app.codecov.io/gh/aws-cloudformation/cfn-lint/pull/3448/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/aws-cloudformation/cfn-lint/pull/3448/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.