From 8695cc731c8f1aee3e8752c9e494f72a2dd74af3 Mon Sep 17 00:00:00 2001 From: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Date: Wed, 6 Apr 2022 17:44:16 +0200 Subject: [PATCH] Fix duplicate entry check --- pkg/ctl/create/iamidentitymapping.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ctl/create/iamidentitymapping.go b/pkg/ctl/create/iamidentitymapping.go index 4f38fefc1a..bc76500c09 100644 --- a/pkg/ctl/create/iamidentitymapping.go +++ b/pkg/ctl/create/iamidentitymapping.go @@ -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" @@ -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 }