Skip to content

Commit

Permalink
Fix duplicate entry check (#5080)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso authored Apr 7, 2022
1 parent cd173eb commit cfde8c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/ctl/create/iamidentitymapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/authconfigmap"
"github.com/weaveworks/eksctl/pkg/ctl/cmdutils"
Expand Down Expand Up @@ -137,7 +138,7 @@ func doCreateIAMIdentityMapping(cmd *cmdutils.Cmd, options iamIdentityMappingOpt
for _, identity := range identities {
arn := identity.ARN()

if iam.CompareIdentity(id, identity) {
if iam.CompareIdentity(id, identity) && options.NoDuplicateArns {
logger.Warning("found existing mapping that matches the one being created, quitting.")
return nil
}
Expand Down

0 comments on commit cfde8c9

Please sign in to comment.