Skip to content

Commit

Permalink
Merge pull request #4505 from ministryofjustice/CC-2292/EBS-DB-volumes
Browse files Browse the repository at this point in the history
CC-2292: New volumes for EBS DB in the Production environment.
  • Loading branch information
mmgovuk authored Jan 11, 2024
2 parents ae2dede + bac8583 commit 082410a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion terraform/environments/ccms-ebs/application_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
"ebs_iops_ebsdb_dbf01": 24000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_iops_ebsdb_dbf02": 24000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_size_ebsdb_dbf02": 5000,
"ebs_iops_ebsdb_dbf03": 24000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_redoA": 100,
Expand Down
14 changes: 3 additions & 11 deletions terraform/environments/ccms-ebs/ccms-ec2-oracle_ebs_db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ resource "aws_volume_attachment" "diag_att" {
}

resource "aws_ebs_volume" "dbf01" {
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
Expand All @@ -278,18 +277,15 @@ resource "aws_ebs_volume" "dbf01" {
}

resource "aws_volume_attachment" "dbf01_att" {
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf01
]
device_name = "/dev/sdq"
volume_id = aws_ebs_volume.dbf01[0].id
volume_id = aws_ebs_volume.dbf01.id
instance_id = aws_instance.ec2_oracle_ebs.id
}


resource "aws_ebs_volume" "dbf02" {
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
Expand All @@ -305,18 +301,15 @@ resource "aws_ebs_volume" "dbf02" {
}

resource "aws_volume_attachment" "dbf02_att" {
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf02
]
device_name = "/dev/sdr"
volume_id = aws_ebs_volume.dbf02[0].id
volume_id = aws_ebs_volume.dbf02.id
instance_id = aws_instance.ec2_oracle_ebs.id
}


resource "aws_ebs_volume" "dbf03" {
count = local.is-production ? 0 : 1
lifecycle {
ignore_changes = [kms_key_id]
}
Expand All @@ -332,12 +325,11 @@ resource "aws_ebs_volume" "dbf03" {
}

resource "aws_volume_attachment" "dbf03_att" {
count = local.is-production ? 0 : 1
depends_on = [
aws_ebs_volume.dbf03
]
device_name = "/dev/sds"
volume_id = aws_ebs_volume.dbf03[0].id
volume_id = aws_ebs_volume.dbf03.id
instance_id = aws_instance.ec2_oracle_ebs.id
}

Expand Down

0 comments on commit 082410a

Please sign in to comment.