forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindInMap.py
More file actions
26 lines (20 loc) · 816 Bytes
/
FindInMap.py
File metadata and controls
26 lines (20 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
from __future__ import annotations
from cfnlint.rules.functions._BaseFn import BaseFn, singular_types
class FindInMap(BaseFn):
"""Check if FindInMap values are correct"""
id = "E1011"
shortdesc = "FindInMap validation of configuration"
description = "Making sure the function is a list of appropriate config"
source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html"
tags = ["functions", "findinmap"]
def __init__(self) -> None:
super().__init__(
"Fn::FindInMap",
("array",) + singular_types,
resolved_rule="W1034",
)
self.fn_findinmap = self.validate