From 8c8e4e9a9e190dc9159a3534218af33b46820f0a Mon Sep 17 00:00:00 2001 From: Fawaz Shafaat Date: Thu, 20 Jun 2024 16:36:17 +0100 Subject: [PATCH 1/2] Made some changes for db password --- terraform/environments/cdpt-ifs/ecs.tf | 2 +- terraform/environments/cdpt-ifs/secrets.tf | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/environments/cdpt-ifs/ecs.tf b/terraform/environments/cdpt-ifs/ecs.tf index 252da8342ea..d2f4bc1d90c 100644 --- a/terraform/environments/cdpt-ifs/ecs.tf +++ b/terraform/environments/cdpt-ifs/ecs.tf @@ -133,7 +133,7 @@ resource "aws_ecs_task_definition" "ifs_task_definition" { secrets = [ { name : "RDS_PASSWORD", - valueFrom : aws_secretsmanager_secret_version.db_password.arn + valueFrom : aws_secretsmanager_secret_version.dbase_password.arn } ], } diff --git a/terraform/environments/cdpt-ifs/secrets.tf b/terraform/environments/cdpt-ifs/secrets.tf index 0e22ff06e85..f49bdec9fe6 100644 --- a/terraform/environments/cdpt-ifs/secrets.tf +++ b/terraform/environments/cdpt-ifs/secrets.tf @@ -1,5 +1,5 @@ -resource "aws_secretsmanager_secret" "db_password" { - name = "database_password" +resource "aws_secretsmanager_secret" "dbase_password" { + name = "dbase_password" } resource "random_password" "password_long" { @@ -7,7 +7,7 @@ resource "random_password" "password_long" { special = false } -resource "aws_secretsmanager_secret_version" "db_password" { - secret_id = aws_secretsmanager_secret.db_password.id +resource "aws_secretsmanager_secret_version" "dbase_password" { + secret_id = aws_secretsmanager_secret.dbase_password.id secret_string = random_password.password_long.result } From f96d5b55228df0ad525fa5233410b8acc22c0491 Mon Sep 17 00:00:00 2001 From: Fawaz Shafaat Date: Thu, 20 Jun 2024 16:38:46 +0100 Subject: [PATCH 2/2] Error with dbase password --- terraform/environments/cdpt-ifs/database.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/cdpt-ifs/database.tf b/terraform/environments/cdpt-ifs/database.tf index 8a9b1b47eff..3d2c8810a22 100644 --- a/terraform/environments/cdpt-ifs/database.tf +++ b/terraform/environments/cdpt-ifs/database.tf @@ -10,7 +10,7 @@ resource "aws_db_instance" "database" { instance_class = local.application_data.accounts[local.environment].db_instance_class identifier = local.application_data.accounts[local.environment].db_instance_identifier username = local.application_data.accounts[local.environment].db_user - password = aws_secretsmanager_secret_version.db_password.secret_string + password = aws_secretsmanager_secret_version.dbase_password.secret_string vpc_security_group_ids = [aws_security_group.db.id] depends_on = [aws_security_group.db] snapshot_identifier = local.application_data.accounts[local.environment].db_snapshot_identifier