Skip to content

Commit

Permalink
TM-586 Stop backup overnight from MP schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
vc13837 committed Oct 21, 2024
1 parent e02fd02 commit ea86b0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 11 additions & 5 deletions terraform/environments/apex/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ resource "aws_instance" "apex_db_instance" {
volume_type = "gp2"
tags = merge(
local.tags,
{ "Name" = "${local.application_name}db-ec2-root" }
{ "Name" = "${local.application_name}db-ec2-root" },
{ "backup" = "false" }
)
}

tags = merge(
local.tags,
{ "Name" = local.database_ec2_name },
{ "instance-scheduling" = "skip-scheduling" },
{ "backup" = "false" },
local.backup_schedule_tags
)
}
Expand Down Expand Up @@ -176,7 +178,8 @@ resource "aws_ebs_volume" "u01-orahome" {
}
tags = merge(
local.tags,
{ "Name" = "${local.application_name}db-ec2-u01-orahome" }
{ "Name" = "${local.application_name}db-ec2-u01-orahome" },
{ "backup" = "false" }
)
}
resource "aws_volume_attachment" "u01-orahome" {
Expand All @@ -197,7 +200,8 @@ resource "aws_ebs_volume" "u02-oradata" {
}
tags = merge(
local.tags,
{ "Name" = "${local.application_name}db-ec2-u02-oradata" }
{ "Name" = "${local.application_name}db-ec2-u02-oradata" },
{ "backup" = "false" }
)
}

Expand All @@ -221,7 +225,8 @@ resource "aws_ebs_volume" "u03-redo" {
}
tags = merge(
local.tags,
{ "Name" = "${local.application_name}db-ec2-u03-redo" }
{ "Name" = "${local.application_name}db-ec2-u03-redo" },
{ "backup" = "false" }
)
}
resource "aws_volume_attachment" "u03-redo" {
Expand All @@ -242,7 +247,8 @@ resource "aws_ebs_volume" "u04-arch" {
}
tags = merge(
local.tags,
{ "Name" = "${local.application_name}db-ec2-u04-arch" }
{ "Name" = "${local.application_name}db-ec2-u04-arch" },
{ "backup" = "false" }
)
}
resource "aws_volume_attachment" "u04-arch" {
Expand Down
6 changes: 3 additions & 3 deletions terraform/environments/apex/modules/ecs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,19 @@ resource "aws_launch_template" "ec2-launch-template" {
resource_type = "instance"
tags = merge(tomap({
"Name" = "${var.app_name}-ecs-cluster"
}), var.tags_common)
}), var.tags_common, { "backup" = "false" })
}

tag_specifications {
resource_type = "volume"
tags = merge(tomap({
"Name" = "${var.app_name}-ecs-cluster"
}), var.tags_common)
}), var.tags_common, { "backup" = "false" })
}

tags = merge(tomap({
"Name" = "${var.app_name}-ecs-cluster-template"
}), var.tags_common)
}), var.tags_common, { "backup" = "false" })
}

# IAM Role, policy and instance profile (to attach the role to the EC2)
Expand Down

0 comments on commit ea86b0b

Please sign in to comment.