jumpcloud

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserGroupSchema = tfsdk.Schema{
	MarkdownDescription: "JumpCloud User Group",
	Description:         "JumpCloud User Group",
	Version:             0,

	Attributes: map[string]tfsdk.Attribute{
		"id": {
			Computed:            true,
			MarkdownDescription: "Resource ID (Computed / Read-Only)",
			PlanModifiers: tfsdk.AttributePlanModifiers{
				resource.UseStateForUnknown(),
			},
			Type: types.StringType,
		},
		"name": {
			MarkdownDescription: "Name for the User Group",
			Type:                types.StringType,
			Required:            true,
		},
		"sudo": {
			MarkdownDescription: "Sudo configuration for the user-group",
			Attributes: tfsdk.SingleNestedAttributes(map[string]tfsdk.Attribute{
				"enabled": {
					MarkdownDescription: "Whether this user-group will allowed to use sudo",
					Type:                types.BoolType,
					Required:            true,
				},
				"passwordless": {
					MarkdownDescription: "Whether members of this user-group will be able to use sudo without entering a password",
					Type:                types.BoolType,
					Required:            true,
				},
			}),
			Optional: true,
		},
		"ldap": {
			MarkdownDescription: "List of LDAP Groups the user-group is mapped to",
			Attributes: tfsdk.SingleNestedAttributes(map[string]tfsdk.Attribute{
				"groups": {
					Attributes: tfsdk.ListNestedAttributes(map[string]tfsdk.Attribute{
						"name": {
							MarkdownDescription: "The LDAP Group Name",
							Type:                types.StringType,
							Required:            true,
						},
					}),
					Optional: true,
					Computed: true,
				},
			}),
			Optional: true,
			Computed: true,
		},
		"posix": {
			MarkdownDescription: "List of POSIX Groups the user-group is mapped to",
			Attributes: tfsdk.ListNestedAttributes(map[string]tfsdk.Attribute{
				"id": {
					MarkdownDescription: "The posix group id",
					Type:                types.Int64Type,
					Required:            true,
				},
				"name": {
					MarkdownDescription: "The posix group name",
					Type:                types.StringType,
					Required:            true,
				},
			}),
			Optional: true,
		},
		"radius": {
			MarkdownDescription: "List of RADIUS Replies to associate with the user-group",
			Attributes: tfsdk.ListNestedAttributes(map[string]tfsdk.Attribute{
				"name": {
					MarkdownDescription: "The reply name",
					Type:                types.StringType,
					Required:            true,
				},
				"value": {
					MarkdownDescription: "The reply value",
					Type:                types.StringType,
					Required:            true,
				},
			}),
			Optional: true,
		},
		"samba": {
			MarkdownDescription: "Whether samba propogation is enabled for this user-group",
			Type:                types.BoolType,
			Optional:            true,
		},
		"properties": {
			MarkdownDescription: "List of attribute properties to set on the user-group",
			Attributes: tfsdk.ListNestedAttributes(map[string]tfsdk.Attribute{
				"name": {
					MarkdownDescription: "The property name",
					Type:                types.StringType,
					Required:            true,
				},
				"value": {
					MarkdownDescription: "The property value",
					Type:                types.StringType,
					Required:            true,
				},
			}),
			Optional: true,
		},
		"description": {
			MarkdownDescription: "Description for the User Group",
			Type:                types.StringType,
			Optional:            true,
			Computed:            true,
			PlanModifiers: []tfsdk.AttributePlanModifier{
				planmodifiers.StringDefaultModifier{
					Default: "",
				},
			},
		},
		"email": {
			MarkdownDescription: "E-Mail Address for the User Group (Mailing List Group)",
			Type:                types.StringType,
			Optional:            true,
			Computed:            true,
			PlanModifiers: []tfsdk.AttributePlanModifier{
				planmodifiers.StringDefaultModifier{
					Default: "",
				},
			},
		},
		"member_queries": {
			MarkdownDescription: "Query using a sequence of field filters.",
			Attributes: tfsdk.ListNestedAttributes(map[string]tfsdk.Attribute{
				"query": {
					Required: true,
					Attributes: tfsdk.MapNestedAttributes(map[string]tfsdk.Attribute{
						"field": {
							MarkdownDescription: "The name of the field to query",
							Type:                types.StringType,
							Required:            true,
						},
						"operator": {
							MarkdownDescription: "The operator to use for the query",
							Type:                types.StringType,
							Required:            true,
							Validators: []tfsdk.AttributeValidator{
								stringvalidator.OneOf([]string{"eq", "ne", "gt", "lt", "ge", "le", "between", "search", "in"}...),
							},
						},
						"value": {
							MarkdownDescription: "The value for the filter expression",
							Type:                types.StringType,
							Required:            true,
						},
					}),
				},
			}),
			Optional: true,
		},
		"notify": {
			MarkdownDescription: "Whether to send notifications for new member suggestions that match member-query-filters",
			Type:                types.BoolType,
			Optional:            true,
			Computed:            true,
		},
		"auto": {
			MarkdownDescription: "Whether users matching member-query-filters should be automatically added to the user-group",
			Type:                types.BoolType,
			Optional:            true,
			Computed:            true,
		},
	},
}

