forked from org-formation/org-formation-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
organization.yml
197 lines (180 loc) · 5.52 KB
/
organization.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
AWSTemplateFormatVersion: '2010-09-09-OC'
Description: default template generated for organization with master account 507468909204
Organization:
MasterAccount:
Type: OC::ORG::MasterAccount
Properties:
Alias: org-formation-master
RootEmail: [email protected]
AccountName: oc test account 2
AccountId: '507468909204'
PasswordPolicy: !Ref PasswordPolicy
Tags:
budget-alarm-threshold: 200
account-owner-email: [email protected]
OrganizationRoot:
Type: OC::ORG::OrganizationRoot
Properties:
ServiceControlPolicies:
- !Ref DenyChangeOfOrgRoleSCP
- !Ref RestrictUnusedRegionsSCP
ProductionOU:
Type: OC::ORG::OrganizationalUnit
Properties:
OrganizationalUnitName: production
Accounts:
- !Ref Production1Account
DevelopmentOU:
Type: OC::ORG::OrganizationalUnit
Properties:
OrganizationalUnitName: development
Accounts:
- !Ref DevelopmentAccount
- !Ref Development2Account
- !Ref Development3Account
- !Ref Development4Account
SharedOU:
Type: OC::ORG::OrganizationalUnit
Properties:
OrganizationalUnitName: shared
Accounts:
- !Ref SharedUsersAccount
- !Ref SharedServicesAccount
- !Ref SharedComplianceAccount
SharedUsersAccount:
Type: OC::ORG::Account
Properties:
RootEmail: [email protected]
Alias: org-formation-users
AccountName: Shared Users Account
PasswordPolicy: !Ref PasswordPolicy
Tags:
budget-alarm-threshold: '100'
account-owner-email: [email protected]
SharedServicesAccount:
Type: OC::ORG::Account
Properties:
Alias: org-formation-services
AccountName: Shared Services Account
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '22'
account-owner-email: [email protected]
SharedComplianceAccount:
Type: OC::ORG::Account
Properties:
Alias: org-formation-compliance
AccountName: Shared Compliance Account
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '200'
account-owner-email: [email protected]
DevelopmentAccount:
Type: OC::ORG::Account
Properties:
Alias: org-formation-dev
AccountName: Development Account
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '200'
account-owner-email: [email protected]
subdomain: development1
Development2Account:
Type: OC::ORG::Account
Properties:
Alias: org-formation-dev2
AccountName: Development Account 2
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '200'
account-owner-email: [email protected]
Development3Account:
Type: OC::ORG::Account
Properties:
Alias: org-formation-dev3
AccountName: Development Account 3
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '200'
account-owner-email: [email protected]
Development4Account:
Type: OC::ORG::Account
Properties:
Alias: org-formation-dev4
AccountName: Development Account 4
RootEmail: [email protected]
Tags:
budget-alarm-threshold: '200'
account-owner-email: [email protected]
Production1Account:
Type: OC::ORG::Account
Properties:
AccountName: Production 1 Account
RootEmail: [email protected]
Alias: my-production1
Tags:
budget-alarm-threshold: '100'
account-owner-email: [email protected]
subdomain: production1
Production2Account:
Type: OC::ORG::Account
Properties:
AccountName: Production 2 Account
RootEmail: [email protected]
Alias: my-production2
Tags:
budget-alarm-threshold: '100'
account-owner-email: [email protected]
DenyChangeOfOrgRoleSCP:
Type: OC::ORG::ServiceControlPolicy
Properties:
PolicyName: DenyChangeOfOrgRole
Description: Deny changing the IAM role used for organization access
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: DenyChangeOfOrgRole
Effect: Deny
Action:
- 'iam:Attach*'
- 'iam:Create*'
- 'iam:Delete*'
- 'iam:Detach*'
- 'iam:PutRole*'
- 'iam:Update*'
Resource:
- 'arn:aws:iam::*:role/OrganizationAccountAccessRole'
RestrictUnusedRegionsSCP:
Type: OC::ORG::ServiceControlPolicy
Properties:
PolicyName: RestrictUnusedRegions
Description: Restrict Unused regions
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: DenyUnsupportedRegions
Effect: Deny
NotAction:
- 'cloudfront:*'
- 'iam:*'
- 'route53:*'
- 'support:*'
- 'budgets:*'
Resource: '*'
Condition:
StringNotEquals:
'aws:RequestedRegion':
- eu-west-1
- us-east-1
- eu-central-1
PasswordPolicy:
Type: OC::ORG::PasswordPolicy
Properties:
MaxPasswordAge: 30
MinimumPasswordLength: 12
RequireLowercaseCharacters: true
RequireNumbers: true
RequireSymbols: true
RequireUppercaseCharacters: true
PasswordReusePrevention: 5
AllowUsersToChangePassword: true