From 23de860d00f8486f21d9616b4e615c400ccaf576 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Tue, 20 Oct 2020 13:24:51 -0400 Subject: [PATCH] tests/provider: Fix hardcoded ARN (Route53) --- aws/resource_aws_route53_query_log_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws/resource_aws_route53_query_log_test.go b/aws/resource_aws_route53_query_log_test.go index 7b46bb9be32..9b0323a3d40 100644 --- a/aws/resource_aws_route53_query_log_test.go +++ b/aws/resource_aws_route53_query_log_test.go @@ -161,6 +161,8 @@ resource "aws_cloudwatch_log_group" "test" { retention_in_days = 1 } +data "aws_partition" "current" {} + data "aws_iam_policy_document" "test" { statement { actions = [ @@ -168,10 +170,10 @@ data "aws_iam_policy_document" "test" { "logs:PutLogEvents", ] - resources = ["arn:aws:logs:*:*:log-group:/aws/route53/*"] + resources = ["arn:${data.aws_partition.current.partition}:logs:*:*:log-group:/aws/route53/*"] principals { - identifiers = ["route53.amazonaws.com"] + identifiers = ["route53.${data.aws_partition.current.dns_suffix}"] type = "Service" } }