Skip to content

Commit

Permalink
Merge pull request #4087 from ministryofjustice/CC-2202/EBS-DB-volumes
Browse files Browse the repository at this point in the history
CC-2202: New volumes for EBS DB in Test and Pre-Production.
  • Loading branch information
mmgovuk authored Nov 27, 2023
2 parents 5ff614a + f630809 commit fbd765b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
14 changes: 13 additions & 1 deletion terraform/environments/ccms-ebs/application_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@
"ebs_size_ebsdb_u01": 300,
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_iops_ebsdb_dbf01": 12000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_iops_ebsdb_dbf02": 12000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_iops_ebsdb_dbf03": 12000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_dbf_dr": 8000,
"ebs_size_ebsdb_redoA": 100,
Expand Down Expand Up @@ -150,8 +153,11 @@
"ebs_size_ebsdb_u01": 300,
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_iops_ebsdb_dbf01": 12000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_iops_ebsdb_dbf02": 12000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_iops_ebsdb_dbf03": 12000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_redoA": 100,
"ebs_size_ebsdb_redoB": 50,
Expand Down Expand Up @@ -229,8 +235,11 @@
"ebs_size_ebsdb_u01": 300,
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_iops_ebsdb_dbf01": 24000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_iops_ebsdb_dbf02": 24000,
"ebs_size_ebsdb_dbf02": 5000,
"ebs_iops_ebsdb_dbf03": 24000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_redoA": 100,
"ebs_size_ebsdb_redoB": 50,
Expand Down Expand Up @@ -308,8 +317,11 @@
"ebs_size_ebsdb_u01": 300,
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_iops_ebsdb_dbf01": 24000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_iops_ebsdb_dbf02": 24000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_iops_ebsdb_dbf03": 24000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_redoA": 100,
"ebs_size_ebsdb_redoB": 50,
Expand Down
18 changes: 9 additions & 9 deletions terraform/environments/ccms-ebs/ccms-ec2-oracle_ebs_db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,14 @@ resource "aws_volume_attachment" "diag_att" {
}

resource "aws_ebs_volume" "dbf01" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
availability_zone = "eu-west-2a"
size = local.application_data.accounts[local.environment].ebs_size_ebsdb_dbf01
type = "io2"
iops = 12000
iops = local.application_data.accounts[local.environment].ebs_iops_ebsdb_dbf01
encrypted = true
kms_key_id = data.aws_kms_key.ebs_shared.key_id
tags = merge(local.tags,
Expand All @@ -278,7 +278,7 @@ resource "aws_ebs_volume" "dbf01" {
}

resource "aws_volume_attachment" "dbf01_att" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf01
]
Expand All @@ -289,14 +289,14 @@ resource "aws_volume_attachment" "dbf01_att" {


resource "aws_ebs_volume" "dbf02" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
availability_zone = "eu-west-2a"
size = local.application_data.accounts[local.environment].ebs_size_ebsdb_dbf02
type = "io2"
iops = 12000
iops = local.application_data.accounts[local.environment].ebs_iops_ebsdb_dbf02
encrypted = true
kms_key_id = data.aws_kms_key.ebs_shared.key_id
tags = merge(local.tags,
Expand All @@ -305,7 +305,7 @@ resource "aws_ebs_volume" "dbf02" {
}

resource "aws_volume_attachment" "dbf02_att" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf02
]
Expand All @@ -316,14 +316,14 @@ resource "aws_volume_attachment" "dbf02_att" {


resource "aws_ebs_volume" "dbf03" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
availability_zone = "eu-west-2a"
size = local.application_data.accounts[local.environment].ebs_size_ebsdb_dbf03
type = "io2"
iops = 12000
iops = local.application_data.accounts[local.environment].ebs_iops_ebsdb_dbf03
encrypted = true
kms_key_id = data.aws_kms_key.ebs_shared.key_id
tags = merge(local.tags,
Expand All @@ -332,7 +332,7 @@ resource "aws_ebs_volume" "dbf03" {
}

resource "aws_volume_attachment" "dbf03_att" {
count = local.is-development ? 1 : 0
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf03
]
Expand Down

0 comments on commit fbd765b

Please sign in to comment.