Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy tribunals #2351

Closed
wants to merge 328 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
328 commits
Select commit Hold shift + click to select a range
6e883ee
file location fixed
FirdevsKarabagHMCTS Jun 9, 2023
0266978
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 12, 2023
5227cdd
project based sp migration path definition
FirdevsKarabagHMCTS Jun 12, 2023
7db603a
dms endpoints for all tribunals
FirdevsKarabagHMCTS Jun 12, 2023
e0251ff
dms and sp migration for all tribunals
FirdevsKarabagHMCTS Jun 12, 2023
ece8c10
module names fixed
FirdevsKarabagHMCTS Jun 12, 2023
acef4d2
migrate only ossc
FirdevsKarabagHMCTS Jun 12, 2023
9634ca2
dms for all tribunlas
FirdevsKarabagHMCTS Jun 12, 2023
198dc85
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 13, 2023
9da82f2
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 13, 2023
85da309
application secrets name change
FirdevsKarabagHMCTS Jun 13, 2023
e6d26a7
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 15, 2023
2316d37
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 16, 2023
0b40910
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 19, 2023
0f48d08
ecs changes
FirdevsKarabagHMCTS Jun 19, 2023
ad4843a
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 19, 2023
ecfbd9a
ecs changes bugfix
FirdevsKarabagHMCTS Jun 19, 2023
3470652
parameter definition inside submodules
FirdevsKarabagHMCTS Jun 19, 2023
2cdbd43
dns ssl changes
FirdevsKarabagHMCTS Jun 19, 2023
ae563ce
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 20, 2023
55d0040
send locals to submodules
FirdevsKarabagHMCTS Jun 20, 2023
1959540
send locals to submodules
FirdevsKarabagHMCTS Jun 20, 2023
cee8a9f
parameter fix
FirdevsKarabagHMCTS Jun 20, 2023
0125573
sending provider definition into submodules
FirdevsKarabagHMCTS Jun 21, 2023
637164d
provider definition for submodule
FirdevsKarabagHMCTS Jun 21, 2023
eac7580
provider definition fix
FirdevsKarabagHMCTS Jun 21, 2023
d0a8c26
provider alias test
FirdevsKarabagHMCTS Jun 21, 2023
3dcffed
ecs - dns for transport
FirdevsKarabagHMCTS Jun 21, 2023
758bd7a
file path fix
FirdevsKarabagHMCTS Jun 21, 2023
9cc48fd
dns test
FirdevsKarabagHMCTS Jun 21, 2023
c2679e8
dns zone name fixed
FirdevsKarabagHMCTS Jun 21, 2023
e2a9a57
certificate definitions
FirdevsKarabagHMCTS Jun 21, 2023
0660f5b
dns test
FirdevsKarabagHMCTS Jun 21, 2023
a5c5ab7
dns test
FirdevsKarabagHMCTS Jun 21, 2023
a8ba67a
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 22, 2023
3bc8f37
ecs json fix
FirdevsKarabagHMCTS Jun 22, 2023
95bd172
ecs json numeric data error fix
FirdevsKarabagHMCTS Jun 22, 2023
c47e5c7
tmp change for transport secret creation
FirdevsKarabagHMCTS Jun 22, 2023
fc622d0
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jun 26, 2023
8bd66e7
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jul 11, 2023
66b2a2a
lands_chamber ecs task definition
FirdevsKarabagHMCTS Jul 11, 2023
2561230
resource names changed in lands chamber file
FirdevsKarabagHMCTS Jul 12, 2023
84e1a29
variable name fix for lands chamber
FirdevsKarabagHMCTS Jul 12, 2023
a99d5c9
land chamber dms closed - temp
FirdevsKarabagHMCTS Jul 12, 2023
62600aa
lands security group naming fixed
FirdevsKarabagHMCTS Jul 13, 2023
a4ba4af
naming fixes
FirdevsKarabagHMCTS Jul 13, 2023
fbde217
deleting Security Group error fix
FirdevsKarabagHMCTS Jul 13, 2023
1c54345
terraform detroy for development
FirdevsKarabagHMCTS Jul 13, 2023
bba14e7
destroy development
FirdevsKarabagHMCTS Jul 13, 2023
ebc6c7b
detroy sevrets
FirdevsKarabagHMCTS Jul 13, 2023
0dc7a4a
destroy test
FirdevsKarabagHMCTS Jul 13, 2023
058b7aa
destroy test
FirdevsKarabagHMCTS Jul 13, 2023
1c12e5b
destroy test
FirdevsKarabagHMCTS Jul 13, 2023
6d0387d
destroy test
FirdevsKarabagHMCTS Jul 13, 2023
7b1525f
destroy test
FirdevsKarabagHMCTS Jul 13, 2023
768467f
administrative-appeals ecr, ecs, dns added
FirdevsKarabagHMCTS Jul 14, 2023
7ac01cb
"name" cannot be longer than 32 characters bugfix
FirdevsKarabagHMCTS Jul 14, 2023
66be516
dms security group already defined
FirdevsKarabagHMCTS Jul 14, 2023
b6e8b07
test - detroy transport
FirdevsKarabagHMCTS Jul 14, 2023
851c5c8
domain name local values added for lands and appeals
FirdevsKarabagHMCTS Jul 14, 2023
54ce5b1
naming error fix
FirdevsKarabagHMCTS Jul 14, 2023
c52ec08
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Jul 26, 2023
d51626d
carestandards ecs -dns - ecr
FirdevsKarabagHMCTS Jul 26, 2023
94858d0
care standards db secret name changed
FirdevsKarabagHMCTS Jul 26, 2023
3119311
dms source db security group
FirdevsKarabagHMCTS Jul 28, 2023
32b7dc5
dms source db security group
FirdevsKarabagHMCTS Jul 28, 2023
3579f99
rds access from ecs
FirdevsKarabagHMCTS Jul 28, 2023
c59510b
temp close transport
FirdevsKarabagHMCTS Jul 28, 2023
59db169
ecs - ecr - dns added for 7 tribunals
FirdevsKarabagHMCTS Jul 31, 2023
83a07d5
naming fixes
FirdevsKarabagHMCTS Jul 31, 2023
4a5ce04
db secret name changed
FirdevsKarabagHMCTS Jul 31, 2023
7392e6b
rename existing secret for transport (temp)
FirdevsKarabagHMCTS Jul 31, 2023
b2fcd5a
dns naming changed
FirdevsKarabagHMCTS Jul 31, 2023
4826bf2
rds security groups added for ecs services
FirdevsKarabagHMCTS Aug 2, 2023
e65a0d1
iam policy error fix
FirdevsKarabagHMCTS Aug 3, 2023
b31368a
transport ecs fargate to ec2 changes
FirdevsKarabagHMCTS Aug 10, 2023
ab2cadd
transport ecs changes
FirdevsKarabagHMCTS Aug 10, 2023
aa7826e
transport ecs changes
FirdevsKarabagHMCTS Aug 10, 2023
1fc0f9a
transport ecs
FirdevsKarabagHMCTS Aug 11, 2023
0ab5cd7
transport ecs
FirdevsKarabagHMCTS Aug 11, 2023
05c2639
rds security group update for tansport ecs access
FirdevsKarabagHMCTS Aug 11, 2023
2b556ab
transport ecs ingress rule removed from rds
FirdevsKarabagHMCTS Aug 11, 2023
ebd5073
ecs task definition format fix
FirdevsKarabagHMCTS Aug 11, 2023
f42a9d0
ami id changed for windows instance
FirdevsKarabagHMCTS Aug 14, 2023
07b8f79
instance type variable added
FirdevsKarabagHMCTS Aug 14, 2023
2042ade
aws_lb_target_group target_type changed
FirdevsKarabagHMCTS Aug 14, 2023
75a5a1b
terraform resource deletion error fix - temp
FirdevsKarabagHMCTS Aug 15, 2023
d280dd2
windows fsx file server test
FirdevsKarabagHMCTS Aug 15, 2023
2822c8b
transport ecs cluster name change
FirdevsKarabagHMCTS Aug 15, 2023
3a8a40c
ecs task definition updated
FirdevsKarabagHMCTS Aug 16, 2023
c893f0e
ecs task definition updated
FirdevsKarabagHMCTS Aug 16, 2023
046ee23
ecs task definition updated
FirdevsKarabagHMCTS Aug 16, 2023
471eef4
aws_fsx_windows_file_system
FirdevsKarabagHMCTS Aug 16, 2023
2a4e4c1
aws_fsx_windows_file_system subnet id fix
FirdevsKarabagHMCTS Aug 16, 2023
14de63f
fsxserver definition subnet ids format fix
FirdevsKarabagHMCTS Aug 16, 2023
976653d
active directory creation added for fsx
FirdevsKarabagHMCTS Aug 16, 2023
c5fdbc2
active directory name changed
FirdevsKarabagHMCTS Aug 16, 2023
7d9afa4
self_managed_active_directory added
FirdevsKarabagHMCTS Aug 17, 2023
b375a49
fsx server changes
FirdevsKarabagHMCTS Aug 17, 2023
3cd3e8e
fsx variable fix
FirdevsKarabagHMCTS Aug 17, 2023
668734c
fsx variables fix
FirdevsKarabagHMCTS Aug 17, 2023
39c1212
secret name changed for fsx
FirdevsKarabagHMCTS Aug 17, 2023
466a65c
fsx active directory change
FirdevsKarabagHMCTS Aug 18, 2023
4fe92eb
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Sep 6, 2023
54d3806
secret name changed for transport
FirdevsKarabagHMCTS Sep 6, 2023
eede65c
fsx removal test for transport
FirdevsKarabagHMCTS Sep 7, 2023
d763b04
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Sep 8, 2023
c195b59
Merge branch 'main' of github.com:ministryofjustice/modernisation-pla…
FirdevsKarabagHMCTS Sep 11, 2023
6428144
ebs test
FirdevsKarabagHMCTS Sep 11, 2023
cf15eb9
ebs test
FirdevsKarabagHMCTS Sep 11, 2023
3ab5103
region definition for ebs
FirdevsKarabagHMCTS Sep 11, 2023
eb34de0
container transport does not exist error fix
FirdevsKarabagHMCTS Sep 11, 2023
3bc6e36
container name fix
FirdevsKarabagHMCTS Sep 12, 2023
39a7b81
container port changed
FirdevsKarabagHMCTS Sep 12, 2023
01388a1
ecs lb listener dependency added
FirdevsKarabagHMCTS Sep 12, 2023
29746e9
ecs service dependency changed
FirdevsKarabagHMCTS Sep 14, 2023
1cf1f95
ebs test
FirdevsKarabagHMCTS Sep 25, 2023
c022155
ecs creation for transport point of call changed
FirdevsKarabagHMCTS Sep 26, 2023
1581ef9
runtime_platform added into ecs windows task definition
FirdevsKarabagHMCTS Sep 27, 2023
4602719
network_mode removed from ecs task definition
FirdevsKarabagHMCTS Sep 27, 2023
20bed04
runtime_platform removed from task definition
FirdevsKarabagHMCTS Sep 27, 2023
f75a182
ecs service dependency changed
FirdevsKarabagHMCTS Sep 27, 2023
630fc02
user data test ec2 for ecs
FirdevsKarabagHMCTS Sep 28, 2023
c3d7988
transport_alb_listener_rule added
FirdevsKarabagHMCTS Sep 28, 2023
2b87b39
transport_ec2_ingress_rules updated
FirdevsKarabagHMCTS Sep 28, 2023
cddf872
ecs task definition updated
FirdevsKarabagHMCTS Sep 29, 2023
4d3dea0
ec2 for ecs user data changed
FirdevsKarabagHMCTS Sep 29, 2023
1bbdcf5
local parameter name fix
FirdevsKarabagHMCTS Sep 29, 2023
39fac2b
ecs changes for lands chamber
FirdevsKarabagHMCTS Sep 29, 2023
ba2129d
rds ingress rule update for lands chamber ecs service
FirdevsKarabagHMCTS Sep 29, 2023
deebe59
ec2 instance count changed
FirdevsKarabagHMCTS Sep 29, 2023
d9d68b0
lands aws_lb_listener_rule removed
FirdevsKarabagHMCTS Sep 29, 2023
f7f4811
lands_ecs_service security rule added
FirdevsKarabagHMCTS Sep 29, 2023
aeaa2d0
ec2 for ecs IAM role updated
FirdevsKarabagHMCTS Oct 2, 2023
152ec8f
ami changed
FirdevsKarabagHMCTS Oct 2, 2023
26dfdf4
Merge branch 'legacy-tribunals' of github.com:ministryofjustice/moder…
FirdevsKarabagHMCTS Oct 2, 2023
deed43e
ec2 instance size changed
FirdevsKarabagHMCTS Oct 2, 2023
04668bb
ec2 instance size changed
FirdevsKarabagHMCTS Oct 2, 2023
d95dd45
administrative appeals fargate to ec2
FirdevsKarabagHMCTS Oct 2, 2023
df50a2c
ec2 instance type changed
FirdevsKarabagHMCTS Oct 2, 2023
305b7bd
information tribunal ecs changes
FirdevsKarabagHMCTS Oct 3, 2023
1115c24
appeals health check changed
FirdevsKarabagHMCTS Oct 3, 2023
750c37b
appeals target group health check changed
FirdevsKarabagHMCTS Oct 3, 2023
1774e6d
appeals port 22 added
FirdevsKarabagHMCTS Oct 3, 2023
0d51441
appeals sg for rds fixed
FirdevsKarabagHMCTS Oct 3, 2023
4031a6a
information tribunal changes for target group unhealthy status
FirdevsKarabagHMCTS Oct 4, 2023
06e17db
rds security group id format fix fot it
FirdevsKarabagHMCTS Oct 4, 2023
b4d2001
transport tribunal security group changes
FirdevsKarabagHMCTS Oct 4, 2023
edcfb51
administrative appeals rds fix
FirdevsKarabagHMCTS Oct 4, 2023
954fa09
lands chamber rds fix
FirdevsKarabagHMCTS Oct 4, 2023
12eda51
rds for lands chamber sg fixed
FirdevsKarabagHMCTS Oct 4, 2023
5a13ebc
lands chamber ssl policy name fixed
FirdevsKarabagHMCTS Oct 4, 2023
5705802
db migration closed
FirdevsKarabagHMCTS Oct 4, 2023
a04706c
from fargate to ec2 changes for 6 tribunals
FirdevsKarabagHMCTS Oct 5, 2023
fb5c5f4
rds format error fix
FirdevsKarabagHMCTS Oct 5, 2023
4a4c814
ec2 instance size test
FirdevsKarabagHMCTS Oct 5, 2023
6cd586a
task definition test and ec2 size change
FirdevsKarabagHMCTS Oct 5, 2023
2dbd135
ec2 size t3.medium test
FirdevsKarabagHMCTS Oct 5, 2023
041edf5
Introduce a new shared ecs cluster with a shared load balancer and a …
mark-butler-solirius Oct 5, 2023
f91743c
task definition updated
FirdevsKarabagHMCTS Oct 6, 2023
fdb3763
Fix the typo in asg-shared
mark-butler-solirius Oct 6, 2023
266c26c
Remove reference to production certificate
mark-butler-solirius Oct 6, 2023
745b721
Use the dns from appeals for this run
mark-butler-solirius Oct 6, 2023
b815ba4
Use the dns from appeals for this run
mark-butler-solirius Oct 6, 2023
27c7656
Removed extra dollar symbol from template version
mark-butler-solirius Oct 6, 2023
414f3cf
Add subnet to the launch template
mark-butler-solirius Oct 6, 2023
817b6f6
Change asg/launch_template to put the ec2 instance in subnet a of the…
mark-butler-solirius Oct 7, 2023
399f4db
Error in vpc_zone_identifier
mark-butler-solirius Oct 7, 2023
c3d5f8f
try to fix error
mark-butler-solirius Oct 7, 2023
9a841e3
tribunal template code changes
FirdevsKarabagHMCTS Oct 9, 2023
77fc3d2
variable definitions fixed for tribunals template code
FirdevsKarabagHMCTS Oct 9, 2023
6dda79a
shared_public_ids variable added
FirdevsKarabagHMCTS Oct 9, 2023
8523216
Add the SSM policy permissions to a role which is added to the launch…
mark-butler-solirius Oct 9, 2023
1ae2e90
Added .name to 2 resource attrbutes
mark-butler-solirius Oct 9, 2023
911c6b4
Add ec2 instance policy and attach standard SSM policy to it
mark-butler-solirius Oct 9, 2023
24bf2d4
Merge pull request #3592 from ministryofjustice/legacy-tribunals-shar…
FirdevsKarabagHMCTS Oct 9, 2023
0c75f27
build after merge
FirdevsKarabagHMCTS Oct 9, 2023
4a0c3a5
ecs cluster creation moved out of the ecs module
FirdevsKarabagHMCTS Oct 10, 2023
6d2ab44
ecs module cluster data usage fix
FirdevsKarabagHMCTS Oct 10, 2023
6004ee4
cluster name fixed under ecs module
FirdevsKarabagHMCTS Oct 10, 2023
6d17d71
Re-structure the terraform to reference the dependent resources first
mark-butler-solirius Oct 10, 2023
95a41bb
remove white space before json policy blocks
mark-butler-solirius Oct 10, 2023
bb31034
Update default version
mark-butler-solirius Oct 10, 2023
baf7838
missing comma
mark-butler-solirius Oct 10, 2023
9e598c2
Merge pull request #3621 from ministryofjustice/legacy-tribunals-shar…
FirdevsKarabagHMCTS Oct 10, 2023
ce1b442
ecs module changes reversed
FirdevsKarabagHMCTS Oct 10, 2023
5641ffc
fix for unintended change
FirdevsKarabagHMCTS Oct 10, 2023
16a0b81
destroy ecs - ec2 - load balancer
FirdevsKarabagHMCTS Oct 10, 2023
06aecd1
destroy rds
FirdevsKarabagHMCTS Oct 10, 2023
f2f1836
secret change for rds destroy
FirdevsKarabagHMCTS Oct 10, 2023
7c44776
shared resource creation
FirdevsKarabagHMCTS Oct 10, 2023
1963d90
dn ssl added
FirdevsKarabagHMCTS Oct 10, 2023
5465e5d
ec2 shared instance name added, unused file removed
FirdevsKarabagHMCTS Oct 10, 2023
d0d6c71
local variable name fixed
FirdevsKarabagHMCTS Oct 10, 2023
82a2224
transport ecs task and dms creation, rds creation opened
FirdevsKarabagHMCTS Oct 10, 2023
4c018c3
rds ingres rules fix
FirdevsKarabagHMCTS Oct 10, 2023
82e950e
secret manager apply error fix
FirdevsKarabagHMCTS Oct 11, 2023
40aefdd
ecs service definition added into shared ecs for transport
FirdevsKarabagHMCTS Oct 11, 2023
de0b42a
ecs service error fix
FirdevsKarabagHMCTS Oct 11, 2023
3a1df6c
cluster name added into pass parameters to ecs task
FirdevsKarabagHMCTS Oct 11, 2023
a821bb6
lb_target_group target type changed from ip to instance
FirdevsKarabagHMCTS Oct 11, 2023
d9a2655
task definition added
FirdevsKarabagHMCTS Oct 16, 2023
459c7fd
administrative appeals added
FirdevsKarabagHMCTS Oct 16, 2023
9083cd5
ec2 security group created
FirdevsKarabagHMCTS Oct 16, 2023
032d094
transport module removed
FirdevsKarabagHMCTS Oct 16, 2023
7e5f588
Link ec2 instance to the tribunals-all-cluster so that ecs tasks know…
mark-butler-solirius Oct 16, 2023
b82819b
Refactor to use dynamic host ports in task definition
mark-butler-solirius Oct 17, 2023
30fa5e4
Remove ingress on pingdom security group (no longer needed)
mark-butler-solirius Oct 17, 2023
3a5a52e
Add the http listener - both forward to http port 80 target group
mark-butler-solirius Oct 17, 2023
90dd189
Attempt to fix "missiing attribute issue when placing tasks"
mark-butler-solirius Oct 17, 2023
66beed2
dns creation for a secons tribunal added
FirdevsKarabagHMCTS Oct 17, 2023
9c0c6f7
Duplicate resource error fix
FirdevsKarabagHMCTS Oct 17, 2023
087558d
shared aws_acm_certificate creation
FirdevsKarabagHMCTS Oct 17, 2023
67d145a
subject_alternative_names changed for acm certificate
FirdevsKarabagHMCTS Oct 17, 2023
225a745
appeals route 53 record is removed
FirdevsKarabagHMCTS Oct 17, 2023
e809088
Load Balancer needs to allow outbound to all ports because the ALB ma…
mark-butler-solirius Oct 17, 2023
7219478
Add bastion server for rds and testing ec2 health check
mark-butler-solirius Oct 18, 2023
1e4cf65
host port changed in task definition from 0 to 443
FirdevsKarabagHMCTS Oct 19, 2023
d362d5f
heath check port range updated
FirdevsKarabagHMCTS Oct 19, 2023
2838564
rollback ec2 instance inbound rules change
FirdevsKarabagHMCTS Oct 19, 2023
7a4c3c7
target group healthcheck timeout changed, host port changed
FirdevsKarabagHMCTS Oct 20, 2023
536bb21
sh file path fix
FirdevsKarabagHMCTS Oct 20, 2023
512e074
userdata and task definition files moved under scripts folder
FirdevsKarabagHMCTS Oct 20, 2023
a962569
task definition and userdata moved back under project folder - path e…
FirdevsKarabagHMCTS Oct 20, 2023
5af2a63
path error fix
FirdevsKarabagHMCTS Oct 20, 2023
7070cdc
Make sure ASG creates the instance in zone A - the same as the EBS vo…
mark-butler-solirius Oct 23, 2023
4920440
Add the appeals service to the ECS and append it's url to the Certifi…
mark-butler-solirius Oct 23, 2023
d46406d
Correct ingres rules for all traffic
mark-butler-solirius Oct 23, 2023
de01144
Setup an array of tribunals domain names and use this to generate the…
mark-butler-solirius Oct 24, 2023
da6e552
syntax error on output
mark-butler-solirius Oct 24, 2023
7cd2fd1
use for_each for outputs
mark-butler-solirius Oct 24, 2023
435ceb3
for loop syntax different in outputs
mark-butler-solirius Oct 24, 2023
83e3d6b
Use core-services provider to link to common resources account
mark-butler-solirius Oct 25, 2023
15622f2
Switch back provider to try to destroy
mark-butler-solirius Oct 25, 2023
da4a894
Refactor dns/route53
mark-butler-solirius Oct 25, 2023
9862e13
Use a modified domain name and a new list of validation fqdns
mark-butler-solirius Oct 25, 2023
e460e7f
Remove domain name outputs
mark-butler-solirius Oct 25, 2023
324bf5a
Switch zone for external validation route53 records
mark-butler-solirius Oct 25, 2023
437c61c
Switch back zone for external validation route53 records (to destroy)
mark-butler-solirius Oct 25, 2023
80de481
Switch zone for external validation route53 records (to destroy)
mark-butler-solirius Oct 25, 2023
7141f31
Upgrade replication instance engine version to 3.5.1 from 3.4.7
mark-butler-solirius Oct 25, 2023
6ff1408
Move the list of tribunals into platform_locals so we can reuse it to…
mark-butler-solirius Oct 26, 2023
bf481e1
Add ahmlr module to main.tf
mark-butler-solirius Oct 26, 2023
b0b4ddd
Introduce a new load balancer module so that each Service has its own…
mark-butler-solirius Oct 30, 2023
5ec3363
Just build transport and appeals
mark-butler-solirius Oct 30, 2023
50cadb3
Add tags_common variable for loadbalancer module
mark-butler-solirius Oct 30, 2023
3440bb7
Reference the LB as a module from the main terraform
mark-butler-solirius Oct 30, 2023
96f1398
Incorrect modules path reference
mark-butler-solirius Oct 30, 2023
325b8d1
Switch location of module definition
mark-butler-solirius Oct 30, 2023
6e91936
Refactor LB module outside of main
mark-butler-solirius Oct 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
410 changes: 410 additions & 0 deletions terraform/environments/tribunals/administrative_appeals.tf

