From dcd76ca94b5cac8d205cee54035159ea24783add Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Tue, 25 Jun 2024 19:20:52 -0700 Subject: [PATCH] fix replication validation for Role ARN --- pkg/replication/replication.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/replication/replication.go b/pkg/replication/replication.go index 0abbf6efca..65a2f75e94 100644 --- a/pkg/replication/replication.go +++ b/pkg/replication/replication.go @@ -406,6 +406,9 @@ func (c *Config) EditRule(opts Options) error { return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority") } if rule.Destination.Bucket != newRule.Destination.Bucket && rule.ID == newRule.ID { + if c.Role == newRule.Destination.Bucket { + continue + } return fmt.Errorf("invalid destination bucket for this rule") } }