From 6555937e6dedc7dee91dc1ab230d0e1a119f3402 Mon Sep 17 00:00:00 2001 From: roncitrus Date: Wed, 13 Dec 2023 16:40:35 +0000 Subject: [PATCH] associate rds role --- terraform/environments/cdpt-chaps/database.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terraform/environments/cdpt-chaps/database.tf b/terraform/environments/cdpt-chaps/database.tf index e03a5f04869..60fef47dcb0 100644 --- a/terraform/environments/cdpt-chaps/database.tf +++ b/terraform/environments/cdpt-chaps/database.tf @@ -11,8 +11,12 @@ resource "aws_db_instance" "database" { identifier = local.application_data.accounts[local.environment].db_instance_identifier username = local.application_data.accounts[local.environment].db_user password = data.aws_secretsmanager_secret_version.db_password.secret_string - iam_role_arn = aws_iam_role.S3_db_backup_restore_access.arn +} +resource "aws_db_instance_role_association" "database" { + db_instance_identifier = aws_db_instance.database.identifier + feature_name = "S3_INTEGRATION" + role_arn = aws_iam_role.S3_db_backup_restore_access.arn } output "s3_db_backup_restore_access_role_arn" {