Functions

func New

func New(version string) func() provider.Provider

func NewActiveDirectoryResource

func NewActiveDirectoryResource() resource.Resource

func NewDeviceGroupResource

func NewDeviceGroupResource() resource.Resource

func NewUserGroupResource

func NewUserGroupResource() resource.Resource

Types

type ActiveDirectoryResource

type ActiveDirectoryResource struct {
	// contains filtered or unexported fields
}

func (*ActiveDirectoryResource) Configure

func (*ActiveDirectoryResource) Create

func (*ActiveDirectoryResource) Delete

func (*ActiveDirectoryResource) GetSchema

func (*ActiveDirectoryResource) ImportState

func (*ActiveDirectoryResource) Metadata

func (*ActiveDirectoryResource) Read

func (*ActiveDirectoryResource) Update

type ActiveDirectoryResourceModel

type ActiveDirectoryResourceModel struct {
	Domain types.String `tfsdk:"domain"`
	Id     types.String `tfsdk:"id"`
}

type DeviceGroupResource

type DeviceGroupResource struct {
	// contains filtered or unexported fields
}

func (*DeviceGroupResource) Configure

func (*DeviceGroupResource) Create

func (*DeviceGroupResource) Delete

func (*DeviceGroupResource) GetSchema

func (*DeviceGroupResource) ImportState

func (*DeviceGroupResource) Metadata

func (*DeviceGroupResource) Read

func (*DeviceGroupResource) Update

type DeviceGroupResourceModel

type DeviceGroupResourceModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

type JumpCloudApi

type JumpCloudApi struct {
	V1       api.JumpCloudClientApiV1
	V2       api.JumpCloudClientApiV2
	Internal apiclient.Client
}

type JumpCloudProvider

type JumpCloudProvider struct {
	// contains filtered or unexported fields
}

func (*JumpCloudProvider) Configure

func (*JumpCloudProvider) DataSources

func (p *JumpCloudProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*JumpCloudProvider) GetSchema

func (*JumpCloudProvider) Metadata

func (*JumpCloudProvider) Resources

func (p *JumpCloudProvider) Resources(ctx context.Context) []func() resource.Resource

type JumpCloudProviderModel

type JumpCloudProviderModel struct {
	APIKey types.String `tfsdk:"api_key"`
}

type KVItemModel

type KVItemModel struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}

type LdapGroupModel

type LdapGroupModel struct {
	Name types.String `tfsdk:"name"`
}

type LdapInfo

type LdapInfo struct {
	LdapGroups []LdapGroupModel `tfsdk:"groups"`
}

func (LdapInfo) AttrTypes

func (l LdapInfo) AttrTypes() map[string]attr.Type

type MemberQueryModel

type MemberQueryModel struct {
	Field    types.String `tfsdk:"field"`
	Operator types.String `tfsdk:"operator"`
	Value    types.String `tfsdk:"value"`
}

type PosixGroupModel

type PosixGroupModel struct {
	Id   types.Int64  `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

type SambaConfig

type SambaConfig struct {
	Enabled types.Bool `tfsdk:"enabled"`
}

type SudoConfigModel

type SudoConfigModel struct {
	Enabled      types.Bool `tfsdk:"enabled"`
	Passwordless types.Bool `tfsdk:"passwordless"`
}

type UserGroupResource

type UserGroupResource struct {
	// contains filtered or unexported fields
}

func (*UserGroupResource) Configure

func (*UserGroupResource) Create

func (*UserGroupResource) Delete

func (*UserGroupResource) GetSchema

func (*UserGroupResource) ImportState

func (*UserGroupResource) Metadata

func (*UserGroupResource) Read

func (*UserGroupResource) Update

type UserGroupResourceModel

type UserGroupResourceModel struct {
	Id                      types.String       `tfsdk:"id"`
	Name                    types.String       `tfsdk:"name"`
	Sudo                    *SudoConfigModel   `tfsdk:"sudo"`
	Ldap                    types.Object       `tfsdk:"ldap"`
	PosixGroups             []PosixGroupModel  `tfsdk:"posix"`
	RadiusReplies           []KVItemModel      `tfsdk:"radius"`
	Samba                   *SambaConfig       `tfsdk:"samba"`
	Properties              []KVItemModel      `tfsdk:"properties"`
	Description             types.String       `tfsdk:"description"`
	Email                   types.String       `tfsdk:"email"`
	MemberQuery             []MemberQueryModel `tfsdk:"member_queries"`
	MemberSuggestionsNotify types.Bool         `tfsdk:"notify"`
	MembershipAutomated     types.Bool         `tfsdk:"auto"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL