Skip to content

Commit 8f4e25e

Browse files
Enrico Usaienrico-usai
authored andcommitted
Ignore W8003 from CFN linter for CW Dashboard substack
In the rendered template we have a condition checking if a parameter is true. The parameter is set to true only when the feature is enabled, the warning is a false positive in this case. Signed-off-by: Enrico Usai <[email protected]>
1 parent 364b54c commit 8f4e25e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cloudformation/tests/test_cfn_template_rendering.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def substack_rendering(tmp_path, template_name, test_config):
2727

2828
# Run cfn-lint
2929
cfn_lint_args = ["--info", str(rendered_file)] # TODO "-i", "W2001" could be added to ignore unused vars
30+
31+
if "cw-dashboard-substack.cfn" in template_name:
32+
# Ignore W8003 "Fn::Equals element will always return false"
33+
# because this mechanism is used to enable/disable CW logging through a condition in the rendered template
34+
cfn_lint_args.extend(["-i", "W8003"])
35+
3036
with patch.object(sys, "argv", cfn_lint_args):
3137
assert cfnlint() == 0
3238

0 commit comments

Comments
 (0)