Documentation
¶
Index ¶
- Variables
- func DataSourceCatalog() common.Resource
- func DataSourceCatalogs() common.Resource
- func DataSourceCurrentMetastore() common.Resource
- func DataSourceExternalLocation() common.Resource
- func DataSourceExternalLocations() common.Resource
- func DataSourceMetastore() common.Resource
- func DataSourceMetastores() common.Resource
- func DataSourceSchemas() common.Resource
- func DataSourceStorageCredential() common.Resource
- func DataSourceStorageCredentials() common.Resource
- func DataSourceTable() common.Resource
- func DataSourceTables() common.Resource
- func DataSourceViews() common.Resource
- func DataSourceVolumes() common.Resource
- func GetSqlColumnInfoHCL(columnInfos []SqlColumnInfo) string
- func ResourceArtifactAllowlist() common.Resource
- func ResourceCatalog() common.Resource
- func ResourceCatalogWorkspaceBinding() common.Resource
- func ResourceConnection() common.Resource
- func ResourceExternalLocation() common.Resource
- func ResourceGrant() common.Resource
- func ResourceGrants() common.Resource
- func ResourceLakehouseMonitor() common.Resource
- func ResourceMetastore() common.Resource
- func ResourceMetastoreAssignment() common.Resource
- func ResourceMetastoreDataAccess() common.Resource
- func ResourceOnlineTable() common.Resource
- func ResourceQualityMonitor() common.Resource
- func ResourceRegisteredModel() common.Resource
- func ResourceSchema() common.Resource
- func ResourceSqlTable() common.Resource
- func ResourceStorageCredential() common.Resource
- func ResourceSystemSchema() common.Resource
- func ResourceTable() common.Resource
- func ResourceVolume() common.Resource
- func SuppressGcpSAKeyDiff(k, old, new string, d *schema.ResourceData) bool
- func WaitForMonitor(w *databricks.WorkspaceClient, ctx context.Context, monitorName string) error
- type ArtifactAllowlistInfo
- type CatalogInfo
- type ColumnInfo
- type ConnectionInfo
- type ExternalLocationInfo
- type GcpServiceAccountKey
- type MetastoreInfo
- type PermissionsList
- type PrivilegeAssignment
- type SchemaInfo
- type SqlColumnInfo
- type SqlTableInfo
- type SqlTablesAPI
- type StorageCredentialInfo
- type TableInfo
- type TablesAPI
- type VolumeInfo
Constants ¶
This section is empty.
Variables ¶
var MaxSqlExecWaitTimeout = 50
Functions ¶
func DataSourceCatalog ¶ added in v1.44.0
func DataSourceCatalogs ¶
func DataSourceCurrentMetastore ¶ added in v1.34.0
func DataSourceExternalLocation ¶ added in v1.40.0
func DataSourceExternalLocations ¶ added in v1.40.0
func DataSourceMetastore ¶ added in v1.22.0
func DataSourceMetastores ¶ added in v1.22.0
func DataSourceSchemas ¶
func DataSourceStorageCredential ¶ added in v1.37.0
func DataSourceStorageCredentials ¶ added in v1.37.0
func DataSourceTable ¶ added in v1.44.0
func DataSourceTables ¶
func DataSourceViews ¶
func DataSourceVolumes ¶ added in v1.36.0
func GetSqlColumnInfoHCL ¶ added in v1.40.0
func GetSqlColumnInfoHCL(columnInfos []SqlColumnInfo) string
Given a slice of SqlColumnInfo, construct the corresponding HCL string.
func ResourceArtifactAllowlist ¶ added in v1.29.0
func ResourceCatalog ¶
func ResourceCatalogWorkspaceBinding ¶ added in v1.20.0
func ResourceConnection ¶ added in v1.24.0
func ResourceGrant ¶ added in v1.34.0
func ResourceGrants ¶
func ResourceLakehouseMonitor ¶ added in v1.39.0
func ResourceMetastore ¶
func ResourceOnlineTable ¶ added in v1.39.0
func ResourceQualityMonitor ¶ added in v1.45.0
func ResourceRegisteredModel ¶ added in v1.28.0
func ResourceSchema ¶
func ResourceSqlTable ¶ added in v1.15.0
func ResourceSystemSchema ¶ added in v1.28.0
func ResourceTable ¶
func ResourceVolume ¶ added in v1.18.0
func SuppressGcpSAKeyDiff ¶ added in v1.7.0
func SuppressGcpSAKeyDiff(k, old, new string, d *schema.ResourceData) bool
func WaitForMonitor ¶ added in v1.39.0
func WaitForMonitor(w *databricks.WorkspaceClient, ctx context.Context, monitorName string) error
Types ¶
type ArtifactAllowlistInfo ¶ added in v1.29.0
type ArtifactAllowlistInfo struct {
// A list of allowed artifact match patterns.
ArtifactMatchers []catalog.ArtifactMatcher `json:"artifact_matchers" tf:"slice_set,alias:artifact_matcher"`
// The artifact type of the allowlist.
ArtifactType catalog.ArtifactType `json:"artifact_type" tf:"force_new"`
// Time at which this artifact allowlist was set, in epoch milliseconds.
CreatedAt int64 `json:"created_at,omitempty" tf:"computed"`
// Username of the user who set the artifact allowlist.
CreatedBy string `json:"created_by,omitempty" tf:"computed"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty" tf:"computed"`
}
type CatalogInfo ¶
type CatalogInfo struct {
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
StorageRoot string `json:"storage_root,omitempty" tf:"force_new"`
ProviderName string `json:"provider_name,omitempty" tf:"force_new,conflicts:storage_root"`
ConnectionName string `json:"connection_name,omitempty" tf:"force_new,conflicts:storage_root"`
EnablePredictiveOptimization string `json:"enable_predictive_optimization,omitempty" tf:"computed"`
Options map[string]string `json:"options,omitempty" tf:"force_new"`
Properties map[string]string `json:"properties,omitempty"`
Owner string `json:"owner,omitempty" tf:"computed"`
IsolationMode string `json:"isolation_mode,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
}
type ColumnInfo ¶
type ColumnInfo struct {
Name string `json:"name"`
TypeText string `json:"type_text"`
TypeJson string `json:"type_json,omitempty"`
TypeName string `json:"type_name"`
TypePrecision int32 `json:"type_precision,omitempty"`
TypeScale int32 `json:"type_scale,omitempty"`
TypeIntervalType string `json:"type_interval_type,omitempty"`
Position int32 `json:"position"`
Comment string `json:"comment,omitempty"`
Nullable bool `json:"nullable,omitempty" tf:"default:true"`
PartitionIndex int32 `json:"partition_index,omitempty"`
}
type ConnectionInfo ¶ added in v1.24.0
type ConnectionInfo struct {
// User-provided free-form text description.
Comment string `json:"comment,omitempty" tf:"force_new"`
// The type of connection.
ConnectionType string `json:"connection_type" tf:"force_new"`
// Unique identifier of parent metastore.
MetastoreId string `json:"metastore_id,omitempty" tf:"computed"`
// Name of the connection.
Name string `json:"name"`
// Name of the connection.
NameArg string `json:"-" url:"-"`
// A map of key-value properties attached to the securable.
Options map[string]string `json:"options" tf:"sensitive"`
// Username of current owner of the connection.
Owner string `json:"owner,omitempty" tf:"computed"`
// An object containing map of key-value properties attached to the
// connection.
Properties map[string]string `json:"properties,omitempty" tf:"force_new"`
// If the connection is read only.
ReadOnly bool `json:"read_only,omitempty" tf:"force_new,computed"`
}
This structure contains the fields of catalog.UpdateConnection and catalog.CreateConnection We need to create this because we need Owner, FullNameArg, SchemaName and CatalogName which aren't present in a single of them. We also need to annotate tf:"computed" for the Owner field.
type ExternalLocationInfo ¶
type ExternalLocationInfo struct {
Name string `json:"name" tf:"force_new"`
URL string `json:"url"`
CredentialName string `json:"credential_name"`
Comment string `json:"comment,omitempty"`
SkipValidation bool `json:"skip_validation,omitempty"`
Owner string `json:"owner,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
ReadOnly bool `json:"read_only,omitempty"`
AccessPoint string `json:"access_point,omitempty"`
EncDetails *catalog.EncryptionDetails `json:"encryption_details,omitempty"`
IsolationMode string `json:"isolation_mode,omitempty" tf:"computed"`
}
This structure contains the fields of both catalog.UpdateExternalLocation and catalog.CreateExternalLocation
type GcpServiceAccountKey ¶ added in v1.7.0
type MetastoreInfo ¶
type MetastoreInfo struct {
Name string `json:"name"`
StorageRoot string `json:"storage_root,omitempty" tf:"force_new"`
DefaultDacID string `json:"default_data_access_config_id,omitempty" tf:"suppress_diff"`
StorageRootCredentialId string `json:"storage_root_credential_id,omitempty" tf:"suppress_diff"`
Owner string `json:"owner,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
Region string `json:"region,omitempty" tf:"computed"`
Cloud string `json:"cloud,omitempty" tf:"computed"`
GlobalMetastoreId string `json:"global_metastore_id,omitempty" tf:"computed"`
CreatedAt int64 `json:"created_at,omitempty" tf:"computed"`
CreatedBy string `json:"created_by,omitempty" tf:"computed"`
UpdatedAt int64 `json:"updated_at,omitempty" tf:"computed"`
UpdatedBy string `json:"updated_by,omitempty" tf:"computed"`
DeltaSharingScope string `json:"delta_sharing_scope,omitempty" tf:"suppress_diff"`
DeltaSharingRecipientTokenLifetimeInSeconds int64 `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
DeltaSharingOrganizationName string `json:"delta_sharing_organization_name,omitempty"`
}
type PermissionsList ¶
type PermissionsList struct {
Assignments []PrivilegeAssignment `json:"privilege_assignments" tf:"slice_set,alias:grant"`
}
PermissionsList reflects it's shape on terraform resource with privilege_assignments column renamed to `grant` block for simplicity
type PrivilegeAssignment ¶
type PrivilegeAssignment struct {
Principal string `json:"principal"`
Privileges []string `json:"privileges" tf:"slice_set"`
}
PrivilegeAssignment reflects on `grant` block
type SchemaInfo ¶
type SchemaInfo struct {
Name string `json:"name" tf:"force_new"`
CatalogName string `json:"catalog_name" tf:"force_new"`
StorageRoot string `json:"storage_root,omitempty" tf:"force_new"`
Comment string `json:"comment,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
EnablePredictiveOptimization string `json:"enable_predictive_optimization,omitempty" tf:"computed"`
Owner string `json:"owner,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
FullName string `json:"full_name,omitempty" tf:"computed"`
}
type SqlColumnInfo ¶ added in v1.15.0
type SqlTableInfo ¶ added in v1.15.0
type SqlTableInfo struct {
Name string `json:"name"`
CatalogName string `json:"catalog_name" tf:"force_new"`
SchemaName string `json:"schema_name" tf:"force_new"`
TableType string `json:"table_type" tf:"force_new"`
DataSourceFormat string `json:"data_source_format,omitempty" tf:"force_new"`
ColumnInfos []SqlColumnInfo `json:"columns,omitempty" tf:"alias:column,computed"`
Partitions []string `json:"partitions,omitempty" tf:"force_new"`
ClusterKeys []string `json:"cluster_keys,omitempty" tf:"force_new"`
StorageLocation string `json:"storage_location,omitempty" tf:"suppress_diff"`
StorageCredentialName string `json:"storage_credential_name,omitempty" tf:"force_new"`
ViewDefinition string `json:"view_definition,omitempty"`
Comment string `json:"comment,omitempty"`
Properties map[string]string `json:"properties,omitempty" tf:"computed"`
Options map[string]string `json:"options,omitempty" tf:"force_new"`
ClusterID string `json:"cluster_id,omitempty" tf:"computed"`
WarehouseID string `json:"warehouse_id,omitempty"`
Owner string `json:"owner,omitempty" tf:"computed"`
// contains filtered or unexported fields
}
func (*SqlTableInfo) FullName ¶ added in v1.15.0
func (ti *SqlTableInfo) FullName() string
func (*SqlTableInfo) SQLFullName ¶ added in v1.24.0
func (ti *SqlTableInfo) SQLFullName() string
type SqlTablesAPI ¶ added in v1.15.0
type SqlTablesAPI struct {
// contains filtered or unexported fields
}
func NewSqlTablesAPI ¶ added in v1.15.0
func NewSqlTablesAPI(ctx context.Context, m any) SqlTablesAPI
type StorageCredentialInfo ¶
type StorageCredentialInfo struct {
Name string `json:"name" tf:"force_new"`
Owner string `json:"owner,omitempty" tf:"computed"`
Comment string `json:"comment,omitempty"`
Aws *catalog.AwsIamRoleResponse `json:"aws_iam_role,omitempty" tf:"group:access"`
Azure *catalog.AzureServicePrincipal `json:"azure_service_principal,omitempty" tf:"group:access"`
AzMI *catalog.AzureManagedIdentityResponse `json:"azure_managed_identity,omitempty" tf:"group:access"`
GcpSAKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty" tf:"group:access"`
DatabricksGcpServiceAccount *catalog.DatabricksGcpServiceAccountResponse `json:"databricks_gcp_service_account,omitempty" tf:"computed"`
MetastoreID string `json:"metastore_id,omitempty" tf:"computed"`
ReadOnly bool `json:"read_only,omitempty"`
SkipValidation bool `json:"skip_validation,omitempty"`
IsolationMode string `json:"isolation_mode,omitempty" tf:"computed"`
}
type TableInfo ¶
type TableInfo struct {
Name string `json:"name"`
CatalogName string `json:"catalog_name" tf:"force_new"`
SchemaName string `json:"schema_name" tf:"force_new"`
TableType string `json:"table_type" tf:"force_new"`
DataSourceFormat string `json:"data_source_format"`
ColumnInfos []ColumnInfo `json:"columns" tf:"alias:column"`
StorageLocation string `json:"storage_location,omitempty" tf:"suppress_diff"`
StorageCredentialName string `json:"storage_credential_name,omitempty" tf:"force_new"`
ViewDefinition string `json:"view_definition,omitempty"`
Owner string `json:"owner,omitempty" tf:"computed"`
Comment string `json:"comment,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
}
type VolumeInfo ¶ added in v1.18.0
type VolumeInfo struct {
// The name of the catalog where the schema and the volume are
CatalogName string `json:"catalog_name" tf:"force_new"`
// The comment attached to the volume
Comment string `json:"comment,omitempty"`
// The name of the schema where the volume is
SchemaName string `json:"schema_name" tf:"force_new"`
FullNameArg string `json:"-" url:"-"`
// The name of the volume
Name string `json:"name"`
// The identifier of the user who owns the volume
Owner string `json:"owner,omitempty" tf:"computed"`
// The storage location on the cloud
StorageLocation string `json:"storage_location,omitempty" tf:"force_new"`
VolumeType catalog.VolumeType `json:"volume_type" tf:"force_new"`
}
This structure contains the fields of catalog.UpdateVolumeRequestContent and catalog.CreateVolumeRequestContent We need to create this because we need Owner, FullNameArg, SchemaName and CatalogName which aren't present in a single of them. We also need to annotate tf:"computed" for the Owner field.
Source Files
¶
- data_catalog.go
- data_catalogs.go
- data_current_metastore.go
- data_external_location.go
- data_external_locations.go
- data_metastore.go
- data_metastores.go
- data_schemas.go
- data_storage_credential.go
- data_storage_credentials.go
- data_table.go
- data_tables.go
- data_views.go
- data_volumes.go
- resource_artifact_allowlist.go
- resource_catalog.go
- resource_catalog_workspace_binding.go
- resource_connection.go
- resource_external_location.go
- resource_grant.go
- resource_grants.go
- resource_lakehouse_monitor.go
- resource_metastore.go
- resource_metastore_assignment.go
- resource_metastore_data_access.go
- resource_online_table.go
- resource_quality_monitor.go
- resource_registered_model.go
- resource_schema.go
- resource_sql_table.go
- resource_storage_credential.go
- resource_system_schema.go
- resource_table.go
- resource_volume.go
- update.go
- utils.go