Skip to content

Commit

Permalink
Merge pull request #9236 from ministryofjustice/oasys-san-test
Browse files Browse the repository at this point in the history
oasys san test
  • Loading branch information
wullub authored Jan 7, 2025
2 parents e95358f + 057c11c commit 06496e7
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform/environments/oasys/locals_production.tf
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ locals {
{ name = "t2-b", type = "CNAME", ttl = "3600", records = ["public-lb-1856376477.eu-west-2.elb.amazonaws.com"] },
{ name = "t2-b-int", type = "CNAME", ttl = "3600", records = ["internal-private-lb-1575012313.eu-west-2.elb.amazonaws.com"] },
{ name = "t2-int", type = "CNAME", ttl = "3600", records = ["internal-private-lb-1575012313.eu-west-2.elb.amazonaws.com"] },
{ name = "t2-c", type = "CNAME", ttl = "3600", records = ["public-lb-1856376477.eu-west-2.elb.amazonaws.com"] },
{ name = "t2-c-int", type = "CNAME", ttl = "3600", records = ["internal-private-lb-1575012313.eu-west-2.elb.amazonaws.com"] },

{ name = "_9f1b86e95d13d2cc7b9629f67d672c40", type = "CNAME", ttl = "86400", records = ["_7ea92a123c65795698dd19834dd71f61.fdbjvjdfdx.acm-validations.aws."] },
{ name = "_26aaae7b839510727c2dd323b483ea5d.pp", type = "CNAME", ttl = "86400", records = ["_72222d02a82256bb6d75c872bc7bc1aa.qxcwttcyyb.acm-validations.aws."] },
Expand Down
96 changes: 96 additions & 0 deletions terraform/environments/oasys/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,66 @@ locals {
oracle-db-sid = "T2OASYS2"
})
})
# t2-oasys-web-c = merge(local.ec2_autoscaling_groups.web, {
# # For SAN project (OASYS replacement) requested by Howard Smith
# autoscaling_group = merge(local.ec2_autoscaling_groups.web.autoscaling_group, {
# warm_pool = {
# min_size = 0
# reuse_on_scale_in = true
# }
# })
# config = merge(local.ec2_autoscaling_groups.web.config, {
# ami_name = "oasys_webserver_release_*"
# availability_zone = "eu-west-2b"
# iam_resource_names_prefix = "ec2-web-t2"
# instance_profile_policies = concat(local.ec2_autoscaling_groups.web.config.instance_profile_policies, [
# "Ec2T2WebPolicy",
# ])
# })
# user_data_cloud_init = merge(local.ec2_autoscaling_groups.web.user_data_cloud_init, {
# args = merge(local.ec2_autoscaling_groups.web.user_data_cloud_init.args, {
# branch = "main"
# })
# })
# tags = merge(local.ec2_autoscaling_groups.web.tags, {
# description = "t2 oasys web"
# oasys-environment = "t2"
# oracle-db-hostname = "db.t2.oasys.hmpps-test.modernisation-platform.internal"
# oracle-db-sid = "T2OASYS2"
# })
# })
# t2-oasys-san-web-a = merge(local.ec2_autoscaling_groups.web, {
# # For SAN project (OASYS replacement) requested by Howard Smith
# # Autoscaling disabled as initially server will be configured manually
# autoscaling_group = {
# desired_capacity = 1
# max_size = 1
# force_delete = true
# vpc_zone_identifier = module.environment.subnets["private"].ids
# wait_for_capacity_timeout = 60m
# warm_pool = {
# min_size = 0
# max_group_prepared_capacity = 1
# reuse_on_scale_in = true
# }
# }
# config = merge(local.ec2_autoscaling_groups.web.config, {
# ami_name = "OASys San Test"
# availability_zone = "eu-west-2a"
# iam_resource_names_prefix = "ec2-web-t2"
# instance_profile_policies = concat(local.ec2_autoscaling_groups.web.config.instance_profile_policies, [
# "Ec2T2WebPolicy",
# ])
# })
# user_data_cloud_init = {
# }
# tags = merge(local.ec2_autoscaling_groups.web.tags, {
# description = "t2 oasys web"
# oasys-environment = "t2"
# oracle-db-hostname = "db.t2.oasys.hmpps-test.modernisation-platform.internal"
# oracle-db-sid = "T2OASYS2"
# })
# })
}

ec2_instances = {
Expand Down Expand Up @@ -380,6 +440,22 @@ locals {
}
]
}
# t2-web-c-http-8080 = {
# priority = 160
# actions = [{
# type = "forward"
# target_group_name = "t2-oasys-web-c-pb-http-8080"
# }]
# conditions = [
# {
# host_header = {
# values = [
# "t2-c.oasys.service.justice.gov.uk",
# ]
# }
# }
# ]
# }
t1-web-http-8080 = {
priority = 300
actions = [{
Expand Down Expand Up @@ -443,6 +519,22 @@ locals {
}
]
}
# t2-web-c-http-8080 = {
# priority = 160
# actions = [{
# type = "forward"
# target_group_name = "t2-oasys-web-c-pv-http-8080"
# }]
# conditions = [
# {
# host_header = {
# values = [
# "t2-c-int.oasys.service.justice.gov.uk",
# ]
# }
# }
# ]
# }
t1-web-http-8080 = {
priority = 300
actions = [{
Expand Down Expand Up @@ -513,3 +605,7 @@ locals {
}
}
}




33 changes: 33 additions & 0 deletions terraform/environments/oasys/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,36 @@ module "baseline" {
lookup(local.baseline_environment_specific, "ssm_parameters", {}),
)
}

# resource "aws_ami" "oasys_san_test" {
# name = "OASys San Test"
# description = "OASys SAN Test backup ami"
# virtualization_type = "hvm"
# root_device_name = "/dev/sda1"
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sda1"
# snapshot_id = "snap-0eefca38cbebc9289"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sda2"
# snapshot_id = "snap-073b980c752b70d71"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sdb"
# snapshot_id = "snap-0ccf326230b3def99"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sdc"
# snapshot_id = "snap-05dcf8714290d64d1"
# }
# tags = merge(
# local.tags,
# {
# Name = "oasys san test"
# },
# )
# }

0 comments on commit 06496e7

Please sign in to comment.