Skip to content

Commit

Permalink
feat(CCE): add new status of resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zippo-Wang committed Nov 24, 2023
1 parent 9f756c2 commit 75b1e70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flexibleengine/resource_flexibleengine_cce_node_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func resourceCCENodePoolCreate(d *schema.ResourceData, meta interface{}) error {
clusterid := d.Get("cluster_id").(string)
stateCluster := &resource.StateChangeConf{
Pending: []string{"PENDING"},
Target: []string{"COMPLETED"},
Target: []string{"Available", "COMPLETED"},
Refresh: clusterStateRefreshFunc(nodePoolClient, clusterid, []string{"Available"}),
Timeout: d.Timeout(schema.TimeoutCreate),
Delay: 10 * time.Second,
Expand Down Expand Up @@ -528,7 +528,7 @@ func resourceCCENodePoolUpdate(d *schema.ResourceData, meta interface{}) error {
}

stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING"},
Pending: []string{"Synchronizing", "Synchronized", "PENDING"},
Target: []string{"COMPLETED"},
Refresh: waitForCceNodePoolActive(nodePoolClient, clusterid, d.Id()),
Timeout: d.Timeout(schema.TimeoutCreate),
Expand Down
4 changes: 2 additions & 2 deletions flexibleengine/resource_flexibleengine_cce_node_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func resourceCCENodeV3Create(d *schema.ResourceData, meta interface{}) error {

clusterid := d.Get("cluster_id").(string)
stateCluster := &resource.StateChangeConf{
Pending: []string{"PENDING"},
Pending: []string{"Available", "PENDING"},
Target: []string{"COMPLETED"},
Refresh: clusterStateRefreshFunc(nodeClient, clusterid, []string{"Available"}),
Timeout: d.Timeout(schema.TimeoutCreate),
Expand Down Expand Up @@ -541,7 +541,7 @@ func resourceCCENodeV3Create(d *schema.ResourceData, meta interface{}) error {

log.Printf("[DEBUG] Waiting for CCE Node (%s) to become available", s.Metadata.Name)
stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING"},
Pending: []string{"Build", "Installing", "PENDING"},
Target: []string{"Active"},
Refresh: waitForCceNodeActive(nodeClient, clusterid, nodeID),
Timeout: d.Timeout(schema.TimeoutCreate),
Expand Down

0 comments on commit 75b1e70

Please sign in to comment.