Skip to content

Commit

Permalink
fix(ecr): incorrect format for rule pattern (#29243)
Browse files Browse the repository at this point in the history
Closes #29225. 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
msambol committed May 3, 2024
1 parent 491434e commit fff9cf6
Show file tree
Hide file tree
Showing 11 changed files with 436 additions and 54 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"MyUserDC45028B": {
"MyIamUser046086A4": {
"Type": "AWS::IAM::User"
},
"MyUserDefaultPolicy7B897426": {
"MyIamUserDefaultPolicy4B9C0A95": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
Expand Down Expand Up @@ -58,10 +58,10 @@
],
"Version": "2012-10-17"
},
"PolicyName": "MyUserDefaultPolicy7B897426",
"PolicyName": "MyIamUserDefaultPolicy4B9C0A95",
"Users": [
{
"Ref": "MyUserDC45028B"
"Ref": "MyIamUser046086A4"
}
]
}
Expand All @@ -73,6 +73,109 @@
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"RepoOnEvent13B6ADDB": {
"Type": "AWS::ECR::Repository",
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"RepoOnEventOnEventTargetLambda2934FA99": {
"Type": "AWS::Events::Rule",
"Properties": {
"EventPattern": {
"source": [
"aws.ecr"
],
"detail": {
"repository-name": [
{
"Ref": "RepoOnEvent13B6ADDB"
}
]
}
},
"State": "ENABLED",
"Targets": [
{
"Arn": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
"Id": "Target0"
}
]
}
},
"RepoOnEventOnEventTargetLambdaAllowEventRuleawsecrintegstackLambdaFunctionB6045AA7FBA3AA33": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
"Principal": "events.amazonaws.com",
"SourceArn": {
"Fn::GetAtt": [
"RepoOnEventOnEventTargetLambda2934FA99",
"Arn"
]
}
}
},
"LambdaFunctionServiceRoleC555A460": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"LambdaFunctionBF21E41F": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "# dummy func"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"LambdaFunctionServiceRoleC555A460",
"Arn"
]
},
"Runtime": "python3.12"
},
"DependsOn": [
"LambdaFunctionServiceRoleC555A460"
]
}
},
"Outputs": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fff9cf6

Please sign in to comment.