Fix user creating without groups
@@ -86,8 +86,11 @@ func marshalUser(user *artifactory.User, d *schema.ResourceData) {
d.Set("disable_ui_access", user.DisableUIAccess)
d.Set("realm", user.Realm)
d.Set("internal_password_disabled", user.InternalPasswordDisabled)
+
+ if user.Groups != nil {
d.Set("groups", schema.NewSet(schema.HashString, CastToInterfaceArr(*user.Groups)))
}
+}
func resourceUserCreate(d *schema.ResourceData, m interface{}) error {
c := m.(*artifactory.Client)
