File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 2525from compose_x_common .aws .sqs import SQS_QUEUE_ARN_RE
2626from compose_x_common .aws .ssm_parameter import SSM_PARAMETER_ARN_RE
2727from compose_x_common .aws .vpc import SUBNET_ARN_RE , VPC_ARN_RE
28+ from compose_x_common .aws .wafv2 import WAF_V2_WEB_ACL_ARN_RE
2829
2930ARNS_PER_CFN_TYPE = {
3031 "AWS::IAM::Role" : IAM_ROLE_ARN_RE ,
6162 "AWS::MSK::ServerlessCluster" : MSK_CLUSTER_ARN_RE ,
6263 "AWS::Glue::Registry" : GLUE_SR_ARN_RE ,
6364 "AWS::APS::Workspace" : APS_WORKSPACE_ARN_RE ,
65+ "AWS::WAFv2::WebACL" : WAF_V2_WEB_ACL_ARN_RE ,
6466}
6567
6668ARNS_PER_TAGGINGAPI_TYPE = {
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: MPL-2.0
2+ # Copyright 2020-2023 John Mille <[email protected] > 3+
4+ """AWS::WAFv2::"""
5+
6+ import re
7+
8+ WAF_V2_WEB_ACL_ARN_RE = re .compile (
9+ r"^arn:aws(?P<partition>-[a-z]+)?:wafv2:(?P<region>[a-z\d\-]+-\d):(?P<accountid>[\d]{12}):"
10+ r"(?P<scope>regional|global)/webacl/(?P<name>[\w\-_]+)/(?P<id>[\S]+)$"
11+ )
12+
13+ WAF_V2_WEB_ACL_REF_RE = re .compile (
14+ r"^(?P<name>[\w\-_]+)\|(?P<id>[\w\-]+)\|(?P<scope>REGIONAL|GLOBAL)$"
15+ )
16+ WAF_V2_WEB_ACL_NAMESPACE_PREFIX_RE = re .compile (
17+ r"^awswaf:\d{12}:webacl:(?P<name>[\w\-_]+):"
18+ )
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ def valid_arns():
3838 "AWS::MSK::ServerlessCluster" : "arn:aws:kafka:eu-west-1:123456789012:cluster/demo-cluster-1/d7e68213-0896-4839-80df-dea01b79750c-s1" ,
3939 "AWS::MSK::Configuration" : "arn:aws:kafka:eu-west-1:123456789012:configuration/default-msk-331/e44a32b9-4cba-4686-a1e4-b0e72fb1baa4-8" ,
4040 "AWS::Glue::Registry" : "arn:aws:glue:us-east-2:012345678912:registry/registryname-1" ,
41+ "AWS::WAFv2::WebACL" : "arn:aws:wafv2:eu-west-1:012345678912:regional/webacl/wafv2-webacl-dev/732c1718-ea9f-4370-a2a9-607f948a3cd7" ,
4142 }
4243
4344
You can’t perform that action at this time.
0 commit comments