@@ -235,12 +235,11 @@ func (ctx *EksInstanceGroupContext) UpdateScalingGroup(configName string, scalin
235235
236236func (ctx * EksInstanceGroupContext ) TagsUpdateNeeded () bool {
237237 var (
238- instanceGroup = ctx .GetInstanceGroup ()
239- configuration = instanceGroup .GetEKSConfiguration ()
240- state = ctx .GetDiscoveredState ()
241- scalingGroup = state .GetScalingGroup ()
242- asgName = aws .StringValue (scalingGroup .AutoScalingGroupName )
243- rmTags = ctx .GetRemovedTags (asgName )
238+ state = ctx .GetDiscoveredState ()
239+ scalingGroup = state .GetScalingGroup ()
240+ asgName = aws .StringValue (scalingGroup .AutoScalingGroupName )
241+ rmTags = ctx .GetRemovedTags (asgName )
242+ addedTags = ctx .GetAddedTags (asgName )
244243 )
245244
246245 if len (rmTags ) > 0 {
@@ -256,7 +255,11 @@ func (ctx *EksInstanceGroupContext) TagsUpdateNeeded() bool {
256255 existingTags = append (existingTags , tagSet )
257256 }
258257
259- for _ , tag := range configuration .GetTags () {
258+ for _ , tag := range addedTags {
259+ tag := map [string ]string {
260+ "key" : aws .StringValue (tag .Key ),
261+ "value" : aws .StringValue (tag .Value ),
262+ }
260263 if ! common .StringMapSliceContains (existingTags , tag ) {
261264 return true
262265 }
0 commit comments