From 3f9f62222b91843fb7ad5ca9e70c4f3af100464a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Coelho?= <16445494+jcoelho93@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:12:41 +0000 Subject: [PATCH] Fix basic config --- internal/service/logs/index_policy_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/service/logs/index_policy_test.go b/internal/service/logs/index_policy_test.go index 3872ef8ae68..311b78368bf 100644 --- a/internal/service/logs/index_policy_test.go +++ b/internal/service/logs/index_policy_test.go @@ -300,7 +300,7 @@ func testAccCheckIndexPolicyNotRecreated(before, after *cloudwatchlogs.DescribeI } } -func testAccIndexPolicyConfig_basic(rName, version string) string { +func testAccIndexPolicyConfig_basic(logGroupName string, policyDocument string) string { return fmt.Sprintf(` resource "aws_cloudwatch_log_group" "test" { name = %[1]q @@ -308,11 +308,7 @@ resource "aws_cloudwatch_log_group" "test" { resource "aws_cloudwatch_log_index_policy" "test" { log_group_name = aws_cloudwatch_log_group.test.name - policy_document = jsonencode({ - Fields = [ - "eventName" - ] - }) + policy_document = jsonencode(%[2]q) } -`, rName, version) +`, logGroupName, policyDocument) }