Skip to content

Commit

Permalink
log suggestion to delete IRSA when create stack fails (#3332)
Browse files Browse the repository at this point in the history
* log suggestion to delete IRSA when create stack fails

* Update pkg/cfn/manager/iam.go

Co-authored-by: Chetan Patwal <[email protected]>

Co-authored-by: Chetan Patwal <[email protected]>
  • Loading branch information
Jake Klein and cPu1 authored Feb 23, 2021
1 parent c2794f0 commit b6e122b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cfn/manager/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (c *StackCollection) createIAMServiceAccountTask(errs chan error, spec *api
spec.Tags[api.IAMServiceAccountNameTag] = spec.NameString()

if err := c.CreateStack(name, stack, spec.Tags, nil, errs); err != nil {
logger.Info("an error occurred creating the stack, to cleanup resources, run 'eksctl delete iamserviceaccount --region=%s --name=%s --namespace=%s'", c.spec.Metadata.Region, spec.Name, spec.Namespace)
return err
}
return nil
Expand Down

0 comments on commit b6e122b

Please sign in to comment.