Skip to content

Commit

Permalink
remove unused environment variables from db-backup task definition
Browse files Browse the repository at this point in the history
(Prior to this change, when cron_schedule changed, it forced an unnecessary change in the task definition.)
  • Loading branch information
briskt committed Aug 7, 2024
1 parent 075cd4d commit b543fe9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions terraform/032-db-backup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,13 @@ resource "aws_iam_user_policy" "backup" {
*/
locals {
task_def_backup = templatefile("${path.module}/task-definition.json", {
app_env = var.app_env
app_name = var.app_name
aws_region = local.aws_region
cloudwatch_log_group_name = var.cloudwatch_log_group_name
aws_access_key = aws_iam_access_key.backup.id
aws_secret_key = aws_iam_access_key.backup.secret
cpu = var.cpu
cron_schedule = var.cron_schedule
db_names = join(" ", var.db_names)
docker_image = var.docker_image
idp_name = var.idp_name
mysql_host = var.mysql_host
mysql_pass = var.mysql_pass
mysql_user = var.mysql_user
Expand Down
1 change: 0 additions & 1 deletion terraform/032-db-backup/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ output "s3_bucket_name" {
output "s3_bucket_arn" {
value = aws_s3_bucket.backup.arn
}

16 changes: 0 additions & 16 deletions terraform/032-db-backup/task-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
"ulimits": null,
"dockerSecurityOptions": null,
"environment": [
{
"name": "APP_ENV",
"value": "${app_env}"
},
{
"name": "APP_NAME",
"value": "${app_name}"
},
{
"name": "AWS_ACCESS_KEY",
"value": "${aws_access_key}"
Expand All @@ -31,18 +23,10 @@
"name": "AWS_SECRET_KEY",
"value": "${aws_secret_key}"
},
{
"name": "CRON_SCHEDULE",
"value": "${cron_schedule}"
},
{
"name": "DB_NAMES",
"value": "${db_names}"
},
{
"name": "IDP_NAME",
"value": "${idp_name}"
},
{
"name": "MODE",
"value": "${service_mode}"
Expand Down
1 change: 0 additions & 1 deletion terraform/032-db-backup/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ variable "service_mode" {
variable "vpc_id" {
type = string
}

0 comments on commit b543fe9

Please sign in to comment.