Skip to content

Commit

Permalink
Fix providerlint 'AWSAT005: avoid hardcoded ARN AWS partitions, use a…
Browse files Browse the repository at this point in the history
…ws_partition data source'.
  • Loading branch information
ewbankkit committed Aug 2, 2024
1 parent 04bdac9 commit 6d7e4ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/service/rds/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ locals {
}
data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
resource "aws_security_group" "test" {
name = %[1]q
Expand Down Expand Up @@ -375,7 +376,7 @@ resource "aws_redshift_resource_policy" "test" {
Statement = [{
Effect = "Allow"
Principal = {
AWS = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"
AWS = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:root"
}
Action = "redshift:CreateInboundIntegration"
Resource = aws_redshiftserverless_namespace.test.arn
Expand Down Expand Up @@ -428,7 +429,7 @@ data "aws_iam_policy_document" "key_policy" {
resources = ["*"]
principals {
type = "AWS"
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"]
identifiers = ["arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:root"]
}
}
Expand Down

0 comments on commit 6d7e4ed

Please sign in to comment.