Merge pull request #45168 from redbaron/fix-aws-tagging

Automatic merge from submit-queue (batch tested with PRs 43505, 45168, 46439, 46677, 46623)

fix AWS tagging to add missing tags only

It seems that intention of original code was to build map of missing
tags and call AWS API to add just them, but due to typo full
set of tags was always (re)added

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-06-01 05:43:39 -07:00 committed by GitHub
commit 5c048ac258

View File

@ -174,7 +174,11 @@ func (c *awsTagging) readRepairClusterTags(client EC2, resourceID string, lifecy
}
}
if err := c.createTags(client, resourceID, lifecycle, additionalTags); err != nil {
if len(addTags) == 0 {
return nil
}
if err := c.createTags(client, resourceID, lifecycle, addTags); err != nil {
return fmt.Errorf("error adding missing tags to resource %q: %v", resourceID, err)
}