Skip to content

Commit

Permalink
Fix caps in spanner resource schema accesses (GoogleCloudPlatform#7346)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored and ericayyliu committed Jul 26, 2023
1 parent 48a965f commit e6ef65d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mmv1/templates/terraform/pre_update/spanner_database.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ if len(obj["statements"].([]string)) == 0 {
return resourceSpannerDatabaseRead(d, meta)
}

if resourceSpannerDBVirtualUpdate(d, resourceSpannerInstance().Schema) {
if resourceSpannerDBVirtualUpdate(d, ResourceSpannerDatabase().Schema) {
if d.Get("deletion_protection") != nil {
if err := d.Set("deletion_protection", d.Get("deletion_protection")); err != nil {
return fmt.Errorf("Error reading Instance: %s", err)
}
}
return nil
}
}
4 changes: 2 additions & 2 deletions mmv1/templates/terraform/pre_update/spanner_instance.go.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if resourceSpannerInstanceVirtualUpdate(d, resourceSpannerInstance().Schema) {
if resourceSpannerInstanceVirtualUpdate(d, ResourceSpannerInstance().Schema) {
if d.Get("force_destroy") != nil {
if err := d.Set("force_destroy", d.Get("force_destroy")); err != nil {
return fmt.Errorf("Error reading Instance: %s", err)
}
}
return nil
}
}

0 comments on commit e6ef65d

Please sign in to comment.