Large diffs are not rendered by default.

410 changes: 410 additions & 0 deletions terraform/environments/tribunals/ahmlr.tf

Large diffs are not rendered by default.

108 changes: 105 additions & 3 deletions terraform/environments/tribunals/application_variables.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,118 @@
{
"accounts": {
"development": {
"example_var": "dev-data"
"moj_ip": "81.134.202.29/32",
"allocated_storage": "20",
"storage_type": "gp2",
"db_identifier": "tribunals-rds-dev",
"engine": "sqlserver-se",
"engine_version": "15.00.4198.2.v1",
"instance_class": "db.m5.large",
"username": "admin",
"dms_source_db": "ec2-46-137-38-249.eu-west-1.compute.amazonaws.com",
"curserver": "DEVELOPMENT",
"support_team": "DTS Legacy Apps Support Team",
"support_email": "[email protected]",
"server_port_1": "80",
"lb_listener_protocol_1": "HTTP",
"server_port_2": "443",
"lb_listener_protocol_2": "HTTPS",
"ami_image_id": "ami-0d20b6fc5007adcb3",
"ec2_desired_capacity": 1,
"ec2_max_size": 2,
"ec2_min_size": 1,
"task_definition_volume": "upload_volume",
"network_mode": "bridge",
"server_port": 8080,
"app_count": 1,
"appscaling_min_capacity": 1,
"appscaling_max_capacity": 2,
"ec2_scaling_cpu_threshold": 75,
"ec2_scaling_mem_threshold": 61,
"ecs_scaling_cpu_threshold": 80,
"ecs_scaling_mem_threshold": 80,
"instance_type": "t3.medium"
},
"test": {
"example_var": "test-data"
},
"preproduction": {
"example_var": "preproduction-data"
"moj_ip": "81.134.202.29/32",
"allocated_storage": "20",
"storage_type": "gp2",
"db_identifier": "tribunals-db-preproduction",
"engine": "sqlserver-se",
"engine_version": "15.00.4198.2.v1",
"instance_class": "db.m5.large",
"username": "admin",
"dms_source_db": "ec2-46-137-38-249.eu-west-1.compute.amazonaws.com",
"curserver": "PREPRODUCTION",
"support_team": "DTS Legacy Apps Support Team",
"support_email": "[email protected]",
"server_port_1": "80",
"lb_listener_protocol_1": "HTTP",
"server_port_2": "443",
"lb_listener_protocol_2": "HTTPS",
"ami_image_id": "ami-0d233dc36193b1c63",
"ec2_desired_capacity": 2,
"ec2_max_size": 6,
"ec2_min_size": 2,
"task_definition_volume": "upload_volume",
"network_mode": "bridge",
"server_port": 8080,
"app_count": 2,
"appscaling_min_capacity": 2,
"appscaling_max_capacity": 6,
"ec2_scaling_cpu_threshold": 75,
"ec2_scaling_mem_threshold": 61,
"ecs_scaling_cpu_threshold": 80,
"ecs_scaling_mem_threshold": 80,
"instance_type": "m5.large"
},
"production": {
"example_var": "production-data"
"moj_ip": "81.134.202.29/32",
"allocated_storage": "20",
"storage_type": "gp2",
"db_identifier": "tribunals-db",
"engine": "sqlserver-se",
"engine_version": "15.00.4198.2.v1",
"instance_class": "db.m5.large",
"username": "admin",
"dms_source_db": "ec2-46-137-38-249.eu-west-1.compute.amazonaws.com",
"curserver": "PRODUCTION",
"support_team": "DTS Legacy Apps Support Team",
"support_email": "[email protected]",
"server_port_1": "80",
"lb_listener_protocol_1": "HTTP",
"server_port_2": "443",
"lb_listener_protocol_2": "HTTPS",
"ami_image_id": "ami-0d233dc36193b1c63",
"ec2_desired_capacity": 2,
"ec2_max_size": 6,
"ec2_min_size": 2,
"task_definition_volume": "upload_volume",
"network_mode": "bridge",
"server_port": 8080,
"app_count": 2,
"appscaling_min_capacity": 2,
"appscaling_max_capacity": 6,
"ec2_scaling_cpu_threshold": 75,
"ec2_scaling_mem_threshold": 61,
"ecs_scaling_cpu_threshold": 80,
"ecs_scaling_mem_threshold": 80,
"instance_type": "m5.large"
}
},
"ec2_sg_rules": {
"TCP_80": {
"from_port": 80,
"to_port": 80,
"protocol": "TCP"
},
"TCP_443": {
"from_port": 443,
"to_port": 443,
"protocol": "TCP"
}
}
}
219 changes: 219 additions & 0 deletions terraform/environments/tribunals/asg-shared.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
locals {
app_name = "tribunals-shared"
instance_role_name = join("-", [local.app_name, "ec2-instance-role"])
instance_profile_name = join("-", [local.app_name, "ec2-instance-profile"])
ec2_instance_policy = join("-", [local.app_name, "ec2-instance-policy"])
tags_common = local.tags
}

