Skip to content

Commit

Permalink
fix a few formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jseriff authored and jseriff-applied committed May 6, 2022
1 parent ca4449c commit a22a4b5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mmv1/third_party/terraform/resources/resource_sql_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func resourceSqlUserCreate(d *schema.ResourceData, meta interface{}) error {
host := d.Get("host").(string)
typ := d.Get("type").(string)
disabled := d.Get("disabled").(bool)
serverRoles := expandStringArray(d.Get("server_roles").(string))
serverRoles := expandStringArray(d.Get("server_roles").(string))

user := &sqladmin.User{
Name: name,
Expand All @@ -144,9 +144,9 @@ func resourceSqlUserCreate(d *schema.ResourceData, meta interface{}) error {
Host: host,
Type: typ,
SqlserverUserDetails: &sqladmin.SqlServerUserDetails{
Disabled: disabled,
Disabled: disabled,
ServerRoles: serverRoles,
},
},
}

mutexKV.Lock(instanceMutexKey(project, instance))
Expand Down Expand Up @@ -252,7 +252,7 @@ func resourceSqlUserRead(d *schema.ResourceData, meta interface{}) error {
}
if err := d.Set("server_roles", user.SqlserverUserDetails.ServerRoles); err != nil {
return fmt.Errorf("Error setting server_roles: %s", err)
}
}
d.SetId(fmt.Sprintf("%s/%s/%s", user.Name, user.Host, user.Instance))
return nil
}
Expand All @@ -275,16 +275,16 @@ func resourceSqlUserUpdate(d *schema.ResourceData, meta interface{}) error {
password := d.Get("password").(string)
host := d.Get("host").(string)
disabled := d.Get("disabled").(bool)
serverRoles := expandStringArray(d.Get("server_roles").(string))
serverRoles := expandStringArray(d.Get("server_roles").(string))

user := &sqladmin.User{
Name: name,
Instance: instance,
Password: password,
SqlserverUserDetails: &sqladmin.SqlServerUserDetails{
Disabled: disabled,
Disabled: disabled,
ServerRoles: serverRoles,
},
},
}

mutexKV.Lock(instanceMutexKey(project, instance))
Expand Down

0 comments on commit a22a4b5

Please sign in to comment.