-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservicecatalog-pipeline-role-child-account.yaml
105 lines (104 loc) · 4.09 KB
/
servicecatalog-pipeline-role-child-account.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Description: >-
Integrate CodeCommit with CodePipeline to orchestrate a CodeDeploy deployment.
AWSTemplateFormatVersion: 2010-09-09
Parameters:
KMSCrossAccount:
Description: KMS for pipeline cross-account
Type: String
Resources:
CodePipelineRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: CodePipelineRole
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
AWS: 'arn:aws:iam::999999999999:root'
Service:
- codepipeline.amazonaws.com
- cloudformation.amazonaws.com
Action:
- 'sts:AssumeRole'
Path: /
Policies:
- PolicyName: codepipeline-service
PolicyDocument:
Statement:
- Action:
- 'opsworks:DescribeStacks'
- 'rds:*'
- 'devicefarm:GetRun'
- 'cloudformation:CreateChangeSet'
- 'autoscaling:*'
- 'codebuild:BatchGetBuilds'
- 'servicecatalog:ListProvisioningArtifacts'
- 'devicefarm:ScheduleRun'
- 'devicefarm:ListDevicePools'
- 'cloudformation:UpdateStack'
- 'servicecatalog:DescribeProvisioningArtifact'
- 'cloudformation:DescribeChangeSet'
- 'cloudformation:ExecuteChangeSet'
- 'devicefarm:ListProjects'
- 'sns:*'
- 'lambda:ListFunctions'
- 'lambda:InvokeFunction'
- 'codedeploy:RegisterApplicationRevision'
- 'opsworks:DescribeDeployments'
- 'devicefarm:CreateUpload'
- 'cloudformation:*'
- 'cloudformation:DescribeStacks'
- 'codecommit:GetUploadArchiveStatus'
- 'cloudwatch:*'
- 'opsworks:DescribeInstances'
- 'cloudformation:DeleteStack'
- 'ecs:*'
- 'ecr:DescribeImages'
- 'ec2:*'
- 'servicecatalog:*'
- 'codebuild:StartBuild'
- 'opsworks:DescribeApps'
- 'opsworks:UpdateStack'
- 'cloudformation:ValidateTemplate'
- 'codedeploy:CreateDeployment'
- 'codedeploy:GetApplicationRevision'
- 'codedeploy:GetDeploymentConfig'
- 'servicecatalog:CreateProvisioningArtifact'
- 'sqs:*'
- 'cloudformation:DeleteChangeSet'
- 'iam:PassRole'
- 'codecommit:GetCommit'
- 'servicecatalog:DeleteProvisioningArtifact'
- 'codedeploy:GetApplication'
- 'cloudformation:SetStackPolicy'
- 'codecommit:UploadArchive'
- 's3:*'
- 'elasticloadbalancing:*'
- 'codecommit:CancelUploadArchive'
- 'devicefarm:GetUpload'
- 'elasticbeanstalk:*'
- 'opsworks:UpdateApp'
- 'opsworks:CreateDeployment'
- 'cloudformation:CreateStack'
- 'servicecatalog:UpdateProduct'
- 'codecommit:GetBranch'
- 'codedeploy:GetDeployment'
- 'opsworks:DescribeCommands'
- 'iam:CreateRole'
- 'iam:DeleteRole'
- 'iam:DeleteRolePolicy'
- 'iam:PutRolePolicy'
- 'iam:GetRole'
- 'iam:DetachRolePolicy'
- 'iam:AttachRolePolicy'
- 'iam:GetRolePolicy'
- 'iam:DetachRolePolicy'
Resource: '*'
Effect: Allow
- Action:
- 'iam:GetRole'
- 'kms:Decrypt'
Resource:
- 'arn:aws:iam::*:role/gre-admins'
- !Sub arn:aws:kms:eu-west-3:999999999999:key/${KMSCrossAccount}
Effect: Allow