@@ -223,7 +223,8 @@ type Client interface {
223223 ListPolicyVersions (policyArn string ) ([]PolicyVersion , error )
224224 GetCallerIdentity () (* sts.GetCallerIdentityOutput , error )
225225 CheckIfMachinePoolHasDedicatedHost (instanceIDs []string ) (bool , error )
226- CreateStackWithParamsTags (ctx context.Context , cfTemplateBody , stackName string , stackParams , stackTags map [string ]string ) (* string , error )
226+ CreateStackWithParamsTags (ctx context.Context , cfTemplateBody , stackName string ,
227+ stackParams , stackTags map [string ]string ) (* string , error )
227228 GetCFStack (ctx context.Context , stackName string ) (* cftypes.Stack , error )
228229 DescribeCFStackResources (ctx context.Context , stackName string ) (* []cftypes.StackResource , error )
229230 DeleteCFStack (ctx context.Context , stackName string ) error
@@ -559,7 +560,7 @@ func (c *awsClient) FetchPublicSubnetMap(subnets []ec2types.Subnet) (map[string]
559560 }
560561 if routeTablesResp == nil {
561562 return mapSubnetIdToPublic , fmt .Errorf (
562- "No route table found for associated subnets '%s'" ,
563+ "no route table found for associated subnets '%s'" ,
563564 helper .SliceToSortedString (aws .ToStringSlice (subnetIds )),
564565 )
565566 }
@@ -823,7 +824,7 @@ func (c *awsClient) ValidateCredentials() (bool, error) {
823824 _ , err := c .stsClient .GetCallerIdentity (context .Background (), & sts.GetCallerIdentityInput {})
824825 if err != nil {
825826 if strings .Contains (fmt .Sprintf ("%s" , err ), "InvalidClientTokenId" ) {
826- awsErr := fmt .Errorf ("Invalid AWS Credentials: %s.\n For help configuring your credentials, see %s" ,
827+ awsErr := fmt .Errorf ("invalid AWS Credentials: %s.\n For help configuring your credentials, see %s" ,
827828 err ,
828829 "https://docs.openshift.com/rosa/rosa_install_access_delete_clusters/rosa_getting_started_iam/" +
829830 "rosa-config-aws-account.html#rosa-configuring-aws-account_rosa-config-aws-account" )
@@ -1137,7 +1138,7 @@ func (c *awsClient) GetAvailabilityZoneType(availabilityZoneName string) (string
11371138 return "" , err
11381139 }
11391140 if len (availabilityZones .AvailabilityZones ) < 1 {
1140- return "" , fmt .Errorf ("Failed to find availability zone '%s'" , availabilityZoneName )
1141+ return "" , fmt .Errorf ("failed to find availability zone '%s'" , availabilityZoneName )
11411142 }
11421143 return aws .ToString (availabilityZones .AvailabilityZones [0 ].ZoneType ), nil
11431144}
@@ -1435,7 +1436,8 @@ func (c *awsClient) ListServiceAccountRoles(clusterName string) ([]iamtypes.Role
14351436 }
14361437
14371438 for _ , tag := range listTagsResult .Tags {
1438- if aws .ToString (tag .Key ) == iamserviceaccount .RoleTypeTagKey && aws .ToString (tag .Value ) == iamserviceaccount .ServiceAccountRoleType {
1439+ if aws .ToString (tag .Key ) == iamserviceaccount .RoleTypeTagKey &&
1440+ aws .ToString (tag .Value ) == iamserviceaccount .ServiceAccountRoleType {
14391441 isServiceAccountRole = true
14401442 }
14411443 if aws .ToString (tag .Key ) == iamserviceaccount .ClusterTagKey && aws .ToString (tag .Value ) == clusterName {
@@ -1460,17 +1462,19 @@ func (c *awsClient) ListServiceAccountRoles(clusterName string) ([]iamtypes.Role
14601462}
14611463
14621464// GetServiceAccountRoleDetails gets detailed information about a service account role using existing methods
1463- func (c * awsClient ) GetServiceAccountRoleDetails (roleName string ) (* iamtypes.Role , []iamtypes.AttachedPolicy , []string , error ) {
1465+ func (c * awsClient ) GetServiceAccountRoleDetails (roleName string ) (
1466+ * iamtypes.Role , []iamtypes.AttachedPolicy , []string , error ) {
14641467 // Use existing GetRoleByName method
14651468 role , err := c .GetRoleByName (roleName )
14661469 if err != nil {
14671470 return nil , nil , nil , fmt .Errorf ("failed to get role %s: %w" , roleName , err )
14681471 }
14691472
14701473 // Get attached managed policies
1471- listAttachedPoliciesResult , err := c .iamClient .ListAttachedRolePolicies (context .Background (), & iam.ListAttachedRolePoliciesInput {
1472- RoleName : aws .String (roleName ),
1473- })
1474+ listAttachedPoliciesResult , err := c .iamClient .ListAttachedRolePolicies (context .Background (),
1475+ & iam.ListAttachedRolePoliciesInput {
1476+ RoleName : aws .String (roleName ),
1477+ })
14741478 if err != nil {
14751479 return nil , nil , nil , fmt .Errorf ("failed to list attached policies for role %s: %w" , roleName , err )
14761480 }
0 commit comments