Skip to content

Commit

Permalink
Merge pull request #2138 from xiaokouliu/feat/node_pool
Browse files Browse the repository at this point in the history
support import operation for node_pool
  • Loading branch information
lyu571 authored Sep 27, 2023
2 parents a1909e5 + b5787a3 commit 703420f
Show file tree
Hide file tree
Showing 8 changed files with 1,298 additions and 1,107 deletions.
3 changes: 3 additions & 0 deletions .changelog/2138.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_kubernetes_node_pool: set up the node pool and import it into Terraform
```
3 changes: 3 additions & 0 deletions tencentcloud/extension_as.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const (
SYSTEM_DISK_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM"
SYSTEM_DISK_TYPE_CLOUD_SSD = "CLOUD_SSD"
SYSTEM_DISK_TYPE_CLOUD_HSSD = "CLOUD_HSSD"
SYSTEM_DISK_TYPE_CLOUD_BSSD = "CLOUD_BSSD"
SYSTEM_DISK_TYPE_CLOUD_TSSD = "CLOUD_TSSD"
)

Expand All @@ -18,6 +19,7 @@ var SYSTEM_DISK_ALLOW_TYPE = []string{
SYSTEM_DISK_TYPE_CLOUD_SSD,
SYSTEM_DISK_TYPE_CLOUD_HSSD,
SYSTEM_DISK_TYPE_CLOUD_TSSD,
SYSTEM_DISK_TYPE_CLOUD_BSSD,
}

const (
Expand Down Expand Up @@ -47,6 +49,7 @@ const (

const (
SCALING_GROUP_RETRY_POLICY_IMMEDIATE_RETRY = "IMMEDIATE_RETRY"
SCALING_GROUP_RETRY_POLICY_NO_RETRY = "NO_RETRY"
SCALING_GROUP_RETRY_POLICY_INCREMENTAL_INTERVALS = "INCREMENTAL_INTERVALS"
)

Expand Down
9 changes: 9 additions & 0 deletions tencentcloud/internal/helper/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,21 @@ func PString(pointer *string) string {
}
return *pointer
}
func PBool(pointer *bool) bool {
if pointer == nil {
return false
}
return *pointer
}

func PUint64(pointer *uint64) uint64 {
return *pointer
}

func PInt64(pointer *int64) int64 {
if pointer == nil {
return 0
}
return *pointer
}

Expand Down
Loading

0 comments on commit 703420f

Please sign in to comment.