Skip to content

Commit fff9cf6

Browse files
authored
fix(ecr): incorrect format for rule pattern (#29243)
Closes #29225. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 491434e commit fff9cf6

File tree

11 files changed

+436
-54
lines changed

11 files changed

+436
-54
lines changed

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/aws-ecr-integ-stack.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/aws-ecr-integ-stack.template.json

+107-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
"UpdateReplacePolicy": "Retain",
2323
"DeletionPolicy": "Retain"
2424
},
25-
"MyUserDC45028B": {
25+
"MyIamUser046086A4": {
2626
"Type": "AWS::IAM::User"
2727
},
28-
"MyUserDefaultPolicy7B897426": {
28+
"MyIamUserDefaultPolicy4B9C0A95": {
2929
"Type": "AWS::IAM::Policy",
3030
"Properties": {
3131
"PolicyDocument": {
@@ -58,10 +58,10 @@
5858
],
5959
"Version": "2012-10-17"
6060
},
61-
"PolicyName": "MyUserDefaultPolicy7B897426",
61+
"PolicyName": "MyIamUserDefaultPolicy4B9C0A95",
6262
"Users": [
6363
{
64-
"Ref": "MyUserDC45028B"
64+
"Ref": "MyIamUser046086A4"
6565
}
6666
]
6767
}
@@ -73,6 +73,109 @@
7373
},
7474
"UpdateReplacePolicy": "Delete",
7575
"DeletionPolicy": "Delete"
76+
},
77+
"RepoOnEvent13B6ADDB": {
78+
"Type": "AWS::ECR::Repository",
79+
"UpdateReplacePolicy": "Retain",
80+
"DeletionPolicy": "Retain"
81+
},
82+
"RepoOnEventOnEventTargetLambda2934FA99": {
83+
"Type": "AWS::Events::Rule",
84+
"Properties": {
85+
"EventPattern": {
86+
"source": [
87+
"aws.ecr"
88+
],
89+
"detail": {
90+
"repository-name": [
91+
{
92+
"Ref": "RepoOnEvent13B6ADDB"
93+
}
94+
]
95+
}
96+
},
97+
"State": "ENABLED",
98+
"Targets": [
99+
{
100+
"Arn": {
101+
"Fn::GetAtt": [
102+
"LambdaFunctionBF21E41F",
103+
"Arn"
104+
]
105+
},
106+
"Id": "Target0"
107+
}
108+
]
109+
}
110+
},
111+
"RepoOnEventOnEventTargetLambdaAllowEventRuleawsecrintegstackLambdaFunctionB6045AA7FBA3AA33": {
112+
"Type": "AWS::Lambda::Permission",
113+
"Properties": {
114+
"Action": "lambda:InvokeFunction",
115+
"FunctionName": {
116+
"Fn::GetAtt": [
117+
"LambdaFunctionBF21E41F",
118+
"Arn"
119+
]
120+
},
121+
"Principal": "events.amazonaws.com",
122+
"SourceArn": {
123+
"Fn::GetAtt": [
124+
"RepoOnEventOnEventTargetLambda2934FA99",
125+
"Arn"
126+
]
127+
}
128+
}
129+
},
130+
"LambdaFunctionServiceRoleC555A460": {
131+
"Type": "AWS::IAM::Role",
132+
"Properties": {
133+
"AssumeRolePolicyDocument": {
134+
"Statement": [
135+
{
136+
"Action": "sts:AssumeRole",
137+
"Effect": "Allow",
138+
"Principal": {
139+
"Service": "lambda.amazonaws.com"
140+
}
141+
}
142+
],
143+
"Version": "2012-10-17"
144+
},
145+
"ManagedPolicyArns": [
146+
{
147+
"Fn::Join": [
148+
"",
149+
[
150+
"arn:",
151+
{
152+
"Ref": "AWS::Partition"
153+
},
154+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
155+
]
156+
]
157+
}
158+
]
159+
}
160+
},
161+
"LambdaFunctionBF21E41F": {
162+
"Type": "AWS::Lambda::Function",
163+
"Properties": {
164+
"Code": {
165+
"ZipFile": "# dummy func"
166+
},
167+
"Handler": "index.handler",
168+
"Role": {
169+
"Fn::GetAtt": [
170+
"LambdaFunctionServiceRoleC555A460",
171+
"Arn"
172+
]
173+
},
174+
"Runtime": "python3.12"
175+
},
176+
"DependsOn": [
177+
"LambdaFunctionServiceRoleC555A460"
178+
]
76179
}
77180
},
78181
"Outputs": {

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/cdkecrintegtestbasicDefaultTestDeployAssert4F7FBFB4.assets.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-ecr/test/integ.basic.js.snapshot/manifest.json

+36-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)