From ae1c14c028f48ccefc1020da3747a4b3b4f2b17a Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Wed, 27 Nov 2024 10:22:07 +0000 Subject: [PATCH] Add index identifiers to prevent errors on plan/apply --- terraform/aws/data-lifecycle-manager.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/aws/data-lifecycle-manager.tf b/terraform/aws/data-lifecycle-manager.tf index 285f74bc6..f6bb262a4 100644 --- a/terraform/aws/data-lifecycle-manager.tf +++ b/terraform/aws/data-lifecycle-manager.tf @@ -23,7 +23,7 @@ resource "aws_iam_role" "dlm_lifecycle_role" { resource "aws_iam_role_policy" "dlm_lifecycle" { count = var.enable_nfs_backup ? 1 : 0 name = "dlm-lifecycle-policy" - role = aws_iam_role.dlm_lifecycle_role.id + role = aws_iam_role.dlm_lifecycle_role[0].id policy = jsonencode({ Version = "2012-10-17" @@ -55,7 +55,7 @@ resource "aws_iam_role_policy" "dlm_lifecycle" { resource "aws_dlm_lifecycle_policy" "nfs_backup" { count = var.enable_nfs_backup ? 1 : 0 description = "DLM lifecycle policy for NFS home directories backup" - execution_role_arn = aws_iam_role.dlm_lifecycle_role.arn + execution_role_arn = aws_iam_role.dlm_lifecycle_role[0].arn state = "ENABLED" policy_details {