@@ -477,6 +477,9 @@ func deleteResourcesInCloudFormation(prov client.ConfigProvider, t *cfn_bootstra
477
477
By (fmt .Sprintf ("cleanup for role with name '%s'" , role .RoleName ))
478
478
Eventually (func (gomega Gomega ) bool {
479
479
_ , err := iamSvc .DeleteRole (& iam.DeleteRoleInput {RoleName : aws .String (role .RoleName )})
480
+ if err != nil {
481
+ By (fmt .Sprintf ("failed to delete role '%s'; reason: %s" , role .RoleName , err .Error ()))
482
+ }
480
483
return awserrors .IsNotFound (err ) || err == nil
481
484
}, 5 * time .Minute , 5 * time .Second ).Should (BeTrue ())
482
485
}
@@ -485,6 +488,9 @@ func deleteResourcesInCloudFormation(prov client.ConfigProvider, t *cfn_bootstra
485
488
By (fmt .Sprintf ("cleanup for profile with name '%s'" , profile .InstanceProfileName ))
486
489
Eventually (func (gomega Gomega ) bool {
487
490
_ , err := iamSvc .DeleteInstanceProfile (& iam.DeleteInstanceProfileInput {InstanceProfileName : aws .String (profile .InstanceProfileName )})
491
+ if err != nil {
492
+ By (fmt .Sprintf ("failed to delete role '%s'; reason: %s" , profile .InstanceProfileName , err .Error ()))
493
+ }
488
494
return awserrors .IsNotFound (err ) || err == nil
489
495
}, 5 * time .Minute , 5 * time .Second ).Should (BeTrue ())
490
496
}
@@ -498,6 +504,9 @@ func deleteResourcesInCloudFormation(prov client.ConfigProvider, t *cfn_bootstra
498
504
By (fmt .Sprintf ("cleanup for policy '%s'" , p .String ()))
499
505
Eventually (func (gomega Gomega ) bool {
500
506
_ , err := iamSvc .DeletePolicy (& iam.DeletePolicyInput {PolicyArn : p .Arn })
507
+ if err != nil {
508
+ By (fmt .Sprintf ("failed to delete policy '%s'; reason: %s" , policy .Description , err .Error ()))
509
+ }
501
510
return awserrors .IsNotFound (err ) || err == nil
502
511
}, 5 * time .Minute , 5 * time .Second ).Should (BeTrue ())
503
512
// TODO: why is there a break here? Don't we want to clean up everything?
0 commit comments