From 64e4efa53fc0c8fb0c4c30f7a5bac71d8040a4f8 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 4 Jun 2019 13:59:14 -0700 Subject: [PATCH] Change the sqlUser update call and default host (#810) Signed-off-by: Modular Magician --- google-beta/resource_sql_user.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/google-beta/resource_sql_user.go b/google-beta/resource_sql_user.go index 3100c9ac6b5..e1b4df60eae 100644 --- a/google-beta/resource_sql_user.go +++ b/google-beta/resource_sql_user.go @@ -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"+