Skip to content

Commit 23e77da

Browse files
lornakellyLorna-Kelly
andauthored
fix(Cloud Databases): Fix for importing read replicas (IBM-Cloud#6126)
* Revert "Add version validation (IBM-Cloud#5791)" This reverts commit f542550. * Remove remote leader validation section --------- Co-authored-by: Lorna-Kelly <[email protected]>
1 parent c175a5d commit 23e77da

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ibm/service/database/resource_ibm_database.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,18 +3122,11 @@ func expandUserChanges(_oldUsers []interface{}, _newUsers []interface{}) (userCh
31223122
func validateRemoteLeaderIDDiff(_ context.Context, diff *schema.ResourceDiff, meta interface{}) (err error) {
31233123
_, remoteLeaderIdOk := diff.GetOk("remote_leader_id")
31243124
service := diff.Get("service").(string)
3125-
crn := diff.Get("resource_crn").(string)
31263125

31273126
if remoteLeaderIdOk && (service != "databases-for-postgresql" && service != "databases-for-mysql" && service != "databases-for-enterprisedb") {
31283127
return fmt.Errorf("[ERROR] remote_leader_id is only supported for databases-for-postgresql, databases-for-enterprisedb and databases-for-mysql")
31293128
}
31303129

3131-
oldValue, newValue := diff.GetChange("remote_leader_id")
3132-
3133-
if crn != "" && oldValue == "" && newValue != "" {
3134-
return fmt.Errorf("[ERROR] You cannot convert an existing instance to a read replica")
3135-
}
3136-
31373130
return nil
31383131
}
31393132

0 commit comments

Comments
 (0)