Skip to content

Commit

Permalink
resource/alicloud_polardb_endpoint_address:FixStateConfig.
Browse files Browse the repository at this point in the history
resource/alicloud_polardb_endpoint:FixStateConfig.
resource/alicloud_polardb_cluster_endpoint:FixStateConfig.
resource/alicloud_polardb_primary_endpoint:FixStateConfig.
  • Loading branch information
tortoise-daddy committed Mar 6, 2024
1 parent e226224 commit 1bdc8c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alicloud/resource_alicloud_polardb_cluster_endpoint.go
Expand Up @@ -366,7 +366,7 @@ func resourceAlicloudPolarDBClusterEndpointUpdate(d *schema.ResourceData, meta i
return WrapError(err)
}

stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching", "NetAddressCreating"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
if _, err := stateConf.WaitForState(); err != nil {
return WrapErrorf(err, IdMsg, d.Id())
}
Expand Down
2 changes: 1 addition & 1 deletion alicloud/resource_alicloud_polardb_endpoint.go
Expand Up @@ -407,7 +407,7 @@ func resourceAlicloudPolarDBEndpointUpdate(d *schema.ResourceData, meta interfac
return WrapError(err)
}

stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching", "NetAddressCreating"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
if _, err := stateConf.WaitForState(); err != nil {
return WrapErrorf(err, IdMsg, d.Id())
}
Expand Down
4 changes: 2 additions & 2 deletions alicloud/resource_alicloud_polardb_endpoint_address.go
Expand Up @@ -185,7 +185,7 @@ func resourceAlicloudPolarDBEndpointAddressUpdate(d *schema.ResourceData, meta i
return WrapError(err)
}

stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching", "NetAddressCreating"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
if _, err := stateConf.WaitForState(); err != nil {
return WrapErrorf(err, IdMsg, d.Id())
}
Expand Down Expand Up @@ -232,7 +232,7 @@ func resourceAlicloudPolarDBEndpointAddressUpdate(d *schema.ResourceData, meta i
return WrapError(err)
}

stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching", "NetAddressCreating"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
if _, err := stateConf.WaitForState(); err != nil {
return WrapErrorf(err, IdMsg, d.Id())
}
Expand Down
2 changes: 1 addition & 1 deletion alicloud/resource_alicloud_polardb_primary_endpoint.go
Expand Up @@ -303,7 +303,7 @@ func resourceAlicloudPolarDBPrimaryEndpointUpdate(d *schema.ResourceData, meta i
return WrapError(err)
}

stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
stateConf := BuildStateConf([]string{"NetAddressModifying"}, []string{"Running", "ConfigSwitching", "NetAddressCreating"}, d.Timeout(schema.TimeoutUpdate), 10*time.Second, polarDBService.PolarDBClusterStateRefreshFunc(request.DBClusterId, []string{"Deleting"}))
if _, err := stateConf.WaitForState(); err != nil {
return WrapErrorf(err, IdMsg, d.Id())
}
Expand Down

0 comments on commit 1bdc8c1

Please sign in to comment.