File tree 2 files changed +29
-1
lines changed
src/cfnlint/rules/resources
test/fixtures/templates/good/resources/properties
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ class HardCodedArnProperties(CloudFormationLintRule):
24
24
)
25
25
source_url = ""
26
26
tags = ["resources" ]
27
+ # using \r\n inside ${ } because there can be spaces in the sub parameter naming
28
+ # using \s for matching outside of Sub parameters as no space will work
27
29
regex = re .compile (
28
- r"arn:(\$\{[^:]*::[^:]*}|[^:]*):[^:]+:(\$\{[^:]*::[^:]*}|[^:]*):(\$\{[^:]*::[^:]*}|[^:]*)"
30
+ r"arn:(\$\{[^:\r\n ]*::[^:\r\n ]*}|[^:\s ]*):[^:\s ]+:(\$\{[^:\r\n ]*::[^:\r\n ]*}|[^:\s ]*):(\$\{[^:\r\n ]*::[^:\r\n ]*}|[^:\s ]*)"
29
31
)
30
32
31
33
def __init__ (self ):
Original file line number Diff line number Diff line change 1
1
AWSTemplateFormatVersion : 2010-09-09
2
2
Transform : AWS::Serverless-2016-10-31
3
+ Parameters :
4
+ DynamoDBTableArn :
5
+ Description : " DynamoDB Table ARN"
6
+ Type : String
3
7
Resources :
4
8
S3BadBucket :
5
9
Type : AWS::S3::Bucket
@@ -78,3 +82,25 @@ Resources:
78
82
- !Sub arn:${AWS::Partition}:sns:${AWS::Partition}:${AWS::AccountId}:TestTopic
79
83
Roles :
80
84
- !Ref SampleRole
85
+
86
+ IngestionPipeline :
87
+ Type : AWS::OSIS::Pipeline
88
+ Properties :
89
+ PipelineName : mypipeline
90
+ MaxUnits : 1
91
+ MinUnits : 1
92
+ PipelineConfigurationBody : !Sub |
93
+ version: "2"
94
+ dynamodb-pipeline:
95
+ source:
96
+ dynamodb:
97
+ acknowledgments: true
98
+ tables:
99
+ - table_arn: ${DynamoDBTableArn}
100
+ - export:
101
+ s3_bucket: mybucket
102
+ s3_prefix: prod
103
+ stream:
104
+ start_position: "LATEST"
105
+ aws:
106
+ region: us-east-1
You can’t perform that action at this time.
0 commit comments