Skip to content

Commit

Permalink
Merge pull request #5 from taoyong-ty/main
Browse files Browse the repository at this point in the history
Add Compute-Actions logs permissions to CodePipelineDefaultPolicy
  • Loading branch information
ZoeSang authored Nov 12, 2024
2 parents 757a303 + 83e7d82 commit ba5cdff
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 0 deletions.
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-build-gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-build-maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-build-nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-schedule-build-gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-schedule-build-maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-schedule-build-nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/ci-schedule-build-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/deploy-to-cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,18 @@ Resources:
- /
- - !GetAtt CodePipelineArtifactsBucket.Arn
- '*'
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CloudFormationDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/deploy-to-ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,18 @@ Resources:
Resource:
- !GetAtt CodeBuildActionRole.Arn
- !GetAtt CodeConnectionsActionRole.Arn
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDefaultPolicy
Roles:
Expand Down
12 changes: 12 additions & 0 deletions templates/cloudformation/deploy-to-ecs-fargate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,18 @@ Resources:
- ''
- - !GetAtt CodePipelineArtifactsBucket.Arn
- /*
- Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource:
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}
- pipelineName: !Ref CodePipelineName
- !Sub
- arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codepipeline/${pipelineName}:*
- pipelineName: !Ref CodePipelineName
Version: '2012-10-17'
PolicyName: CodePipelineDeployActionRoleDefaultPolicy
Roles:
Expand Down

0 comments on commit ba5cdff

Please sign in to comment.