Skip to content

Commit adda9fa

Browse files
modular-magicianmelinath
authored andcommitted
Add nil check for pitr (#4462) (#2927)
Signed-off-by: Modular Magician <[email protected]>
1 parent 22acf19 commit adda9fa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.changelog/4462.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_sql_database_instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,8 @@ func resourceSqlDatabaseInstanceCreate(d *schema.ResourceData, meta interface{})
794794

795795
// Refresh settings from read as they may have defaulted from the API
796796
s = d.Get("settings")
797-
// If we've created an instance as a clone, we need to update it to set the correct settings
798-
if len(s.([]interface{})) != 0 && cloneContext != nil {
797+
// If we've created an instance as a clone, we need to update it to set any user defined settings
798+
if len(s.([]interface{})) != 0 && cloneContext != nil && desiredSettings != nil {
799799
instanceUpdate := &sqladmin.DatabaseInstance{
800800
Settings: desiredSettings,
801801
}

0 commit comments

Comments
 (0)