forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCidr.py
More file actions
26 lines (20 loc) · 729 Bytes
/
Cidr.py
File metadata and controls
26 lines (20 loc) · 729 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
class Cidr(BaseFn):
"""Check if Cidr values are correct"""
id = "E1024"
shortdesc = "Cidr validation of parameters"
description = "Making sure the function CIDR is a list with valid values"
source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-cidr.html"
tags = ["functions", "cidr"]
def __init__(self) -> None:
super().__init__(
"Fn::Cidr",
("array",),
None,
)
self.fn_cidr = self.validate