Merge pull request #9667 from lvyangyang/automated-cherry-pick-of-#9636-upstream-release-3.7

Automated cherry pick of #9636: fix(region): aws lb create tags param
This commit is contained in:
Zexi Li
2020-12-26 12:18:34 +08:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -625,7 +625,7 @@ func (self *SRegion) CreateInstance(name string, imageId string, instanceType st
}
if len(tags) > 0 {
tagIdx := 0
tagIdx := 1
for k, v := range tags {
params[fmt.Sprintf("Tag.%d.Key", tagIdx)] = k
params[fmt.Sprintf("Tag.%d.Value", tagIdx)] = v
+4 -1
View File
@@ -907,7 +907,10 @@ func (self *SRegion) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalanc
Value: &values[i],
})
}
params.SetTags(tagInput)
if len(loadbalancer.Tags) > 0 {
params.SetTags(tagInput)
}
ret, err := client.CreateLoadBalancer(params)
if err != nil {
return nil, err