Skip to content

Commit 47cd676

Browse files
committed
add
1 parent 64c81ee commit 47cd676

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_node_pool.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ resource "tencentcloud_kubernetes_node_pool" "example" {
146146
```
147147

148148
Set `wait_node_ready` and `scale_tolerance`
149+
149150
```hcl
150151
resource "tencentcloud_kubernetes_node_pool" "example" {
151152
name = "tf-example"

tencentcloud/services/tke/resource_tc_kubernetes_node_pool_extension.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,18 +1418,18 @@ func waitNodePoolInitializing(ctx context.Context, clusterId, nodePoolId string)
14181418
autoscalingGroupId string
14191419
)
14201420

1421-
if v, ok := d.GetOkExists("desired_capacity"); ok {
1422-
desiredCapacity = int64(v.(int))
1423-
if desiredCapacity == 0 {
1424-
desiredCapacity = 1
1425-
}
1426-
}
1427-
14281421
if v, ok := d.GetOkExists("wait_node_ready"); ok {
14291422
waitNodeReady = v.(bool)
14301423
}
14311424

14321425
if waitNodeReady {
1426+
if v, ok := d.GetOkExists("desired_capacity"); ok {
1427+
desiredCapacity = int64(v.(int))
1428+
if desiredCapacity == 0 {
1429+
desiredCapacity = 1
1430+
}
1431+
}
1432+
14331433
if v, ok := d.GetOkExists("scale_tolerance"); ok {
14341434
scaleTolerance = int64(v.(int))
14351435
}

0 commit comments

Comments
 (0)