Skip to content

Commit 33b409f

Browse files
committed
aws: permissions: update to latest CCO version.
A few changes are necessary to adapt to the upstream changes.
1 parent 819de7e commit 33b409f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/asset/installconfig/aws/permissions.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77

88
"github.com/aws/aws-sdk-go/aws/session"
9-
"github.com/aws/aws-sdk-go/service/iam"
109
"github.com/sirupsen/logrus"
1110

1211
ccaws "github.com/openshift/cloud-credential-operator/pkg/aws"
@@ -277,10 +276,7 @@ func ValidateCreds(ssn *session.Session, groups []PermissionGroup, region string
277276
requiredPermissions = append(requiredPermissions, groupPerms...)
278277
}
279278

280-
client, err := ccaws.NewClientFromIAMClient(iam.New(ssn))
281-
if err != nil {
282-
return fmt.Errorf("failed to create client for permission check: %w", err)
283-
}
279+
client := ccaws.NewClientFromSession(ssn)
284280

285281
sParams := &ccaws.SimulateParams{
286282
Region: region,

0 commit comments

Comments
 (0)