Skip to content

Commit

Permalink
Change the sqlUser update call and default host (hashicorp#810)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and chrisst committed Jun 4, 2019
1 parent 58c493a commit 64e4efa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions google-beta/resource_sql_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,19 @@ func resourceSqlUserUpdate(d *schema.ResourceData, meta interface{}) error {

name := d.Get("name").(string)
instance := d.Get("instance").(string)
host := d.Get("host").(string)
password := d.Get("password").(string)
host := d.Get("host").(string)

user := &sqladmin.User{
Name: name,
Instance: instance,
Password: password,
Host: host,
}

mutexKV.Lock(instanceMutexKey(project, instance))
defer mutexKV.Unlock(instanceMutexKey(project, instance))
op, err := config.clientSqlAdmin.Users.Update(project, instance, name,
user).Do()
user).Host(host).Do()

if err != nil {
return fmt.Errorf("Error, failed to update"+
Expand Down

0 comments on commit 64e4efa

Please sign in to comment.