Skip to content

Commit

Permalink
LAWS-3713: added 2nd EBS volume
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-kovalyov committed Mar 28, 2024
1 parent 7586917 commit 64e8067
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions terraform/environments/oas/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -309,29 +309,29 @@ resource "aws_volume_attachment" "oas_EC2ServerVolume01" {
instance_id = aws_instance.oas_app_instance.id
}

# resource "aws_ebs_volume" "EC2ServerVolumeSTAGE" {
# availability_zone = "eu-west-2a"
# size = local.application_data.accounts[local.environment].stageesize
# type = "gp3"
# encrypted = true
# kms_key_id = data.aws_kms_key.ebs_shared.key_id
# snapshot_id = local.application_data.accounts[local.environment].stage_snapshot
resource "aws_ebs_volume" "EC2ServerVolumeSTAGE" {
availability_zone = "eu-west-2a"
size = local.application_data.accounts[local.environment].stageesize
type = "gp3"
encrypted = true
kms_key_id = data.aws_kms_key.ebs_shared.key_id
snapshot_id = local.application_data.accounts[local.environment].stage_snapshot

# lifecycle {
# ignore_changes = [kms_key_id]
# }
lifecycle {
ignore_changes = [kms_key_id]
}

# tags = merge(
# local.tags,
# { "Name" = "${local.application_name}-EC2ServerVolumeSTAGE" },
# )
# }
tags = merge(
local.tags,
{ "Name" = "${local.application_name}-EC2ServerVolumeSTAGE" },
)
}

# resource "aws_volume_attachment" "oas_EC2ServerVolume02" {
# device_name = "/dev/sdc"
# volume_id = aws_ebs_volume.EC2ServerVolumeSTAGE.id
# instance_id = aws_instance.oas_app_instance.id
# }
resource "aws_volume_attachment" "oas_EC2ServerVolume02" {
device_name = "/dev/sdc"
volume_id = aws_ebs_volume.EC2ServerVolumeSTAGE.id
instance_id = aws_instance.oas_app_instance.id
}

resource "aws_route53_record" "oas-app" {
provider = aws.core-vpc
Expand Down

0 comments on commit 64e8067

Please sign in to comment.