Skip to content

Commit fa9cccd

Browse files
authored
Merge pull request #609 from gailwang/master
Add `disaster_recover_group_ids` with TKE
2 parents e369625 + ed66224 commit fa9cccd

File tree

20 files changed

+806
-390
lines changed

20 files changed

+806
-390
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ ENHANCEMENTS:
1111

1212
* Resource: `tencentcloud_ssl_certificate` refactor logic with api3.0 .
1313
* Data Source: `tencentcloud_ssl_certificates` refactor logic with api3.0 .
14+
* Resource `tencentcloud_kubernetes_cluster` add `disaster_recover_group_ids` to set disaster recover group ID.
15+
* Resource `tencentcloud_kubernetes_scale_worker` add `disaster_recover_group_ids` to set disaster recover group ID.
1416

1517
## 1.54.1 (March 24, 2021)
1618

@@ -29,10 +31,10 @@ FEATURES:
2931

3032
ENHANCEMENTS:
3133

32-
* Resource `tencentcloud_kubernetes_cluster_attachment` add `unschedulable` to sets whether the joining node participates in the schedule.
33-
* Resource `tencentcloud_kubernetes_cluster` add `unschedulable` to sets whether the joining node participates in the schedule.
34-
* Resource `tencentcloud_kubernetes_node_pool` add `unschedulable` to sets whether the joining node participates in the schedule.
35-
* Resource `tencentcloud_kubernetes_scale_worker` add `unschedulable` to sets whether the joining node participates in the schedule.
34+
* Resource `tencentcloud_kubernetes_cluster_attachment` add `unschedulable` to set whether the joining node participates in the schedule.
35+
* Resource `tencentcloud_kubernetes_cluster` add `unschedulable` to set whether the joining node participates in the schedule.
36+
* Resource `tencentcloud_kubernetes_node_pool` add `unschedulable` to set whether the joining node participates in the schedule.
37+
* Resource `tencentcloud_kubernetes_scale_worker` add `unschedulable` to set whether the joining node participates in the schedule.
3638

3739
## 1.53.9 (March 19, 2021)
3840

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/mattn/go-colorable v0.1.6 // indirect
1616
github.com/mitchellh/go-homedir v1.1.0
1717
github.com/pkg/errors v0.9.1
18-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.119
18+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.123
1919
github.com/yangwenmai/ratelimit v0.0.0-20180104140304-44221c2292e1
2020
github.com/zclconf/go-cty v1.4.2 // indirect
2121
golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s
441441
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
442442
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ=
443443
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM=
444-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.119 h1:wjidEbe8rWoQNfUEzILykgi4SO1LYjC4tNRY7RN8chI=
445-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.119/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
444+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.123 h1:6yOMrmTuKtW1Y8VtWgN5Jt3jUcWnWtRX0gZfD1LxRcc=
445+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.123/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
446446
github.com/tetafro/godot v0.3.7 h1:+mecr7RKrUKB5UQ1gwqEMn13sDKTyDR8KNIquB9mm+8=
447447
github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0=
448448
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q=

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,14 @@ func TkeCvmCreateInfo() map[string]*schema.Schema {
468468
"Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. " +
469469
"Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).",
470470
},
471+
"disaster_recover_group_ids": {
472+
Type: schema.TypeList,
473+
ForceNew: true,
474+
Optional: true,
475+
MaxItems: 1,
476+
Elem: &schema.Schema{Type: schema.TypeString},
477+
Description: "Disaster recover groups to which a CVM instance belongs. Only support maximum 1.",
478+
},
471479
}
472480
}
473481

@@ -1036,6 +1044,15 @@ func tkeGetCvmRunInstancesPara(dMap map[string]interface{}, meta interface{},
10361044
}
10371045
}
10381046

1047+
if v, ok := dMap["disaster_recover_group_ids"]; ok {
1048+
disasterGroups := v.([]interface{})
1049+
request.DisasterRecoverGroupIds = make([]*string, 0, len(disasterGroups))
1050+
for i := range disasterGroups {
1051+
disasterGroup := disasterGroups[i].(string)
1052+
request.DisasterRecoverGroupIds = append(request.DisasterRecoverGroupIds, &disasterGroup)
1053+
}
1054+
}
1055+
10391056
if v, ok := dMap["enhanced_security_service"]; ok {
10401057

10411058
if request.EnhancedService == nil {

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419/models.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cam/v20190116/models.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdb/v20170320/models.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317/client.go

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)