Skip to content

Commit fd482e5

Browse files
committed
feat(CCE): cce node pool resource add param partition
1 parent 2d773f5 commit fd482e5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/resources/cce_node_pool.md

+4
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ The following arguments are supported:
363363
which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.
364364
The [object](#hostname_config) structure is documented below.
365365

366+
* `partition` - (Optional, String) Specifies the partition to which the node belongs. Value options:
367+
+ **center**: center cloud.
368+
+ The availability zone ID of the edge station.
369+
366370
* `extension_scale_groups` - (Optional, List) Specifies the configurations of extended scaling groups in the node pool.
367371
The [object](#extension_scale_groups) structure is documented below.
368372

huaweicloud/services/cce/resource_huaweicloud_cce_node_pool.go

+8
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ func ResourceNodePool() *schema.Resource {
245245
},
246246
},
247247
},
248+
"partition": {
249+
Type: schema.TypeString,
250+
Optional: true,
251+
},
248252
"enterprise_project_id": {
249253
Type: schema.TypeString,
250254
Optional: true,
@@ -544,6 +548,10 @@ func buildNodePoolCreateOpts(d *schema.ResourceData, cfg *config.Config) (*nodep
544548
}
545549
}
546550

551+
if v, ok := d.GetOk("partition"); ok {
552+
createOpts.Spec.NodeTemplate.Partition = v.(string)
553+
}
554+
547555
log.Printf("[DEBUG] Create Options: %#v", createOpts)
548556
// Add loginSpec here, so it wouldn't go in the above log entry
549557
loginSpec, err := buildResourceNodeLoginSpec(d)

0 commit comments

Comments
 (0)