Skip to content

Commit

Permalink
CC-2249: New volumes for EBS DB in the Upgrade environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmgovuk committed Dec 6, 2023
1 parent a67e0c2 commit daa0f57
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_size_ebsdb_dbf_dr": 8000,
"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,
"ebs_size_ebsdb_techst": 100,
Expand Down
74 changes: 73 additions & 1 deletion terraform/environments/ccms-ebs-upgrade/ec2-oracle_ebs_db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,78 @@ resource "aws_volume_attachment" "dbf_att" {
instance_id = aws_instance.ec2_oracle_ebs.id
}

resource "aws_ebs_volume" "dbf01" {
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 = 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,
{ Name = "dbf01" }
)
}

resource "aws_volume_attachment" "dbf01_att" {
depends_on = [
aws_ebs_volume.dbf01
]
device_name = "/dev/sdq"
volume_id = aws_ebs_volume.dbf01.id
instance_id = aws_instance.ec2_oracle_ebs.id
}

resource "aws_ebs_volume" "dbf02" {
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 = 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,
{ Name = "dbf02" }
)
}

resource "aws_volume_attachment" "dbf02_att" {
depends_on = [
aws_ebs_volume.dbf02
]
device_name = "/dev/sdr"
volume_id = aws_ebs_volume.dbf02.id
instance_id = aws_instance.ec2_oracle_ebs.id
}

resource "aws_ebs_volume" "dbf03" {
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 = 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,
{ Name = "dbf03" }
)
}

resource "aws_volume_attachment" "dbf03_att" {
depends_on = [
aws_ebs_volume.dbf03
]
device_name = "/dev/sds"
volume_id = aws_ebs_volume.dbf03.id
instance_id = aws_instance.ec2_oracle_ebs.id
}

resource "aws_ebs_volume" "redoA" {
lifecycle {
ignore_changes = [kms_key_id]
Expand Down Expand Up @@ -242,7 +314,6 @@ resource "aws_volume_attachment" "diag_att" {
instance_id = aws_instance.ec2_oracle_ebs.id
}


resource "aws_ebs_volume" "appshare" {
lifecycle {
ignore_changes = [kms_key_id]
Expand Down Expand Up @@ -309,6 +380,7 @@ resource "aws_volume_attachment" "db_temp_att" {
volume_id = aws_ebs_volume.db_temp.id
instance_id = aws_instance.ec2_oracle_ebs.id
}

/*
#### This mount was required for golive incident
#### Just commenting out, rather than remove - just in case
Expand Down

0 comments on commit daa0f57

Please sign in to comment.