mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user