Documentation
¶
Index ¶
- func DataSourceDbfsFile() common.Resource
- func DataSourceDbfsFilePaths() common.Resource
- func DbfsFileV0() cty.Type
- func GetOrCreateMountingClusterWithGcpServiceAccount(clustersAPI clusters.ClustersAPI, serviceAccount string) (i clusters.ClusterInfo, err error)
- func GetOrCreateMountingClusterWithInstanceProfile(clustersAPI clusters.ClustersAPI, instanceProfile string) (i clusters.ClusterInfo, err error)
- func ResourceAWSS3Mount() common.Resource
- func ResourceAzureAdlsGen1Mount() common.Resource
- func ResourceAzureAdlsGen2Mount() common.Resource
- func ResourceAzureBlobMount() common.Resource
- func ResourceDatabricksMountSchema() map[string]*schema.Schema
- func ResourceDbfsFile() common.Resource
- func ResourceFile() common.Resource
- func ResourceMount() common.Resource
- func ValidateMountDirectory(val any, key string) (warns []string, errs []error)
- type AWSIamMount
- type AzureADLSGen1Mount
- func (m AzureADLSGen1Mount) Config(client *common.DatabricksClient) map[string]string
- func (m AzureADLSGen1Mount) Name() string
- func (m AzureADLSGen1Mount) Source(_ *common.DatabricksClient) string
- func (m AzureADLSGen1Mount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type AzureADLSGen1MountGeneric
- func (m *AzureADLSGen1MountGeneric) Config(client *common.DatabricksClient) map[string]string
- func (m *AzureADLSGen1MountGeneric) Name() string
- func (m *AzureADLSGen1MountGeneric) Source(_ *common.DatabricksClient) string
- func (m *AzureADLSGen1MountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type AzureADLSGen2Mount
- func (m AzureADLSGen2Mount) Config(client *common.DatabricksClient) map[string]string
- func (m AzureADLSGen2Mount) Name() string
- func (m AzureADLSGen2Mount) Source(client *common.DatabricksClient) string
- func (m AzureADLSGen2Mount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type AzureADLSGen2MountGeneric
- func (m *AzureADLSGen2MountGeneric) Config(client *common.DatabricksClient) map[string]string
- func (m *AzureADLSGen2MountGeneric) Name() string
- func (m *AzureADLSGen2MountGeneric) Source(client *common.DatabricksClient) string
- func (m *AzureADLSGen2MountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type AzureBlobMount
- func (m AzureBlobMount) Config(client *common.DatabricksClient) map[string]string
- func (m AzureBlobMount) Name() string
- func (m AzureBlobMount) Source(client *common.DatabricksClient) string
- func (m AzureBlobMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type AzureBlobMountGeneric
- func (m *AzureBlobMountGeneric) Config(client *common.DatabricksClient) map[string]string
- func (m *AzureBlobMountGeneric) Name() string
- func (m *AzureBlobMountGeneric) Source(client *common.DatabricksClient) string
- func (m *AzureBlobMountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
- type DbfsAPI
- func (a DbfsAPI) Create(path string, contents []byte, overwrite bool) (err error)
- func (a DbfsAPI) Delete(path string, recursive bool) error
- func (a DbfsAPI) List(path string, recursive bool) ([]FileInfo, error)
- func (a DbfsAPI) Read(path string) (content []byte, err error)
- func (a DbfsAPI) Status(path string) (f FileInfo, err error)
- type FileInfo
- type FileList
- type GSMount
- type GenericMount
- type Mount
- type MountPoint
- type ReadResponse
- type S3IamMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceDbfsFile ¶
func DataSourceDbfsFilePaths ¶
func GetOrCreateMountingClusterWithGcpServiceAccount ¶
func GetOrCreateMountingClusterWithGcpServiceAccount( clustersAPI clusters.ClustersAPI, serviceAccount string) (i clusters.ClusterInfo, err error)
GetOrCreateMountingClusterWithGcpServiceAccount ...
func GetOrCreateMountingClusterWithInstanceProfile ¶
func GetOrCreateMountingClusterWithInstanceProfile( clustersAPI clusters.ClustersAPI, instanceProfile string) (i clusters.ClusterInfo, err error)
GetOrCreateMountingClusterWithInstanceProfile ...
func ResourceAzureAdlsGen1Mount ¶
ResourceAzureAdlsGen1Mount creates the resource
func ResourceAzureAdlsGen2Mount ¶
ResourceAzureAdlsGen2Mount creates the resource
func ResourceAzureBlobMount ¶
ResourceAzureBlobMount creates the resource
func ResourceDbfsFile ¶
ResourceDbfsFile manages files on DBFS
func ResourceFile ¶ added in v1.37.0
func ResourceMount ¶
ResourceMount mounts using given configuration
Types ¶
type AWSIamMount ¶
type AWSIamMount struct {
S3BucketName string `json:"s3_bucket_name"`
}
AWSIamMount describes the object for a aws mount using iam role
func (AWSIamMount) Config ¶
func (m AWSIamMount) Config(client *common.DatabricksClient) map[string]string
Config ...
func (AWSIamMount) Source ¶
func (m AWSIamMount) Source(_ *common.DatabricksClient) string
Source ...
func (AWSIamMount) ValidateAndApplyDefaults ¶
func (m AWSIamMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureADLSGen1Mount ¶
type AzureADLSGen1Mount struct {
StorageResource string `json:"storage_resource_name"`
Directory string `json:"directory,omitempty"`
PrefixType string `json:"spark_conf_prefix"`
ClientID string `json:"client_id"`
TenantID string `json:"tenant_id"`
SecretScope string `json:"client_secret_scope"`
SecretKey string `json:"client_secret_key"`
}
AzureADLSGen1Mount describes the object for a azure datalake gen 1 storage mount
func (AzureADLSGen1Mount) Config ¶
func (m AzureADLSGen1Mount) Config(client *common.DatabricksClient) map[string]string
Config ...
func (AzureADLSGen1Mount) Name ¶
func (m AzureADLSGen1Mount) Name() string
func (AzureADLSGen1Mount) Source ¶
func (m AzureADLSGen1Mount) Source(_ *common.DatabricksClient) string
Source ...
func (AzureADLSGen1Mount) ValidateAndApplyDefaults ¶
func (m AzureADLSGen1Mount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureADLSGen1MountGeneric ¶
type AzureADLSGen1MountGeneric struct {
StorageResource string `json:"storage_resource_name,omitempty" tf:"computed,force_new"`
Directory string `json:"directory,omitempty" tf:"force_new"`
PrefixType string `json:"spark_conf_prefix,omitempty" tf:"default:fs.adl,force_new"`
ClientID string `json:"client_id" tf:"force_new"`
TenantID string `json:"tenant_id,omitempty" tf:"computed,force_new"`
SecretScope string `json:"client_secret_scope" tf:"force_new"`
SecretKey string `json:"client_secret_key" tf:"force_new"`
}
AzureADLSGen1Mount describes the object for a azure datalake gen 1 storage mount
func (*AzureADLSGen1MountGeneric) Config ¶
func (m *AzureADLSGen1MountGeneric) Config(client *common.DatabricksClient) map[string]string
Config ...
func (*AzureADLSGen1MountGeneric) Name ¶
func (m *AzureADLSGen1MountGeneric) Name() string
func (*AzureADLSGen1MountGeneric) Source ¶
func (m *AzureADLSGen1MountGeneric) Source(_ *common.DatabricksClient) string
Source ...
func (*AzureADLSGen1MountGeneric) ValidateAndApplyDefaults ¶
func (m *AzureADLSGen1MountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureADLSGen2Mount ¶
type AzureADLSGen2Mount struct {
ContainerName string `json:"container_name"`
StorageAccountName string `json:"storage_account_name"`
Directory string `json:"directory,omitempty"`
ClientID string `json:"client_id"`
TenantID string `json:"tenant_id"`
SecretScope string `json:"client_secret_scope"`
SecretKey string `json:"client_secret_key"`
InitializeFileSystem bool `json:"initialize_file_system"`
}
AzureADLSGen2Mount describes the object for a azure datalake gen 2 storage mount
func (AzureADLSGen2Mount) Config ¶
func (m AzureADLSGen2Mount) Config(client *common.DatabricksClient) map[string]string
Config returns mount configurations
func (AzureADLSGen2Mount) Name ¶
func (m AzureADLSGen2Mount) Name() string
func (AzureADLSGen2Mount) Source ¶
func (m AzureADLSGen2Mount) Source(client *common.DatabricksClient) string
Source returns ABFSS URI backing the mount
func (AzureADLSGen2Mount) ValidateAndApplyDefaults ¶
func (m AzureADLSGen2Mount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureADLSGen2MountGeneric ¶
type AzureADLSGen2MountGeneric struct {
ContainerName string `json:"container_name,omitempty" tf:"computed,force_new"`
StorageAccountName string `json:"storage_account_name,omitempty" tf:"computed,force_new"`
Directory string `json:"directory,omitempty" tf:"force_new"`
ClientID string `json:"client_id" tf:"force_new"`
TenantID string `json:"tenant_id,omitempty" tf:"computed,force_new"`
SecretScope string `json:"client_secret_scope" tf:"force_new"`
SecretKey string `json:"client_secret_key" tf:"force_new"`
InitializeFileSystem bool `json:"initialize_file_system" tf:"force_new"`
}
AzureADLSGen2Mount describes the object for a azure datalake gen 2 storage mount
func (*AzureADLSGen2MountGeneric) Config ¶
func (m *AzureADLSGen2MountGeneric) Config(client *common.DatabricksClient) map[string]string
Config returns mount configurations
func (*AzureADLSGen2MountGeneric) Name ¶
func (m *AzureADLSGen2MountGeneric) Name() string
func (*AzureADLSGen2MountGeneric) Source ¶
func (m *AzureADLSGen2MountGeneric) Source(client *common.DatabricksClient) string
Source returns ABFSS URI backing the mount
func (*AzureADLSGen2MountGeneric) ValidateAndApplyDefaults ¶
func (m *AzureADLSGen2MountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureBlobMount ¶
type AzureBlobMount struct {
ContainerName string `json:"container_name"`
StorageAccountName string `json:"storage_account_name"`
Directory string `json:"directory"`
AuthType string `json:"auth_type"`
SecretScope string `json:"token_secret_scope"`
SecretKey string `json:"token_secret_key"`
}
AzureBlobMount describes the object for a azure blob storage mount - a.k.a. NativeAzureFileSystem
func (AzureBlobMount) Config ¶
func (m AzureBlobMount) Config(client *common.DatabricksClient) map[string]string
Config ...
func (AzureBlobMount) Name ¶
func (m AzureBlobMount) Name() string
func (AzureBlobMount) Source ¶
func (m AzureBlobMount) Source(client *common.DatabricksClient) string
Source ...
func (AzureBlobMount) ValidateAndApplyDefaults ¶
func (m AzureBlobMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type AzureBlobMountGeneric ¶
type AzureBlobMountGeneric struct {
ContainerName string `json:"container_name,omitempty" tf:"computed,force_new"`
StorageAccountName string `json:"storage_account_name,omitempty" tf:"computed,force_new"`
Directory string `json:"directory,omitempty" tf:"force_new"`
AuthType string `json:"auth_type" tf:"force_new"`
SecretScope string `json:"token_secret_scope" tf:"force_new"`
SecretKey string `json:"token_secret_key" tf:"force_new"`
}
AzureBlobMount describes the object for a azure blob storage mount - a.k.a. NativeAzureFileSystem
func (*AzureBlobMountGeneric) Config ¶
func (m *AzureBlobMountGeneric) Config(client *common.DatabricksClient) map[string]string
Config ...
func (*AzureBlobMountGeneric) Name ¶
func (m *AzureBlobMountGeneric) Name() string
func (*AzureBlobMountGeneric) Source ¶
func (m *AzureBlobMountGeneric) Source(client *common.DatabricksClient) string
Source ...
func (*AzureBlobMountGeneric) ValidateAndApplyDefaults ¶
func (m *AzureBlobMountGeneric) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type DbfsAPI ¶
type DbfsAPI struct {
// contains filtered or unexported fields
}
DbfsAPI exposes the DBFS API
func NewDbfsAPI ¶
NewDbfsAPI creates DBFSAPI instance from provider meta
func (DbfsAPI) List ¶
List returns a list of files in DBFS and the recursive flag lets you recursively list files
type FileInfo ¶
type FileInfo struct {
Path string `json:"path,omitempty"`
IsDir bool `json:"is_dir,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
}
FileInfo contains information when listing files or fetching files from DBFS api
type FileList ¶
type FileList struct {
Files []FileInfo `json:"files,omitempty"`
}
FileList contains list of file metadata entries
type GSMount ¶
type GSMount struct {
BucketName string `json:"bucket_name" tf:"force_new"`
ServiceAccount string `json:"service_account,omitempty" tf:"force_new"`
}
GSMount describes the object for a GS mount using google service account
func (GSMount) Config ¶
func (m GSMount) Config(client *common.DatabricksClient) map[string]string
Config ...
func (GSMount) ValidateAndApplyDefaults ¶
func (m GSMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
type GenericMount ¶
type GenericMount struct {
URI string `json:"uri,omitempty" tf:"force_new"`
Options map[string]string `json:"extra_configs,omitempty" tf:"force_new"`
Abfs *AzureADLSGen2MountGeneric `json:"abfs,omitempty" tf:"force_new,suppress_diff"`
S3 *S3IamMount `json:"s3,omitempty" tf:"force_new,suppress_diff"`
Adl *AzureADLSGen1MountGeneric `json:"adl,omitempty" tf:"force_new,suppress_diff"`
Wasb *AzureBlobMountGeneric `json:"wasb,omitempty" tf:"force_new,suppress_diff"`
Gs *GSMount `json:"gs,omitempty" tf:"force_new,suppress_diff"`
ClusterID string `json:"cluster_id,omitempty" tf:"computed,force_new"`
MountName string `json:"name,omitempty" tf:"computed,force_new"`
ResourceID string `json:"resource_id,omitempty" tf:"force_new"`
EncryptionType string `json:"encryption_type,omitempty" tf:"force_new"`
}
TODO: add support for encryption parameters in S3
func (GenericMount) Config ¶
func (m GenericMount) Config(client *common.DatabricksClient) map[string]string
Config returns mount configurations
func (GenericMount) Source ¶
func (m GenericMount) Source(client *common.DatabricksClient) string
Source returns URI backing the mount
func (GenericMount) ValidateAndApplyDefaults ¶
func (m GenericMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
ApplyDefaults tries to apply defaults to a given resource
type Mount ¶
type Mount interface {
Source(client *common.DatabricksClient) string
Config(client *common.DatabricksClient) map[string]string
Name() string
ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error
}
Mount exposes generic url & extra config map options
type MountPoint ¶
type MountPoint struct {
Exec common.CommandExecutor
ClusterID string
Name string
EncryptionType string
}
MountPoint is something actionable
func NewMountPoint ¶
func NewMountPoint(executor common.CommandExecutor, name, clusterID string) MountPoint
NewMountPoint returns new mount point config
func (MountPoint) Mount ¶
func (mp MountPoint) Mount(mo Mount, client *common.DatabricksClient) (source string, err error)
Mount mounts object store on workspace
func (MountPoint) Source ¶
func (mp MountPoint) Source() (string, error)
Source returns mountpoint source
type ReadResponse ¶
ReadResponse contains the response from reading a portion of a file in DBFS
type S3IamMount ¶
type S3IamMount struct {
BucketName string `json:"bucket_name" tf:"force_new"`
InstanceProfile string `json:"instance_profile,omitempty" tf:"force_new"`
}
S3IamMount describes the object for a aws mount using iam role
func (S3IamMount) Config ¶
func (m S3IamMount) Config(client *common.DatabricksClient) map[string]string
Config ...
func (S3IamMount) ValidateAndApplyDefaults ¶
func (m S3IamMount) ValidateAndApplyDefaults(d *schema.ResourceData, client *common.DatabricksClient) error