Skip to content

Commit 64e4efa

Browse files
modular-magicianchrisst
authored andcommitted
Change the sqlUser update call and default host (hashicorp#810)
Signed-off-by: Modular Magician <[email protected]>
1 parent 58c493a commit 64e4efa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

google-beta/resource_sql_user.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,19 @@ func resourceSqlUserUpdate(d *schema.ResourceData, meta interface{}) error {
159159

160160
name := d.Get("name").(string)
161161
instance := d.Get("instance").(string)
162-
host := d.Get("host").(string)
163162
password := d.Get("password").(string)
163+
host := d.Get("host").(string)
164164

165165
user := &sqladmin.User{
166166
Name: name,
167167
Instance: instance,
168168
Password: password,
169-
Host: host,
170169
}
171170

172171
mutexKV.Lock(instanceMutexKey(project, instance))
173172
defer mutexKV.Unlock(instanceMutexKey(project, instance))
174173
op, err := config.clientSqlAdmin.Users.Update(project, instance, name,
175-
user).Do()
174+
user).Host(host).Do()
176175

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

0 commit comments

Comments
 (0)