From 09ec6f1bbae250354299dc040eaeb926a170ad0f Mon Sep 17 00:00:00 2001 From: Kolade Adewuyi Date: Tue, 17 Oct 2023 23:45:22 +0100 Subject: [PATCH] DPR2-165: Fix policy role attachment --- .../digital-prison-reporting/modules/dms_s3/iam.tf | 10 ++++------ .../digital-prison-reporting/modules/dms_s3/main.tf | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/terraform/environments/digital-prison-reporting/modules/dms_s3/iam.tf b/terraform/environments/digital-prison-reporting/modules/dms_s3/iam.tf index 300c4d18d79..799ac09bedf 100644 --- a/terraform/environments/digital-prison-reporting/modules/dms_s3/iam.tf +++ b/terraform/environments/digital-prison-reporting/modules/dms_s3/iam.tf @@ -20,9 +20,8 @@ EOF } # Attach s3 target operation policy to the role -resource "aws_iam_role_policy" "dms-s3-target-policy" { +resource "aws_iam_policy" "dms-s3-target-policy" { name = "dms-${var.short_name}-s3-target-policy" - role = aws_iam_role.dms-operator-s3-target-role.id policy = <