Skip to content

Commit 529e8e9

Browse files
committed
Tweak 'testAccModelInvocationLoggingConfigurationConfig_basic' to support v6.0.0 upgrade tests.
1 parent d50b500 commit 529e8e9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/service/bedrock/model_invocation_logging_configuration_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ resource "aws_s3_bucket" "test" {
219219
}
220220
}
221221
222+
# Use "data.aws_region.current.name" instead of "data.aws_region.current.region" as this configguration
223+
# is used in a v6.0.0 upgrade test and must work in pre-v6.0.0 scenarios.
224+
222225
resource "aws_s3_bucket_policy" "test" {
223226
bucket = aws_s3_bucket.test.bucket
224227
@@ -241,7 +244,7 @@ resource "aws_s3_bucket_policy" "test" {
241244
"aws:SourceAccount": "${data.aws_caller_identity.current.account_id}"
242245
},
243246
"ArnLike": {
244-
"aws:SourceArn": "arn:${data.aws_partition.current.partition}:bedrock:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:*"
247+
"aws:SourceArn": "arn:${data.aws_partition.current.partition}:bedrock:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:*"
245248
}
246249
}
247250
}]
@@ -270,7 +273,7 @@ resource "aws_iam_role" "test" {
270273
"aws:SourceAccount": "${data.aws_caller_identity.current.account_id}"
271274
},
272275
"ArnLike": {
273-
"aws:SourceArn": "arn:${data.aws_partition.current.partition}:bedrock:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:*"
276+
"aws:SourceArn": "arn:${data.aws_partition.current.partition}:bedrock:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:*"
274277
}
275278
}
276279
}]

0 commit comments

Comments
 (0)