Skip to content

Commit

Permalink
Merge pull request #212 from kingsoftcloud/trunk
Browse files Browse the repository at this point in the history
Trunk
  • Loading branch information
notone0010 authored May 13, 2024
2 parents 5a88050 + 958ccff commit b85cff5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ vendor_bk
website_bk
go.sum
package.json
.DS_Store
.DS_Store
_output/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.15.6 (May 13, 2024)

BUGFIX:
- `ksyun_security_group_entry` 修复了在创建安全组规则时,触发的not exist问题


## 1.15.5 (May 13, 2024)

BUGFIX:
Expand Down
15 changes: 13 additions & 2 deletions ksyun/service_ksyun_vpc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ksyun

import (
"bytes"
"context"
"fmt"
"reflect"
Expand Down Expand Up @@ -2678,12 +2679,22 @@ func (s *VpcService) CreateSecurityGroupEntryCommonCall(req map[string]interface
afterCall: func(d *schema.ResourceData, client *KsyunClient, resp *map[string]interface{}, call ApiCall) (err error) {
logger.Debug(logger.RespFormat, call.action, *(call.param), *resp)
if isSetId {
var data map[string]interface{}
var (
data map[string]interface{}
buf bytes.Buffer
retry int
)
again:
data, err = s.ReadSecurityGroupEntry(d, (*(call.param))["SecurityGroupId"].(string))
if err != nil {
if notFoundError(err) && retry < 10 {
time.Sleep(3 * time.Second)
retry++
goto again
}
return err
}
buf := securityGroupEntryHashBase(data, true)
buf = securityGroupEntryHashBase(data, true)
d.SetId((*(call.param))["SecurityGroupId"].(string) + buf.String())
}
return err
Expand Down

0 comments on commit b85cff5

Please sign in to comment.