-
Notifications
You must be signed in to change notification settings - Fork 40
/
pipelineDeploymentRole.yml
56 lines (52 loc) · 1.63 KB
/
pipelineDeploymentRole.yml
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
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# https://aws.amazon.com/agreement
# SPDX-License-Identifier: MIT-0
AWSTemplateFormatVersion: 2010-09-09
Description: Deploy the Pipeline Deployment Role
Parameters:
pToolingAcountId: # AWS Tooling Account Id
Type: String
Description: AWS Tooling Account Id
Metadata: # Parameter Organization on the CloudFormation Interface
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Stack Parameters
Parameters:
- pToolingAcountId
Resources:
rPipelineDeploymentRole:
Type: AWS::IAM::Role
Properties:
RoleName: PipelineDeploymentRole
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
AWS: !Ref pToolingAcountId
Service:
- codepipeline.amazonaws.com
- codebuild.amazonaws.com
- cloudformation.amazonaws.com
- states.amazonaws.com
Path: /
Policies:
- PolicyName: AWSCodePipelineServiceRolePolicy
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
NotAction:
- iam:*
- organizations:*
- account:*
Resource: "*"
- Effect: Allow
Action:
- iam:*Role*
- iam:*Policy*
- organizations:DescribeOrganization
- account:ListRegions
Resource: "*"