Documentation ¶
Index ¶
- func DataSourceCurrentUser() *schema.Resource
- func DataSourceGroup() *schema.Resource
- func ResourceGroup() *schema.Resource
- func ResourceGroupInstanceProfile() *schema.Resource
- func ResourceGroupMember() *schema.Resource
- func ResourceInstanceProfile() *schema.Resource
- func ResourceServicePrincipal() *schema.Resource
- func ResourceToken() *schema.Resource
- func ResourceUser() *schema.Resource
- func ResourceUserInstanceProfile() *schema.Resource
- func ValidInstanceProfile(v interface{}, c cty.Path) diag.Diagnostics
- type Entitlement
- type GroupList
- type GroupMember
- type GroupPatchOperations
- type GroupPatchRequest
- type GroupPathType
- type GroupsAPI
- func (a GroupsAPI) Create(groupName string, members []string, roles []string, entitlements []string) (group ScimGroup, err error)
- func (a GroupsAPI) Delete(groupID string) error
- func (a GroupsAPI) Filter(filter string) (GroupList, error)
- func (a GroupsAPI) Patch(groupID string, addList []string, removeList []string, path GroupPathType) error
- func (a GroupsAPI) PatchR(groupID string, r patchRequest) error
- func (a GroupsAPI) Read(groupID string) (group ScimGroup, err error)
- type GroupsValue
- type InstanceProfileInfo
- type InstanceProfileList
- type InstanceProfilesAPI
- func (a InstanceProfilesAPI) Create(instanceProfileARN string) error
- func (a InstanceProfilesAPI) Delete(instanceProfileARN string) error
- func (a InstanceProfilesAPI) IsRegistered(arn string) bool
- func (a InstanceProfilesAPI) List() ([]InstanceProfileInfo, error)
- func (a InstanceProfilesAPI) Read(instanceProfileARN string) (string, error)
- func (a InstanceProfilesAPI) Synchronized(arn string, testCallback func() bool)
- type MembersValue
- type RolesValue
- type ScimGroup
- type ScimUser
- type ServicePrincipalEntity
- type ServicePrincipalsAPI
- func (a ServicePrincipalsAPI) CreateR(rsp ServicePrincipalEntity) (sp ScimUser, err error)
- func (a ServicePrincipalsAPI) Delete(servicePrincipalID string) error
- func (a ServicePrincipalsAPI) ReadR(servicePrincipalID string) (rsp ServicePrincipalEntity, err error)
- func (a ServicePrincipalsAPI) UpdateR(servicePrincipalID string, rsp ServicePrincipalEntity) error
- type TokenInfo
- type TokenList
- type TokenRequest
- type TokenResponse
- type TokensAPI
- type URN
- type UserEntity
- type UserList
- type UserPatchOperations
- type UsersAPI
- func (a UsersAPI) Create(ru UserEntity) (user ScimUser, err error)
- func (a UsersAPI) Delete(userID string) error
- func (a UsersAPI) Filter(filter string) (u []ScimUser, err error)
- func (a UsersAPI) Me() (ScimUser, error)
- func (a UsersAPI) Patch(userID string, r patchRequest) error
- func (a UsersAPI) Read(userID string) (ru UserEntity, err error)
- func (a UsersAPI) Update(userID string, ru UserEntity) error
- type ValueList
- type ValueListItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceCurrentUser ¶ added in v0.3.0
DataSourceCurrentUser returns information about caller identity
func DataSourceGroup ¶ added in v0.2.6
DataSourceGroup returns information about group specified by display name
func ResourceGroupInstanceProfile ¶
ResourceGroupInstanceProfile defines group role resource
func ResourceGroupMember ¶
ResourceGroupMember bind group with member
func ResourceInstanceProfile ¶
ResourceInstanceProfile manages Instance Profile ARN binding
func ResourceServicePrincipal ¶ added in v0.3.0
ResourceServicePrincipal manages service principals within workspace
func ResourceToken ¶
ResourceToken refreshes token in case it's expired
func ResourceUser ¶ added in v0.2.6
ResourceUser manages users within workspace
func ResourceUserInstanceProfile ¶ added in v0.2.6
ResourceUserInstanceProfile binds user and instance profile
func ValidInstanceProfile ¶ added in v0.3.0
func ValidInstanceProfile(v interface{}, c cty.Path) diag.Diagnostics
ValidInstanceProfile validate if it's valid instance profile ARN
Types ¶
type Entitlement ¶
type Entitlement string
Entitlement is a custom type that contains a set of entitlements for a user/group
const ( AllowClusterCreateEntitlement Entitlement = "allow-cluster-create" AllowInstancePoolCreateEntitlement Entitlement = "allow-instance-pool-create" )
List of possible entitlement constants on Databricks
type GroupList ¶
type GroupList struct { TotalResults int32 `json:"totalResults,omitempty"` StartIndex int32 `json:"startIndex,omitempty"` ItemsPerPage int32 `json:"itemsPerPage,omitempty"` Schemas []URN `json:"schemas,omitempty"` Resources []ScimGroup `json:"resources,omitempty"` }
GroupList contains a list of groups fetched from a list api call from SCIM api
type GroupMember ¶
type GroupMember struct { Display string `json:"display,omitempty"` Value string `json:"value,omitempty"` Ref string `json:"$ref,omitempty"` }
GroupMember contains information of a member in a scim group
type GroupPatchOperations ¶
type GroupPatchOperations struct { Op string `json:"op,omitempty"` Path GroupPathType `json:"path,omitempty"` Value []ValueListItem `json:"value,omitempty"` }
GroupPatchOperations is a list of path operations for add or removing group attributes
type GroupPatchRequest ¶
type GroupPatchRequest struct { Schemas []URN `json:"schemas,omitempty"` Operations []GroupPatchOperations `json:"Operations,omitempty"` }
GroupPatchRequest contains a request structure to make a patch op against SCIM api
type GroupPathType ¶
type GroupPathType string
GroupPathType describes the possible paths in the SCIM RFC for patch operations
const ( // GroupMembersPath is the members path for SCIM patch operation. GroupMembersPath GroupPathType = "members" // GroupRolesPath is the roles path for SCIM patch operation. GroupRolesPath GroupPathType = "roles" // GroupEntitlementsPath is the entitlements path for SCIM patch operation. GroupEntitlementsPath GroupPathType = "entitlements" )
type GroupsAPI ¶
type GroupsAPI struct {
// contains filtered or unexported fields
}
GroupsAPI exposes the scim groups API
func NewGroupsAPI ¶
NewGroupsAPI creates GroupsAPI instance from provider meta
func (GroupsAPI) Create ¶
func (a GroupsAPI) Create(groupName string, members []string, roles []string, entitlements []string) (group ScimGroup, err error)
Create creates a scim group in the Databricks workspace
func (GroupsAPI) Patch ¶
func (a GroupsAPI) Patch(groupID string, addList []string, removeList []string, path GroupPathType) error
Patch applys a patch request for a group given a path attribute
type GroupsValue ¶
type GroupsValue struct {
Groups []ValueListItem `json:"groups,omitempty"`
}
GroupsValue is a list of value items for the groups path
type InstanceProfileInfo ¶
type InstanceProfileInfo struct {
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
}
InstanceProfileInfo contains the ARN for aws instance profiles
type InstanceProfileList ¶
type InstanceProfileList struct {
InstanceProfiles []InstanceProfileInfo `json:"instance_profiles,omitempty"`
}
InstanceProfileList ...
type InstanceProfilesAPI ¶
type InstanceProfilesAPI struct {
// contains filtered or unexported fields
}
InstanceProfilesAPI exposes the instance profiles api on the AWS deployment of Databricks
func NewInstanceProfilesAPI ¶
func NewInstanceProfilesAPI(ctx context.Context, m interface{}) InstanceProfilesAPI
NewInstanceProfilesAPI creates InstanceProfilesAPI instance from provider meta
func (InstanceProfilesAPI) Create ¶
func (a InstanceProfilesAPI) Create(instanceProfileARN string) error
Create creates an instance profile record on Databricks
func (InstanceProfilesAPI) Delete ¶
func (a InstanceProfilesAPI) Delete(instanceProfileARN string) error
Delete deletes the instance profile given an instance profile arn
func (InstanceProfilesAPI) IsRegistered ¶ added in v0.3.0
func (a InstanceProfilesAPI) IsRegistered(arn string) bool
IsRegistered checks if instance profile exists
func (InstanceProfilesAPI) List ¶
func (a InstanceProfilesAPI) List() ([]InstanceProfileInfo, error)
List lists all the instance profiles in the workspace
func (InstanceProfilesAPI) Read ¶
func (a InstanceProfilesAPI) Read(instanceProfileARN string) (string, error)
Read returns the ARN back if it exists on the Databricks workspace
func (InstanceProfilesAPI) Synchronized ¶ added in v0.2.8
func (a InstanceProfilesAPI) Synchronized(arn string, testCallback func() bool)
Synchronized test helper for working with only single instance profile
type MembersValue ¶
type MembersValue struct {
Members []ValueListItem `json:"members,omitempty"`
}
MembersValue is a list of value items for the members path
type RolesValue ¶
type RolesValue struct {
Roles []ValueListItem `json:"roles,omitempty"`
}
RolesValue is a list of value items for the roles path
type ScimGroup ¶ added in v0.2.6
type ScimGroup struct { ID string `json:"id,omitempty"` Schemas []URN `json:"schemas,omitempty"` DisplayName string `json:"displayName,omitempty"` Members []GroupMember `json:"members,omitempty"` Groups []GroupMember `json:"groups,omitempty"` Roles []roleListItem `json:"roles,omitempty"` Entitlements []entitlementsListItem `json:"entitlements,omitempty"` }
ScimGroup contains information about the SCIM group
type ScimUser ¶ added in v0.2.6
type ScimUser struct { ID string `json:"id,omitempty"` Emails []email `json:"emails,omitempty"` DisplayName string `json:"displayName,omitempty"` Active bool `json:"active,omitempty"` Schemas []URN `json:"schemas,omitempty"` UserName string `json:"userName,omitempty"` ApplicationID string `json:"applicationId,omitempty"` Groups []groupsListItem `json:"groups,omitempty"` Name map[string]string `json:"name,omitempty"` Roles []roleListItem `json:"roles,omitempty"` Entitlements []entitlementsListItem `json:"entitlements,omitempty"` }
ScimUser is a struct that contains all the information about a SCIM user
type ServicePrincipalEntity ¶ added in v0.3.0
type ServicePrincipalEntity struct { ApplicationID string `json:"application_id"` DisplayName string `json:"display_name,omitempty" tf:"computed"` Active bool `json:"active,omitempty"` AllowClusterCreate bool `json:"allow_cluster_create,omitempty"` AllowInstancePoolCreate bool `json:"allow_instance_pool_create,omitempty"` }
ServicePrincipalEntity entity from which resource schema is made
type ServicePrincipalsAPI ¶ added in v0.3.0
type ServicePrincipalsAPI struct {
// contains filtered or unexported fields
}
ServicePrincipalsAPI exposes the scim servicePrincipal API
func NewServicePrincipalsAPI ¶ added in v0.3.0
func NewServicePrincipalsAPI(ctx context.Context, m interface{}) ServicePrincipalsAPI
NewServicePrincipalsAPI creates ServicePrincipalsAPI instance from provider meta
func (ServicePrincipalsAPI) CreateR ¶ added in v0.3.0
func (a ServicePrincipalsAPI) CreateR(rsp ServicePrincipalEntity) (sp ScimUser, err error)
CreateR ..
func (ServicePrincipalsAPI) Delete ¶ added in v0.3.0
func (a ServicePrincipalsAPI) Delete(servicePrincipalID string) error
Delete will delete the servicePrincipal given the servicePrincipal id
func (ServicePrincipalsAPI) ReadR ¶ added in v0.3.0
func (a ServicePrincipalsAPI) ReadR(servicePrincipalID string) (rsp ServicePrincipalEntity, err error)
ReadR reads resource-friendly entity
func (ServicePrincipalsAPI) UpdateR ¶ added in v0.3.0
func (a ServicePrincipalsAPI) UpdateR(servicePrincipalID string, rsp ServicePrincipalEntity) error
UpdateR replaces resource-friendly-entity
type TokenInfo ¶
type TokenInfo struct { TokenID string `json:"token_id,omitempty"` CreationTime int64 `json:"creation_time,omitempty"` ExpiryTime int64 `json:"expiry_time,omitempty"` Comment string `json:"comment,omitempty"` }
TokenInfo is a struct that contains metadata about a given token
type TokenList ¶
type TokenList struct {
TokenInfos []TokenInfo `json:"token_infos,omitempty"`
}
TokenList ...
type TokenRequest ¶
type TokenRequest struct { LifetimeSeconds int32 `json:"lifetime_seconds"` Comment string `json:"comment"` }
TokenRequest asks for a token
type TokenResponse ¶
type TokenResponse struct { TokenValue string `json:"token_value,omitempty"` TokenInfo *TokenInfo `json:"token_info,omitempty"` }
TokenResponse is a struct that contains information about token that is created from the create tokens api
type TokensAPI ¶
type TokensAPI struct {
// contains filtered or unexported fields
}
TokensAPI exposes the Secrets API
func NewTokensAPI ¶
NewTokensAPI creates TokensAPI instance from provider meta
type URN ¶
type URN string
URN is a custom type for the SCIM spec for the schema
const ( UserSchema URN = "urn:ietf:params:scim:schemas:core:2.0:User" ServicePrincipalSchema URN = "urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal" WorkspaceUserSchema URN = "urn:ietf:params:scim:schemas:extension:workspace:2.0:User" PatchOp URN = "urn:ietf:params:scim:api:messages:2.0:PatchOp" GroupSchema URN = "urn:ietf:params:scim:schemas:core:2.0:Group" )
Possible schema URNs for the Databricks SCIM api
type UserEntity ¶ added in v0.2.6
type UserEntity struct { UserName string `json:"user_name"` DisplayName string `json:"display_name,omitempty" tf:"computed"` Active bool `json:"active,omitempty"` AllowClusterCreate bool `json:"allow_cluster_create,omitempty"` AllowInstancePoolCreate bool `json:"allow_instance_pool_create,omitempty"` }
UserEntity entity from which resource schema is made
type UserList ¶
type UserList struct { TotalResults int32 `json:"totalResults,omitempty"` StartIndex int32 `json:"startIndex,omitempty"` ItemsPerPage int32 `json:"itemsPerPage,omitempty"` Schemas []URN `json:"schemas,omitempty"` Resources []ScimUser `json:"resources,omitempty"` }
UserList contains a list of Users fetched from a list api call from SCIM api
type UserPatchOperations ¶
type UserPatchOperations struct { Op string `json:"op,omitempty"` Path string `json:"path,omitempty"` Value *GroupsValue `json:"value,omitempty"` }
UserPatchOperations is a list of path operations for add or removing user attributes
type UsersAPI ¶
type UsersAPI struct {
// contains filtered or unexported fields
}
UsersAPI exposes the scim user API
func NewUsersAPI ¶
NewUsersAPI creates UsersAPI instance from provider meta
func (UsersAPI) Create ¶
func (a UsersAPI) Create(ru UserEntity) (user ScimUser, err error)
Create ..
type ValueList ¶
type ValueList struct {
Value []ValueListItem `json:"value,omitempty"`
}
ValueList is a generic list of value items for any path
type ValueListItem ¶
type ValueListItem struct {
Value string `json:"value,omitempty"`
}
ValueListItem is a struct that contains a field Value. This is for the scim api.