# Create an IAM policy for the custom permissions required by the EC2 hosting instance
resource "aws_iam_policy" "ec2_instance_policy" { #tfsec:ignore:aws-iam-no-policy-wildcards
name = local.ec2_instance_policy
tags = merge(
local.tags_common,
{
Name = local.ec2_instance_policy
}
)
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DetachVolume",
"ec2:AttachVolume",
"ec2:DescribeVolumes",
"ec2:DescribeTags",
"ec2:DescribeInstances",
"ecs:CreateCluster",
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:StartTelemetrySession",
"ecs:UpdateContainerInstancesState",
"ecs:Submit*",
"ecs:TagResource",
"ecr:*",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup",
"logs:DescribeLogStreams",
"s3:ListBucket",
"s3:*Object*",
"kms:Decrypt",
"kms:Encrypt",
"kms:GenerateDataKey",
"kms:ReEncrypt",
"kms:GenerateDataKey",
"kms:DescribeKey",
"xray:*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ecs:TagResource",
"Resource": "*",
"Condition": {
"StringEquals": {
"ecs:CreateAction": [
"CreateCluster",
"RegisterContainerInstance"
]
}
}
}
]
}
EOF
}

# Create the IAM role to which the custom and predefined policies will be attached
# The role will be added to the ec2 instance profile which is added to the launch template
resource "aws_iam_role" "ec2_instance_role" {
name = local.instance_role_name
tags = merge(
local.tags,
{
Name = local.instance_role_name
}
)
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
}

# Attach the custom policy and predefined policies to the role
resource "aws_iam_role_policy_attachment" "ec2_policy_instance_policy" {
role = aws_iam_role.ec2_instance_role.name
policy_arn = aws_iam_policy.ec2_instance_policy.arn
}

resource "aws_iam_role_policy_attachment" "ec2_policy_ssm_core" {
role = aws_iam_role.ec2_instance_role.name
policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}

resource "aws_iam_role_policy_attachment" "ec2_policy_cloudwatch" {
role = aws_iam_role.ec2_instance_role.name
policy_arn = "arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy"
}

# Create the Instance profile for the role
resource "aws_iam_instance_profile" "ec2_instance_profile" {
name = local.instance_profile_name
role = aws_iam_role.ec2_instance_role.name
tags = merge(
local.tags_common,
{
Name = local.instance_profile_name
}
)
}

# Create the Launch Template and assign the instance profile
resource "aws_launch_template" "tribunals-all-lt" {
name_prefix = "tribunals-all"
image_id = "ami-0d20b6fc5007adcb3"
instance_type = "m5.large"
update_default_version = true

iam_instance_profile {
name = aws_iam_instance_profile.ec2_instance_profile.name
}

block_device_mappings {
device_name = "/dev/sda1"

ebs {
volume_size = 80
volume_type = "gp2"
}
}
ebs_optimized = true

network_interfaces {
device_index = 0
security_groups = [aws_security_group.cluster_ec2.id]#[aws_security_group.tribunals_lb_sc.id]
subnet_id = data.aws_subnet.public_subnets_a.id
delete_on_termination = true
}

user_data = filebase64("ec2-shared-user-data.sh")
}

# Finally, create the Auto scaling group for the launch template
resource "aws_autoscaling_group" "tribunals-all-asg" {
#vpc_zone_identifier = sort(data.aws_subnets.shared-private.ids)
vpc_zone_identifier = [data.aws_subnet.private_subnets_a.id]
desired_capacity = 1
max_size = 1
min_size = 1
name = local.app_name

launch_template {
id = "${aws_launch_template.tribunals-all-lt.id}"
version = "$Latest"
}
}

###########################################################################


# EC2 Security Group
# Controls access to the EC2 instances

resource "aws_security_group" "cluster_ec2" {
#checkov:skip=CKV_AWS_23
name = "tribunals-cluster-ec2-security-group"
description = "controls access to the cluster ec2 instance"
vpc_id = data.aws_vpc.shared.id

ingress {
description = "Cluster EC2 ingress rule"
from_port = 0
to_port = 0
protocol = "-1"
security_groups = [module.ecs_loadbalancer.tribunals_lb_sc_id]
}

ingress {
protocol = "tcp"
description = "Allow traffic from bastion"
from_port = 0
to_port = 0
security_groups = [
module.bastion_linux.bastion_security_group
]
}

egress {
description = "Cluster EC2 loadbalancer egress rule"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}

tags = merge(
local.tags_common,
{
Name = "tribunals-cluster-ec2-security-group"
}
)
}
16 changes: 16 additions & 0 deletions terraform/environments/tribunals/bastion_linux.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"keys": {
"development": {
"mgbutler": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDeRxdAAvyFpWSShknO5QoWnGeWYFDkJgvmgnuWXeLuW [email protected]",
"firdevs": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQxKFkjdwZj+3SKVwx+AVvQQNChmTCoAPQpwOdw/HUz [email protected]"
},
"preproduction": {
"mgbutler": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDeRxdAAvyFpWSShknO5QoWnGeWYFDkJgvmgnuWXeLuW [email protected]",
"firdevs": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQxKFkjdwZj+3SKVwx+AVvQQNChmTCoAPQpwOdw/HUz [email protected]"
},
"production": {
"mgbutler": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDeRxdAAvyFpWSShknO5QoWnGeWYFDkJgvmgnuWXeLuW [email protected]",
"firdevs": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQxKFkjdwZj+3SKVwx+AVvQQNChmTCoAPQpwOdw/HUz [email protected]"
}
}
}
Loading
Loading