-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.yml
99 lines (89 loc) · 2.6 KB
/
init.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
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
AWSTemplateFormatVersion: '2010-09-09'
Resources:
TemplateBucket:
Type: AWS::S3::Bucket
CloudformationRole:
Type: AWS::IAM::Role
Properties:
RoleName: cloudformation-cloud9-role
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Principal:
Service: cloudformation.amazonaws.com
Action: sts:AssumeRole
Path: /
Policies:
-
PolicyName: cloudformation-cloud9-policy
PolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Deny
Action:
- 'budgets:*'
- 'aws-portal:*'
Resource: '*'
-
Effect: Allow
Action: '*'
Resource: '*'
CloudformationUser:
Type: AWS::IAM::User
Properties:
UserName: cloudformation
Policies:
-
PolicyName: cloudformation-cloud9-policy
PolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Action:
- cloudformation:*
Resource: '*'
-
Effect: Allow
Action: iam:PassRole
Resource: !GetAtt CloudformationRole.Arn
-
Effect: Allow
Action: s3:*
Resource:
- !Sub 'arn:aws:s3:::${TemplateBucket}'
- !Sub 'arn:aws:s3:::${TemplateBucket}/*'
-
Effect: Allow
Action:
- iam:GetServiceLinkedRoleDeletionStatus
- iam:CreateServiceLinkedRole
- iam:DeleteServiceLinkedRole
- iam:GetServiceLastAccessedDetails
Resource: '*'
-
Effect: Allow
Action:
- ec2:*
Resource: '*'
CloudFormationUserAccessKey:
Type: AWS::IAM::AccessKey
Properties:
Status: Active
UserName: !Ref CloudformationUser
Outputs:
TemplateBucket:
Description: 'Template Bucket'
Value: !Ref TemplateBucket
CloudformationRole:
Description: 'Cloudformation Role ARN'
Value: !GetAtt CloudformationRole.Arn
CloudformationAccessKey:
Description: 'Cloudformation User Access Key'
Value: !Ref CloudFormationUserAccessKey
CloudformationSecretKey:
Description: 'Cloudformation User Secret Key'
Value: !GetAtt CloudFormationUserAccessKey.SecretAccessKey