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" {