Skip to content

Commit 2c35b49

Browse files
committed
Fix hardocded partitions
1 parent d91b54e commit 2c35b49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/service/events/put_events_action_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ resource "terraform_data" "trigger" {
307307
// nosemgrep: ci.events-in-func-name -- Function reflects PutEvents operation naming for consistency.
308308
func testAccPutEventsActionConfig_customBus(rName string) string {
309309
return fmt.Sprintf(`
310+
data "aws_partition" "current" {}
311+
310312
resource "aws_cloudwatch_event_bus" "test" {
311313
name = %[1]q
312314
}
@@ -357,7 +359,7 @@ action "aws_events_put_events" "test" {
357359
detail_type = "Custom Event"
358360
event_bus_name = aws_cloudwatch_event_bus.test.name
359361
time = "2023-01-01T12:00:00Z"
360-
resources = ["arn:aws:s3:::example-bucket"]
362+
resources = ["arn:${data.aws_partition.current.partition}:s3:::example-bucket"]
361363
detail = jsonencode({
362364
custom_field = "custom_value"
363365
marker = %[1]q

0 commit comments

Comments
 (0)