aws-data-landing-zone 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +141 -161
- package/API.md +62 -642
- package/docs/.env.development +3 -0
- package/docs/astro.config.ts +92 -74
- package/docs/cloudflare_build.sh +9 -0
- package/docs/package-lock.json +17 -0
- package/docs/package.json +5 -1
- package/docs/src/components/Footer.astro +2 -2
- package/docs/src/content/docs/components/account-management/introduction.mdx +0 -80
- package/docs/src/content/docs/components/build-system/ci-integration.mdx +336 -0
- package/docs/src/content/docs/components/build-system/deployment-order.mdx +608 -0
- package/docs/src/content/docs/components/build-system/overview.mdx +37 -0
- package/docs/src/content/docs/components/identity/introduction.mdx +0 -80
- package/docs/src/content/docs/reference/api.md +21123 -0
- package/docs/src/styles/custom.css +3 -5
- package/lib/constructs/account-chatbots/index.js +1 -1
- package/lib/constructs/dlz-budget/index.js +1 -1
- package/lib/constructs/dlz-control-tower-control/control-tower-control.js +1 -1
- package/lib/constructs/dlz-lake-formation/dlz-lake-formation.js +1 -1
- package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader-stack-cache.js +1 -1
- package/lib/constructs/dlz-ssm-reader/dlz-ssm-reader.js +1 -1
- package/lib/constructs/dlz-stack/index.d.ts +13 -0
- package/lib/constructs/dlz-stack/index.js +17 -2
- package/lib/constructs/dlz-vpc/dlz-account-networks.js +1 -1
- package/lib/constructs/dlz-vpc/dlz-vpc.js +1 -1
- package/lib/constructs/dlz-vpc/network-address.js +1 -1
- package/lib/constructs/iam-identity-center/iam-identity-center-group.js +1 -1
- package/lib/constructs/iam-identity-center/iam-identity-center.js +1 -1
- package/lib/constructs/iam-identity-center/identity-store-user.js +1 -1
- package/lib/constructs/organization-policies/service-control-policy.js +1 -1
- package/lib/constructs/organization-policies/tag-policy.js +1 -1
- package/lib/data-landing-zone-client.js +1 -1
- package/lib/data-landing-zone-types.d.ts +18 -4
- package/lib/data-landing-zone-types.js +1 -1
- package/lib/data-landing-zone.js +61 -63
- package/lib/defaults.js +1 -1
- package/lib/lib/report/index.js +1 -1
- package/lib/stacks/organization/management-stack.js +1 -1
- package/lib/stacks/organization/security/audit/global-stack.js +1 -1
- package/lib/stacks/organization/security/audit/regional-stack.js +1 -1
- package/lib/stacks/organization/security/log/global-stack.js +1 -1
- package/lib/stacks/organization/security/log/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/base/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/base/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/data-services-phase-1-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/data-services-phase-1-stack/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-1-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-2-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-2-stack/regional-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-3-stack/global-stack.js +1 -1
- package/lib/stacks/organization/workloads/network-connections-phase-3-stack/regional-stack.js +1 -1
- package/no-op-force-build.txt +1 -0
- package/package.json +1 -1
- package/post-docgen.sh +10 -0
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Deployment Order
|
|
3
|
+
description: Build System - Deployment Order
|
|
4
|
+
---
|
|
5
|
+
import DualCode from '../../../../components/DualCode.astro';
|
|
6
|
+
|
|
7
|
+
## Deployment Order
|
|
8
|
+
|
|
9
|
+
The [cdk-express-pipeline](https://github.com/rehanvdm/cdk-express-pipeline) is utilized to create Waves and Stages,
|
|
10
|
+
enabling the controlled deployment of resources. This enables deployments from any build
|
|
11
|
+
systems, like GitHub, GitLab, Jenkins, and even local environments.
|
|
12
|
+
|
|
13
|
+
Internally, the DLZ creates `phases`, which is a collection of `waves`. Each `phase` typically consists of a
|
|
14
|
+
`global` `wave` and optionally one or more `regional` `waves` which are deployed sequentially. Waves contains `stages`
|
|
15
|
+
which are groupings of `stacks` deployed in parallel. For the DLZ the `stage` and dependencies between `stacks` within
|
|
16
|
+
the same `stage` are of little importance as we rely on `waves` only.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
The regions are defined in the `config`, you can only have a single Global region and optionally one or more Regions.
|
|
20
|
+
<DualCode>
|
|
21
|
+
<Fragment slot="ts">
|
|
22
|
+
```ts
|
|
23
|
+
const dlz = new DataLandingZone(app, {
|
|
24
|
+
...
|
|
25
|
+
regions: {
|
|
26
|
+
global: Region.EU_WEST_1,
|
|
27
|
+
regional: [Region.US_EAST_1],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
</Fragment>
|
|
32
|
+
<Fragment slot="python">
|
|
33
|
+
```python
|
|
34
|
+
dlz.DataLandingZone(app,
|
|
35
|
+
...
|
|
36
|
+
regions=dlz.DlzRegions(
|
|
37
|
+
global_=dlz.Region.EU_WEST_1,
|
|
38
|
+
regional=[dlz.Region.US_EAST_1],
|
|
39
|
+
),
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
</Fragment>
|
|
43
|
+
</DualCode>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
To recap:
|
|
47
|
+
|
|
48
|
+
- `Phase` - A collection of `Waves`, this is a logical grouping only, and not implemented in code. Deployed sequentially, one after the other.
|
|
49
|
+
- `Wave` - A collection of `Stages`. Deployed sequentially, one after the other.
|
|
50
|
+
- `Stage` - A collection of `Stacks`. Deployed in parallel.
|
|
51
|
+
- `Stack` - A collection of ` AWS resources`. Deployed in parallel when possible as determined by stack dependencies within the `Stage`.
|
|
52
|
+
|
|
53
|
+
```mermaid
|
|
54
|
+
graph
|
|
55
|
+
subgraph base["Phase"]
|
|
56
|
+
direction TB
|
|
57
|
+
|
|
58
|
+
subgraph global["Wave"]
|
|
59
|
+
direction TB
|
|
60
|
+
subgraph globalAccountN["Stage"]
|
|
61
|
+
direction TB
|
|
62
|
+
gan["Stack"]
|
|
63
|
+
end
|
|
64
|
+
subgraph globalAccountB["Stage"]
|
|
65
|
+
direction TB
|
|
66
|
+
gab["Stack"]
|
|
67
|
+
end
|
|
68
|
+
subgraph globalAccountA["Stage"]
|
|
69
|
+
direction TB
|
|
70
|
+
gaa["Stack"]
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
subgraph regional["Wave"]
|
|
75
|
+
direction TB
|
|
76
|
+
subgraph regionalAccountN["Stage"]
|
|
77
|
+
ran1["Stack 1"]
|
|
78
|
+
ran2["Stack 2"]
|
|
79
|
+
end
|
|
80
|
+
subgraph regionalAccountB["Stage"]
|
|
81
|
+
rab1["Stack 1"]
|
|
82
|
+
rab2["Stack 2"]
|
|
83
|
+
end
|
|
84
|
+
subgraph regionalAccountA["Stage"]
|
|
85
|
+
raa1["Stack 1"]
|
|
86
|
+
raa2["Stack 2"]
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
global --> regional
|
|
90
|
+
end
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## General structure
|
|
94
|
+
|
|
95
|
+
Conceptually the DLZ deployment order has the following structure:
|
|
96
|
+
|
|
97
|
+
```mermaid
|
|
98
|
+
graph
|
|
99
|
+
subgraph root["Root Phase"]
|
|
100
|
+
direction TB
|
|
101
|
+
subgraph rootGlobalWave["Global Wave"]
|
|
102
|
+
direction TB
|
|
103
|
+
subgraph rootAGlobalAccount["Root Account"]
|
|
104
|
+
direction LR
|
|
105
|
+
rootG["Global Stack"]
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
subgraph secOuA["Security OU - Audit Phase"]
|
|
111
|
+
direction TB
|
|
112
|
+
subgraph secOuAGlobal["Global Wave"]
|
|
113
|
+
direction TB
|
|
114
|
+
subgraph secOuAGlobalAccount["Audit Account"]
|
|
115
|
+
direction LR
|
|
116
|
+
secOuAG["Global Stack"]
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
%% subgraph secOuARegional["Regional Wave"]
|
|
120
|
+
%% direction TB
|
|
121
|
+
%% subgraph secOuARegionalAccount["Audit Account"]
|
|
122
|
+
%% direction LR
|
|
123
|
+
%% secOuARn["Regional Stack (...N)"]
|
|
124
|
+
%% end
|
|
125
|
+
%% end
|
|
126
|
+
%% secOuAGlobal --> secOuARegional
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
%% subgraph secOuL["Security OU - Log Phase"]
|
|
130
|
+
%% direction TB
|
|
131
|
+
%% subgraph secOuLGlobal["Global Wave"]
|
|
132
|
+
%% direction TB
|
|
133
|
+
%% subgraph secOuLGlobalAccount["Log Account"]
|
|
134
|
+
%% direction LR
|
|
135
|
+
%% secOuLG["Global Stack"]
|
|
136
|
+
%% end
|
|
137
|
+
%% end
|
|
138
|
+
%% subgraph secOuLRegional["Regional Wave"]
|
|
139
|
+
%% direction TB
|
|
140
|
+
%% subgraph secOuLRegionalAccount["Log Account"]
|
|
141
|
+
%% direction LR
|
|
142
|
+
%% secOuLRn["Regional Stack (...N)"]
|
|
143
|
+
%% end
|
|
144
|
+
%% end
|
|
145
|
+
%% secOuLGlobal --> secOuLRegional
|
|
146
|
+
%% end
|
|
147
|
+
|
|
148
|
+
subgraph base["Workload OU - Base Phase"]
|
|
149
|
+
direction TB
|
|
150
|
+
subgraph global["Global Wave"]
|
|
151
|
+
direction TB
|
|
152
|
+
subgraph globalAccountN["Account ...N"]
|
|
153
|
+
direction LR
|
|
154
|
+
gan["Global Stack"]
|
|
155
|
+
end
|
|
156
|
+
subgraph globalAccountB["Account B"]
|
|
157
|
+
direction LR
|
|
158
|
+
gab["Global Stack"]
|
|
159
|
+
end
|
|
160
|
+
subgraph globalAccountA["Account A"]
|
|
161
|
+
direction LR
|
|
162
|
+
gaa["Global Stack"]
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
subgraph regional["Regional Wave"]
|
|
166
|
+
direction TB
|
|
167
|
+
subgraph regionalAccountN["Account ...N"]
|
|
168
|
+
direction LR
|
|
169
|
+
ran2["Region Stack (...N)"]
|
|
170
|
+
end
|
|
171
|
+
subgraph regionalAccountB["Account B"]
|
|
172
|
+
direction LR
|
|
173
|
+
rab2["Region Stack (...N)"]
|
|
174
|
+
end
|
|
175
|
+
subgraph regionalAccountA["Account A"]
|
|
176
|
+
direction LR
|
|
177
|
+
raa2["Region Stack (...N)"]
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
global --> regional
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
subgraph ncp1["Workload OU - NCP1 Phase"]
|
|
184
|
+
direction TB
|
|
185
|
+
subgraph ncp1G["Global Wave"]
|
|
186
|
+
direction TB
|
|
187
|
+
subgraph ncp1Gan["Account ...N"]
|
|
188
|
+
direction LR
|
|
189
|
+
ncp1Gans["Global Stack"]
|
|
190
|
+
end
|
|
191
|
+
subgraph ncp1Gaa["Account B"]
|
|
192
|
+
direction LR
|
|
193
|
+
ncp1Gaas["Global Stack"]
|
|
194
|
+
end
|
|
195
|
+
subgraph ncp1Gab["Account A"]
|
|
196
|
+
direction LR
|
|
197
|
+
ncp1Gabs["Global Stack"]
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
%% subgraph ncp1R["Regional Wave"]
|
|
201
|
+
%% direction TB
|
|
202
|
+
%% subgraph ncp1Ran["Account ...N"]
|
|
203
|
+
%% direction LR
|
|
204
|
+
%% ncp1Rans["Region Stack (...N)"]
|
|
205
|
+
%% end
|
|
206
|
+
%% subgraph ncp1Rab["Account B"]
|
|
207
|
+
%% direction LR
|
|
208
|
+
%% ncp1Rabs["Region Stack (...N)"]
|
|
209
|
+
%% end
|
|
210
|
+
%% subgraph ncp1Raa["Account A"]
|
|
211
|
+
%% direction LR
|
|
212
|
+
%% ncp1Raas["Region Stack (...N)"]
|
|
213
|
+
%% end
|
|
214
|
+
%% end
|
|
215
|
+
%% ncp1G --> ncp1R
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
subgraph ncp2["Workload OU - NCP2 Phase"]
|
|
219
|
+
direction TB
|
|
220
|
+
subgraph ncp2G["Global Wave"]
|
|
221
|
+
direction TB
|
|
222
|
+
subgraph ncp2Gan["Account ...N"]
|
|
223
|
+
direction LR
|
|
224
|
+
ncp2Gans["Global Stack"]
|
|
225
|
+
end
|
|
226
|
+
subgraph ncp2Gaa["Account B"]
|
|
227
|
+
direction LR
|
|
228
|
+
ncp2Gaas["Global Stack"]
|
|
229
|
+
end
|
|
230
|
+
subgraph ncp2Gab["Account A"]
|
|
231
|
+
direction LR
|
|
232
|
+
ncp2Gabs["Global Stack"]
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
subgraph ncp2R["Regional Wave"]
|
|
237
|
+
direction TB
|
|
238
|
+
subgraph ncp2Ran["Account ...N"]
|
|
239
|
+
direction LR
|
|
240
|
+
ncp2Rans["Region Stack (...N)"]
|
|
241
|
+
end
|
|
242
|
+
subgraph ncp2Rab["Account B"]
|
|
243
|
+
direction LR
|
|
244
|
+
ncp2Rabs["Region Stack (...N)"]
|
|
245
|
+
end
|
|
246
|
+
subgraph ncp2Raa["Account A"]
|
|
247
|
+
direction LR
|
|
248
|
+
ncp2Raas["Region Stack (...N)"]
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
ncp2G --> ncp2R
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
subgraph ncp3["Workload OU - NCP3 Phase"]
|
|
255
|
+
direction TB
|
|
256
|
+
subgraph ncp3G["Global Wave"]
|
|
257
|
+
direction TB
|
|
258
|
+
subgraph ncp3Gan["Account ...N"]
|
|
259
|
+
direction LR
|
|
260
|
+
ncp3Gans["Global Stack"]
|
|
261
|
+
end
|
|
262
|
+
subgraph ncp3Gaa["Account B"]
|
|
263
|
+
direction LR
|
|
264
|
+
ncp3Gaas["Global Stack"]
|
|
265
|
+
end
|
|
266
|
+
subgraph ncp3Gab["Account A"]
|
|
267
|
+
direction LR
|
|
268
|
+
ncp3Gabs["Global Stack"]
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
subgraph ncp3R["Regional Wave"]
|
|
272
|
+
direction TB
|
|
273
|
+
subgraph ncp3Ran["Account ...N"]
|
|
274
|
+
direction LR
|
|
275
|
+
ncp3Rans["Region Stack (...N)"]
|
|
276
|
+
end
|
|
277
|
+
subgraph ncp3Rab["Account B"]
|
|
278
|
+
direction LR
|
|
279
|
+
ncp3Rabs["Region Stack (...N)"]
|
|
280
|
+
end
|
|
281
|
+
subgraph ncp3Raa["Account A"]
|
|
282
|
+
direction LR
|
|
283
|
+
ncp3Raas["Region Stack (...N)"]
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
ncp3G --> ncp3R
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
subgraph dsp1["Workload OU - DSP1 Phase"]
|
|
290
|
+
direction TB
|
|
291
|
+
subgraph dsp1G["Global Wave"]
|
|
292
|
+
direction TB
|
|
293
|
+
subgraph dsp1Gan["Account ...N"]
|
|
294
|
+
direction LR
|
|
295
|
+
dsp1Gans["Global Stack"]
|
|
296
|
+
end
|
|
297
|
+
subgraph dsp1Gaa["Account B"]
|
|
298
|
+
direction LR
|
|
299
|
+
dsp1Gaas["Global Stack"]
|
|
300
|
+
end
|
|
301
|
+
subgraph dsp1Gab["Account A"]
|
|
302
|
+
direction LR
|
|
303
|
+
dsp1Gabs["Global Stack"]
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
subgraph dsp1R["Regional Wave"]
|
|
307
|
+
direction TB
|
|
308
|
+
subgraph dsp1Ran["Account ...N"]
|
|
309
|
+
direction LR
|
|
310
|
+
dsp1Rans["Region Stack (...N)"]
|
|
311
|
+
end
|
|
312
|
+
subgraph dsp1Rab["Account B"]
|
|
313
|
+
direction LR
|
|
314
|
+
dsp1Rabs["Region Stack (...N)"]
|
|
315
|
+
end
|
|
316
|
+
subgraph dsp1Raa["Account A"]
|
|
317
|
+
direction LR
|
|
318
|
+
dsp1Raas["Region Stack (...N)"]
|
|
319
|
+
end
|
|
320
|
+
end
|
|
321
|
+
dsp1G --> dsp1R
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
root --> secOuA
|
|
326
|
+
secOuA --> base
|
|
327
|
+
base --> ncp1
|
|
328
|
+
ncp1 --> ncp2
|
|
329
|
+
ncp2 --> ncp3
|
|
330
|
+
ncp3 --> dsp1
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
A brief description of the resources deployed in each phase:
|
|
334
|
+
|
|
335
|
+
- **Root Phase** - Deploys to the `root` account, resources like the Organisation's SCPs, and IAM Identity Center resources etc.
|
|
336
|
+
- **Security OU - Audit Phase** - Deploys to the `audit` account, resources like SecurityHub and Chatbot notifications.
|
|
337
|
+
- **Workload OU - Base Phase** - Deploys to each account specified under workloads. IAM roles, which is a global service, would for example be
|
|
338
|
+
deployed in the Global wave. While resources such as a VPCs will be deployed in both the Global and the Regional wave as per configuration.
|
|
339
|
+
The majority of the services are deployed in this phase.
|
|
340
|
+
- **Workload OU - NCP1 + NCP2 + NCP3 Phases** - NCP stands for **Network Connections Phase**, these phases are logically
|
|
341
|
+
numbered to indicate the order of deployment to control dependencies between accounts and regions. It will deploy
|
|
342
|
+
resources related to networking that require multiple steps, like VPC Peering. For example, for VPC Peering to work,
|
|
343
|
+
NCP1 defines the peering roles. NCP2 creates the peering connections, knowing that it can use the cross account roles
|
|
344
|
+
in all accounts. NCP3 creates the route table entries to allow traffic to flow between the VPCs knowing the
|
|
345
|
+
VPC peering connections have been established.
|
|
346
|
+
- **Workload OU - DSP1 Phase** - DSP is the abbreviation for **Data Services Phase**, this phase deploys resources
|
|
347
|
+
like Lake Formation, etc.
|
|
348
|
+
|
|
349
|
+
## Stacks
|
|
350
|
+
|
|
351
|
+
The printing of the deployment order can be controlled with the `printDeploymentOrder` flag. When set, the deployment
|
|
352
|
+
order will be printed as shown below. This flag is set by default.
|
|
353
|
+
|
|
354
|
+
<DualCode>
|
|
355
|
+
<Fragment slot="ts">
|
|
356
|
+
```ts
|
|
357
|
+
const dlz = new DataLandingZone(app, {
|
|
358
|
+
...
|
|
359
|
+
printDeploymentOrder: true,
|
|
360
|
+
});
|
|
361
|
+
```
|
|
362
|
+
</Fragment>
|
|
363
|
+
<Fragment slot="python">
|
|
364
|
+
```python
|
|
365
|
+
dlz.DataLandingZone(app,
|
|
366
|
+
...
|
|
367
|
+
print_deployment_order=True,
|
|
368
|
+
)
|
|
369
|
+
```
|
|
370
|
+
</Fragment>
|
|
371
|
+
</DualCode>
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
Given two workload accounts, `development` and `production`:
|
|
375
|
+
|
|
376
|
+
<DualCode>
|
|
377
|
+
<Fragment slot="ts">
|
|
378
|
+
```ts
|
|
379
|
+
const dlz = new DataLandingZone(app, {
|
|
380
|
+
...
|
|
381
|
+
organization: {
|
|
382
|
+
ous: {
|
|
383
|
+
workloads: {
|
|
384
|
+
accounts: [{
|
|
385
|
+
name: 'development',
|
|
386
|
+
type: DlzAccountType.DEVELOP,
|
|
387
|
+
...
|
|
388
|
+
},{
|
|
389
|
+
name: 'production',
|
|
390
|
+
type: DlzAccountType.PRODUCTION,
|
|
391
|
+
...
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
...AS MANY ACCOUNTS AS DESIRED...
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
...
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
```
|
|
402
|
+
</Fragment>
|
|
403
|
+
<Fragment slot="python">
|
|
404
|
+
```python
|
|
405
|
+
dlz.DataLandingZone(app,
|
|
406
|
+
...
|
|
407
|
+
organization=dlz.DLzOrganization(
|
|
408
|
+
ous=dlz.OrgOus(
|
|
409
|
+
workloads=dlz.OrgOuWorkloads(
|
|
410
|
+
accounts=[
|
|
411
|
+
dlz.DLzAccount(
|
|
412
|
+
name='development',
|
|
413
|
+
type=dlz.DlzAccountType.DEVELOP,
|
|
414
|
+
),
|
|
415
|
+
dlz.DLzAccount(
|
|
416
|
+
name='production',
|
|
417
|
+
type=dlz.DlzAccountType.PRODUCTION,
|
|
418
|
+
),
|
|
419
|
+
],
|
|
420
|
+
),
|
|
421
|
+
)
|
|
422
|
+
),
|
|
423
|
+
)
|
|
424
|
+
```
|
|
425
|
+
</Fragment>
|
|
426
|
+
</DualCode>
|
|
427
|
+
|
|
428
|
+
Running `cdk diff "**"` will produce the following console output:
|
|
429
|
+
|
|
430
|
+
```
|
|
431
|
+
> Running: cdk diff "**"
|
|
432
|
+
|
|
433
|
+
ORDER OF DEPLOYMENT
|
|
434
|
+
🌊 Waves - Deployed sequentially
|
|
435
|
+
🔲 Stages - Deployed in parallel, all stages within a wave are deployed at the same time
|
|
436
|
+
📄 Stack - Dependency driven, will be deployed after all its dependent stacks, denoted by ↳ below it, is deployed
|
|
437
|
+
|
|
438
|
+
🌊 root--global
|
|
439
|
+
🔲 management
|
|
440
|
+
📄 dlz-global (root--global_management_eu-west-1)
|
|
441
|
+
🌊 security--audit--global
|
|
442
|
+
🔲 global
|
|
443
|
+
📄 dlz-global (security--audit--global_global_eu-west-1)
|
|
444
|
+
🌊 workloads--base--global
|
|
445
|
+
🔲 development--development
|
|
446
|
+
📄 dlz-global (workloads--base--global_development--development_eu-west-1)
|
|
447
|
+
🔲 production--production
|
|
448
|
+
📄 dlz-global (workloads--base--global_production--production_eu-west-1)
|
|
449
|
+
🌊 workloads--base--regional
|
|
450
|
+
🔲 development--development
|
|
451
|
+
📄 dlz-regional (workloads--base--regional_development--development_us-east-1)
|
|
452
|
+
🔲 production--production
|
|
453
|
+
📄 dlz-regional (workloads--base--regional_production--production_us-east-1)
|
|
454
|
+
🌊 workloads--ncp1--global
|
|
455
|
+
🔲 development--development
|
|
456
|
+
📄 dlz-ncp1-global (workloads--ncp1--global_development--development_eu-west-1)
|
|
457
|
+
🔲 production--production
|
|
458
|
+
📄 dlz-ncp1-global (workloads--ncp1--global_production--production_eu-west-1)
|
|
459
|
+
🌊 workloads--ncp2--global
|
|
460
|
+
🔲 development--development
|
|
461
|
+
📄 dlz-ncp2-global (workloads--ncp2--global_development--development_eu-west-1)
|
|
462
|
+
🔲 production--production
|
|
463
|
+
📄 dlz-ncp2-global (workloads--ncp2--global_production--production_eu-west-1)
|
|
464
|
+
🌊 workloads--ncp2--regional
|
|
465
|
+
🔲 development--development
|
|
466
|
+
📄 dlz-ncp2-regional (workloads--ncp2--regional_development--development_us-east-1)
|
|
467
|
+
🔲 production--production
|
|
468
|
+
📄 dlz-ncp2-regional (workloads--ncp2--regional_production--production_us-east-1)
|
|
469
|
+
🌊 workloads--ncp3--global
|
|
470
|
+
🔲 development--development
|
|
471
|
+
📄 dlz-ncp3-global (workloads--ncp3--global_development--development_eu-west-1)
|
|
472
|
+
🔲 production--production
|
|
473
|
+
📄 dlz-ncp3-global (workloads--ncp3--global_production--production_eu-west-1)
|
|
474
|
+
🌊 workloads--ncp3--regional
|
|
475
|
+
🔲 development--development
|
|
476
|
+
📄 dlz-ncp3-regional (workloads--ncp3--regional_development--development_us-east-1)
|
|
477
|
+
🔲 production--production
|
|
478
|
+
📄 dlz-ncp3-regional (workloads--ncp3--regional_production--production_us-east-1)
|
|
479
|
+
🌊 workloads--dsp1--global
|
|
480
|
+
🔲 development--development
|
|
481
|
+
📄 dlz-dsp1-global (workloads--dsp1--global_development--development_eu-west-1)
|
|
482
|
+
🔲 production--production
|
|
483
|
+
📄 dlz-dsp1-global (workloads--dsp1--global_production--production_eu-west-1)
|
|
484
|
+
🌊 workloads--dsp1--regional
|
|
485
|
+
🔲 development--development
|
|
486
|
+
📄 dlz-dsp1-regional (workloads--dsp1--regional_development--development_us-east-1)
|
|
487
|
+
🔲 production--production
|
|
488
|
+
📄 dlz-dsp1-regional (workloads--dsp1--regional_production--production_us-east-1)
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
DLZ is only using Waves and not Stages to control dependency, so let's break this down into the "Phases" of deployment
|
|
492
|
+
and focus on the stacks (removing the stages) that are deployed in each phase.
|
|
493
|
+
|
|
494
|
+
Each stack is identified by the `📄` symbol, and has the following format:
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
📄 <stack-name> (<stack-id>)
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
- `<stack-name>` - The name of the stack as seen in the AWS Console
|
|
501
|
+
- `<stack-id>` - The unique identifier of the stack that we use to target for CDK commands like diff, deploy, destroy etc.
|
|
502
|
+
|
|
503
|
+
**Root Phase**
|
|
504
|
+
```
|
|
505
|
+
🌊 root--global
|
|
506
|
+
📄 dlz-global (root--global_management_eu-west-1)
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**Security OU - Audit Phase**
|
|
510
|
+
```
|
|
511
|
+
🌊 security--audit--global
|
|
512
|
+
📄 dlz-global (security--audit--global_global_eu-west-1)
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Workload OU - Base Phase**
|
|
516
|
+
```
|
|
517
|
+
🌊 workloads--base--global
|
|
518
|
+
📄 dlz-global (workloads--base--global_development--development_eu-west-1)
|
|
519
|
+
📄 dlz-global (workloads--base--global_production--production_eu-west-1)
|
|
520
|
+
🌊 workloads--base--regional
|
|
521
|
+
📄 dlz-regional (workloads--base--regional_development--development_us-east-1)
|
|
522
|
+
📄 dlz-regional (workloads--base--regional_production--production_us-east-1)
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
**Workload OU - NCP1 Phase**
|
|
526
|
+
```
|
|
527
|
+
🌊 workloads--ncp1--global
|
|
528
|
+
📄 dlz-ncp1-global (workloads--ncp1--global_development--development_eu-west-1)
|
|
529
|
+
📄 dlz-ncp1-global (workloads--ncp1--global_production--production_eu-west-1)
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
**Workload OU - NCP2 Phase**
|
|
533
|
+
```
|
|
534
|
+
🌊 workloads--ncp2--global
|
|
535
|
+
📄 dlz-ncp2-global (workloads--ncp2--global_development--development_eu-west-1)
|
|
536
|
+
📄 dlz-ncp2-global (workloads--ncp2--global_production--production_eu-west-1)
|
|
537
|
+
🌊 workloads--ncp2--regional
|
|
538
|
+
📄 dlz-ncp2-regional (workloads--ncp2--regional_development--development_us-east-1)
|
|
539
|
+
📄 dlz-ncp2-regional (workloads--ncp2--regional_production--production_us-east-1)
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Workload OU - NCP3 Phase**
|
|
543
|
+
```
|
|
544
|
+
🌊 workloads--ncp3--global
|
|
545
|
+
📄 dlz-ncp3-global (workloads--ncp3--global_development--development_eu-west-1)
|
|
546
|
+
📄 dlz-ncp3-global (workloads--ncp3--global_production--production_eu-west-1)
|
|
547
|
+
🌊 workloads--ncp3--regional
|
|
548
|
+
📄 dlz-ncp3-regional (workloads--ncp3--regional_development--development_us-east-1)
|
|
549
|
+
📄 dlz-ncp3-regional (workloads--ncp3--regional_production--production_us-east-1)
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Workload OU - DSP1 Phase**
|
|
553
|
+
```
|
|
554
|
+
🌊 workloads--dsp1--global
|
|
555
|
+
📄 dlz-dsp1-global (workloads--dsp1--global_development--development_eu-west-1)
|
|
556
|
+
📄 dlz-dsp1-global (workloads--dsp1--global_production--production_eu-west-1)
|
|
557
|
+
🌊 workloads--dsp1--regional
|
|
558
|
+
📄 dlz-dsp1-regional (workloads--dsp1--regional_development--development_us-east-1)
|
|
559
|
+
📄 dlz-dsp1-regional (workloads--dsp1--regional_production--production_us-east-1)
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
## Stacks patterns
|
|
563
|
+
|
|
564
|
+
The DLZ uses stack IDs to enable precise targeting of specific stacks, allowing for controlled and efficient deployments.
|
|
565
|
+
Below are some commonly used patterns that can be applied with the CDK command:
|
|
566
|
+
|
|
567
|
+
- `**` - Target all stacks
|
|
568
|
+
- `root--*` - Target all stacks in the root phase
|
|
569
|
+
- `security--*` - Target all stacks in the security phase
|
|
570
|
+
- `workloads--*` - Target all workload stacks in all phases
|
|
571
|
+
- `workloads--base--*` - Target all workload stacks of the base phase
|
|
572
|
+
- `workloads--ncp*` - Target all workload stacks of all the NCP phases
|
|
573
|
+
- `workloads--ncp1--*` - Target all workload stacks of the NCP1 phase
|
|
574
|
+
- `workloads--ncp2--*` - Target all workload stacks of the NCP2 phase
|
|
575
|
+
- `workloads--ncp3--*` - Target all workload stacks of the NCP3 phase
|
|
576
|
+
- `workloads--dsp1--*` - Target all workload stacks of the DSP1 phase
|
|
577
|
+
|
|
578
|
+
Stacks can be targeted by global/regional waves as well, for example:
|
|
579
|
+
- `workloads--base--global_*` - Target all workload global stacks in the base phase
|
|
580
|
+
- `workloads--base--regional_*` - Target all workload regional stacks in the base phase
|
|
581
|
+
|
|
582
|
+
They can also be targeted by account type, for example:
|
|
583
|
+
- `*_*--development_*` - Target all stacks in the workload phase of type `development` (specified in the config by `type: DlzAccountType.DEVELOP`)
|
|
584
|
+
- `*_*--production_*` - Target all stacks in the workload phase of type `production` (specified in the config by `type: DlzAccountType.PRODUCTION`)
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
### Basic deployment
|
|
588
|
+
|
|
589
|
+
The basic version deploys all the stacks of the DLZ as defined by the deployment order.
|
|
590
|
+
|
|
591
|
+
```bash
|
|
592
|
+
cdk deploy "**"
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### Advanced deployment
|
|
596
|
+
|
|
597
|
+
The advance deployment deploys the phases individually, allowing for manual approval steps between the deployment of
|
|
598
|
+
the `development` and `production` accounts in the workload OU.
|
|
599
|
+
|
|
600
|
+
```bash
|
|
601
|
+
cdk deploy "root--*"
|
|
602
|
+
cdk deploy "security--*"
|
|
603
|
+
cdk deploy "*_*--development_*"
|
|
604
|
+
|
|
605
|
+
**[MANUAL APPROVAL]**
|
|
606
|
+
|
|
607
|
+
cdk deploy "*_*--production_*"
|
|
608
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
description: Build System - Overview
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Deployment Order
|
|
7
|
+
|
|
8
|
+
The [cdk-express-pipeline](https://github.com/rehanvdm/cdk-express-pipeline) package is used internally by the DLZ
|
|
9
|
+
construct to define waves, stages, and stacks, ensuring resources are deployed in a controlled and organized manner.
|
|
10
|
+
This functionality is fully abstracted, so users of the DLZ construct do not need to worry about the underlying details.
|
|
11
|
+
|
|
12
|
+
However, understanding the structure of the DLZ can be beneficial for advanced setups. For example, when separating
|
|
13
|
+
the deployment of `development` and `production` accounts within the workload OU, additional configuration may be
|
|
14
|
+
required.
|
|
15
|
+
|
|
16
|
+
The DLZ is designed to work seamlessly with any Build or CI/CD system, such as GitHub, GitLab, Jenkins, or even local
|
|
17
|
+
execution. Deployments are straightforward, requiring only standard CDK commands. For instance, you can deploy all
|
|
18
|
+
resources with the following command:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
cdk deploy "**"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For advanced scenarios, such as separating deployments of `development` and `production` accounts within the workload
|
|
25
|
+
OU, specific CDK commands must be used. This is necessary only when incorporating a manual approval step between
|
|
26
|
+
deployments.
|
|
27
|
+
|
|
28
|
+
For further details, refer to the [Deployment Order](deployment-order) documentation.
|
|
29
|
+
|
|
30
|
+
## CI Integration
|
|
31
|
+
|
|
32
|
+
The Data Landing Zone construct simplifies integration with CI/CD platforms by providing built-in support for
|
|
33
|
+
secure authentication using OpenID Connect (OIDC). This approach ensures robust and streamlined authentication.
|
|
34
|
+
|
|
35
|
+
Detailed examples of how to integrate with various CI/CD systems are provided to assist users.
|
|
36
|
+
|
|
37
|
+
Continue reading in the [CI Integration](ci-integration) section.
|