@@ -45,7 +45,8 @@ func (c *Creator) CreateTasks(ctx context.Context, podIdentityAssociations []api
45
45
taskTree := & tasks.TaskTree {
46
46
Parallel : true ,
47
47
}
48
- for i , pia := range podIdentityAssociations {
48
+ for _ , pia := range podIdentityAssociations {
49
+ pia := pia
49
50
piaCreationTasks := & tasks.TaskTree {
50
51
Parallel : false ,
51
52
IsSubTask : true ,
@@ -55,7 +56,7 @@ func (c *Creator) CreateTasks(ctx context.Context, podIdentityAssociations []api
55
56
ctx : ctx ,
56
57
info : fmt .Sprintf ("create IAM role for pod identity association for service account %q" , pia .NameString ()),
57
58
clusterName : c .clusterName ,
58
- podIdentityAssociation : & podIdentityAssociations [ i ] ,
59
+ podIdentityAssociation : & pia ,
59
60
stackCreator : c .stackCreator ,
60
61
})
61
62
}
@@ -75,7 +76,7 @@ func (c *Creator) CreateTasks(ctx context.Context, podIdentityAssociations []api
75
76
ctx : ctx ,
76
77
info : fmt .Sprintf ("create pod identity association for service account %q" , pia .NameString ()),
77
78
clusterName : c .clusterName ,
78
- podIdentityAssociation : & podIdentityAssociations [ i ] ,
79
+ podIdentityAssociation : & pia ,
79
80
eksAPI : c .eksAPI ,
80
81
})
81
82
taskTree .Append (piaCreationTasks )
0 commit comments