From 75b1e70cfa1fcbc3be7987a4be136c7813d4756f Mon Sep 17 00:00:00 2001 From: Zippo-Wang <852420284@qq.com> Date: Fri, 24 Nov 2023 17:44:26 +0800 Subject: [PATCH] feat(CCE): add new status of resource. --- flexibleengine/resource_flexibleengine_cce_node_pool.go | 4 ++-- flexibleengine/resource_flexibleengine_cce_node_v3.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flexibleengine/resource_flexibleengine_cce_node_pool.go b/flexibleengine/resource_flexibleengine_cce_node_pool.go index e297bbdb..bb7ebe3a 100644 --- a/flexibleengine/resource_flexibleengine_cce_node_pool.go +++ b/flexibleengine/resource_flexibleengine_cce_node_pool.go @@ -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, @@ -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), diff --git a/flexibleengine/resource_flexibleengine_cce_node_v3.go b/flexibleengine/resource_flexibleengine_cce_node_v3.go index 5111fd7e..f954bfb3 100644 --- a/flexibleengine/resource_flexibleengine_cce_node_v3.go +++ b/flexibleengine/resource_flexibleengine_cce_node_v3.go @@ -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), @@ -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),