func CreateSystem(d *schema.ResourceData, meta interface{}) error {
    return nil
}
Adding systems in JumpCloud only allowed by Kickstart script.
Once a system has been created in that way, it can be imported
using Terraform's "import" command.
package main
import (
    "github.com/hashicorp/terraform/helper/schema"
    "github.com/geekmuse/jcapi"
)
const (
    apiUrl string = "https://console.jumpcloud.com/api"
)
func Provider() *schema.Provider {
    return &schema.Provider {
        ResourcesMap:   map[string]*schema.Resource{
            "jumpcloud_user": &schema.Resource{
                Schema: map[string]*schema.Schema{
                    "user_name": &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   true,
                        ForceNew:   true,
                    },
                    "first_name":  &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                    },
                    "last_name":  &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                    },
                    "email":  &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   true,
                    },
                    "password":  &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                    },
                    "sudo":  &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                    "passwordless_sudo":  &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                    "allow_public_key":  &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                    "public_key":  &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                    },
                },
                SchemaVersion:  1,
                Create:     CreateSystemUser,
                Read:       ReadSystemUser,
                Update:     UpdateSystemUser,
                Delete:     DeleteSystemUser,
                Importer:   &schema.ResourceImporter{
                    State: ImportSystemUser,
                },
            },
            "jumpcloud_system": &schema.Resource{
                Schema: map[string]*schema.Schema{
                    "display_name": &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "allow_ssh_password_auth": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "allow_ssh_root_login": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "allow_multifactor_auth": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "allow_public_key_auth": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "tags": &schema.Schema{
                        Type:       schema.TypeList,
                        Elem:       &schema.Schema{Type: schema.TypeString},
                        Required:   false,
                        Optional:   true,
                    },
                },
                SchemaVersion:  1,
                Create:     CreateSystem,
                Read:       ReadSystem,
                Update:     UpdateSystem,
                Delete:     DeleteSystem,
            },
            "jumpcloud_tag": &schema.Resource{
                Schema: map[string]*schema.Schema{
                    "name": &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   true,
                        ForceNew:   false,
                    },
                    "group_name": &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                        ForceNew:   true,
                    },
                    "group_gid": &schema.Schema{
                        Type:       schema.TypeString,
                        Required:   false,
                        Optional:   true,
                        ForceNew:   true,
                    },
                    "expiration_time": &schema.Schema{
                        Type:       schema.TypeList,
                        Elem:       &schema.Schema{Type: schema.TypeString},
                        Required:   false,
                        Optional:   true,
                    },
                    "expired":  &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                    "selected": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                    "sendtoldap": &schema.Schema{
                        Type:       schema.TypeBool,
                        Required:   false,
                        Optional:   true,
                    },
                },
                SchemaVersion:  1,
                Create:     CreateTag,
                Read:       ReadTag,
                Update:     UpdateTag,
                Delete:     DeleteTag,
                Importer:   &schema.ResourceImporter{
                    State: ImportTag,
                },
            },
        },
        Schema:         map[string]*schema.Schema{
            "api_key": &schema.Schema{
                Type:           schema.TypeString,
                Required:       true,
                Description:    "JumpCloud API key",
            },
        },
        ConfigureFunc:  providerInit,
    }
}
func providerInit(d *schema.ResourceData) (interface{}, error) {
    jcClient := jcapi.NewJCAPI(d.Get("api_key").(string), apiUrl)
    return &jcClient, nil
}
func CreateSystemUser(d *schema.ResourceData, meta interface{}) error {
    jcUser := jcapi.JCUser{
        UserName:           d.Get("user_name").(string),
        FirstName:          d.Get("first_name").(string),
        LastName:           d.Get("last_name").(string),
        Email:              d.Get("email").(string),
        Password:           d.Get("password").(string),
        Sudo:               d.Get("sudo").(bool),
        PasswordlessSudo:   d.Get("passwordless_sudo").(bool),
        AllowPublicKey:     d.Get("allow_public_key").(bool),
        PublicKey:          d.Get("public_key").(string),
        Activated:          true,
        ExternallyManaged:  false,
    }
    userId, err := meta.(*jcapi.JCAPI).AddUpdateUser(2, jcUser)
    if err != nil {
        return err
    }
    d.SetId(userId)
    return nil
}