generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 290
/
repositories.tf
398 lines (370 loc) · 12.1 KB
/
repositories.tf
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# Repositories
module "core" {
source = "./modules/repository"
name = "modernisation-platform"
type = "core"
description = "A place for the core work of the Modernisation Platform"
homepage_url = "https://user-guide.modernisation-platform.service.justice.gov.uk"
topics = [
"architecture-decisions",
"aws",
"documentation"
]
secrets = {
# Terraform GitHub token for the CI/CD user
TERRAFORM_GITHUB_TOKEN = data.aws_secretsmanager_secret_version.github_ci_user_token.secret_string
# Slack app webhook url
SLACK_WEBHOOK_URL = data.aws_secretsmanager_secret_version.slack_webhook_url.secret_string
# Pagerduty api token
PAGERDUTY_TOKEN = data.aws_secretsmanager_secret_version.pagerduty_token.secret_string
# Pagerduty User api token
PAGERDUTY_USERAPI_TOKEN = data.aws_secretsmanager_secret_version.pagerduty_user_token.secret_string
# PAT token for CI User
MODERNISATION_PAT_MULTIREPO = data.aws_secretsmanager_secret_version.modernisation_pat_multirepo.secret_string
}
}
module "terraform-module-baselines" {
source = "./modules/repository"
name = "modernisation-platform-terraform-baselines"
type = "module"
description = "Module for enabling and configuring common baseline services such as SecurityHub"
topics = [
"aws",
"aws-baselines",
"moj-security",
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-cross-account-access" {
source = "./modules/repository"
name = "modernisation-platform-terraform-cross-account-access"
type = "module"
description = "Module for creating an IAM role that can be assumed from another account"
topics = [
"aws",
"iam"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-environments" {
source = "./modules/repository"
name = "modernisation-platform-terraform-environments"
type = "module"
description = "Module for creating organizational units and accounts within AWS Organizations from JSON files"
squash_merge_commit_message = false
squash_merge_commit_title = false
topics = [
"organizational-units",
"aws"
]
}
module "terraform-module-iam-superadmins" {
source = "./modules/repository"
name = "modernisation-platform-terraform-iam-superadmins"
type = "module"
description = "Module for creating defined IAM users as superadmins"
topics = [
"aws",
"iam"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-s3-bucket" {
source = "./modules/repository"
name = "modernisation-platform-terraform-s3-bucket"
type = "module"
description = "Module for creating S3 buckets with sensible defaults e.g. replication, encryption"
topics = [
"aws",
"s3",
"s3-replication"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-bastion-linux" {
source = "./modules/repository"
name = "modernisation-platform-terraform-bastion-linux"
type = "module"
description = "Module for creating Linux bastion servers in member AWS accounts"
topics = [
"aws",
"bastion",
"linux"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-github-oidc-provider" {
source = "./modules/repository"
name = "modernisation-platform-github-oidc-provider"
type = "module"
description = "Module for creating OIDC providers to use in GitHub Actions"
topics = [
"aws",
"oidc",
"github",
"actions"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-github-oidc-role" {
source = "./modules/repository"
name = "modernisation-platform-github-oidc-role"
type = "module"
description = "Module for creating additional roles assumable via the OIDC provider for use in Github Actions"
topics = [
"aws",
"oidc",
"github",
"actions"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-ecs-cluster" {
source = "./modules/repository"
name = "modernisation-platform-terraform-ecs-cluster"
type = "module"
description = "Module for creating ECS cluster (Linux/Windows) not just for EC2 launch type"
topics = [
"aws",
"ecs",
"linux",
"windows"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-ami-builds" {
source = "./modules/repository"
name = "modernisation-platform-ami-builds"
type = "core"
description = "Modernisation platform AMI builds"
topics = [
"aws",
"ami",
"linux",
"windows"
]
}
module "terraform-module-aws-vm-import" {
source = "./modules/repository"
name = "modernisation-platform-terraform-aws-vm-import"
type = "module"
description = "Module to import virtual machine (VM) images from your virtualization environment to Amazon EC2 as Amazon Machine Images (AMI)"
topics = [
"aws",
"vm",
"linux",
"windows"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-instance-scheduler" {
source = "./modules/repository"
name = "modernisation-platform-instance-scheduler"
type = "core"
description = "A Go lambda function for stopping and starting instance, rds resources and autoscaling groups"
topics = [
"aws",
"ec2",
"rds",
"autoscaling-groups",
"lambda"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-ssm-patching" {
source = "./modules/repository"
name = "modernisation-platform-terraform-ssm-patching"
type = "module"
description = "Module to automate the patching of ec2 instances in each account"
topics = [
"aws",
"iam",
"ssm",
"moj-security"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-ec2-autoscaling-group" {
source = "./modules/repository"
name = "modernisation-platform-terraform-ec2-autoscaling-group"
type = "module"
description = "Module for ec2 autoscaling"
topics = [
"aws",
"iam",
"ec2",
"moj-security"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-ec2-instance" {
source = "./modules/repository"
name = "modernisation-platform-terraform-ec2-instance"
type = "module"
description = "Module for ec2 instances"
topics = [
"aws",
"iam",
"ec2",
"moj-security"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "terraform-module-lambda-function" {
source = "./modules/repository"
name = "modernisation-platform-terraform-lambda-function"
type = "module"
description = "Module to deploy lambda functions in modernisation platform accounts"
topics = [
"aws",
"iam",
"lambda"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-environments" {
source = "./modules/repository"
name = "modernisation-platform-environments"
type = "core"
description = "Modernisation platform environments"
topics = [
"aws",
"environments"
]
required_checks = ["run-opa-policy-tests"]
secrets = {
# Terraform GitHub token for the CI/CD user
MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT = data.aws_secretsmanager_secret_version.github_ci_user_environments_repo_pat_token.secret_string
MODERNISATION_PLATFORM_ACCOUNT_ID = local.modernisation_platform_account
SLACK_WEBHOOK_URL = data.aws_secretsmanager_secret_version.slack_webhook_url.secret_string
TERRAFORM_GITHUB_TOKEN = data.aws_secretsmanager_secret_version.github_ci_user_token.secret_string
TESTING_AWS_ACCESS_KEY_ID = local.testing_ci_iam_user_keys.AWS_ACCESS_KEY_ID
TESTING_AWS_SECRET_ACCESS_KEY = local.testing_ci_iam_user_keys.AWS_SECRET_ACCESS_KEY
}
restrict_dismissals = true
dismissal_restrictions = ["ministryofjustice/modernisation-platform"]
}
module "terraform-module-aws-loadbalancer" {
source = "./modules/repository"
name = "modernisation-platform-terraform-loadbalancer"
type = "module"
description = "Module that creates a loadbalancer in AWS with logging enabled"
topics = [
"aws",
"linux",
"loadbalancer",
"logging"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-terraform-member-vpc" {
source = "./modules/repository"
name = "modernisation-platform-terraform-member-vpc"
type = "module"
description = "Module for member VPC accounts in the Modernisation Platform"
topics = [
"aws",
"platform",
"member-vpc"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-cp-network-test" {
source = "./modules/repository"
name = "modernisation-platform-cp-network-test"
type = "core"
description = "Simple network testing app to be deployed in Cloud Platform in order to test connectivity between the Cloud Platform and the Modernisation Platform"
topics = [
"aws",
"testing",
"networking"
]
}
module "modernisation-platform-terraform-module-template" {
source = "./modules/repository"
name = "modernisation-platform-terraform-module-template"
type = "template"
description = "Template repository for creating Terraform modules for use with the Modernisation Platform"
topics = [
"aws",
"terraform",
"module"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-terraform-pagerduty-integration" {
source = "./modules/repository"
name = "modernisation-platform-terraform-pagerduty-integration"
type = "module"
description = "Module for integrating SNS topics with Pagerduty Services"
topics = [
"aws",
"terraform",
"module",
"pagerduty",
"alerting"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-configuration-management" {
source = "./modules/repository"
name = "modernisation-platform-configuration-management"
type = "core"
description = "Repository for configuration management code used to manage and maintain ec2 infrastructure hosted in the Modernisation Platform"
topics = [
"aws",
"configuration-management",
"ansible",
"ec2"
]
}
module "modernisation-platform-terraform-dns-certificates" {
source = "./modules/repository"
name = "modernisation-platform-terraform-dns-certificates"
type = "module"
description = "Module for creating route 53 dns entries and certificates to go with them"
topics = [
"aws",
"dns",
"terraform",
"networking"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-security" {
source = "./modules/repository"
name = "modernisation-platform-security"
type = "core"
description = "Repository for internal only security issues and content"
topics = [
"aws",
"security"
]
visibility = "internal"
}
module "modernisation-platform-terraform-aws-chatbot" {
source = "./modules/repository"
name = "modernisation-platform-terraform-aws-chatbot"
type = "module"
description = "A Terraform module to create an AWS ChatBot Slack configuration."
topics = [
"aws",
"chatbot",
"slack"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}
module "modernisation-platform-terraform-aws-data-firehose" {
source = "./modules/repository"
name = "modernisation-platform-terraform-aws-data-firehose"
type = "module"
description = "Module for creating AWS Data Streams to stream logs from CloudWatch Log Groups."
topics = [
"aws",
"cloudwatch",
"kinesis-data-streams",
"module",
"terraform"
]
secrets = nonsensitive(local.testing_ci_iam_user_keys)
}