catalog

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShareAdd    = "ADD"
	ShareRemove = "REMOVE"
	ShareUpdate = "UPDATE"
)

Variables

This section is empty.

Functions

func DataSourceCatalogs

func DataSourceCatalogs() *schema.Resource

func DataSourceMetastore added in v1.22.0

func DataSourceMetastore() *schema.Resource

func DataSourceMetastores added in v1.22.0

func DataSourceMetastores() *schema.Resource

func DataSourceSchemas

func DataSourceSchemas() *schema.Resource

func DataSourceShare added in v1.6.0

func DataSourceShare() *schema.Resource

func DataSourceShares added in v1.6.0

func DataSourceShares() *schema.Resource

func DataSourceTables

func DataSourceTables() *schema.Resource

func DataSourceViews

func DataSourceViews() *schema.Resource

func ResourceCatalog

func ResourceCatalog() *schema.Resource

func ResourceCatalogWorkspaceBinding added in v1.20.0

func ResourceCatalogWorkspaceBinding() *schema.Resource

func ResourceConnection added in v1.24.0

func ResourceConnection() *schema.Resource

func ResourceExternalLocation

func ResourceExternalLocation() *schema.Resource

func ResourceGrants

func ResourceGrants() *schema.Resource

func ResourceMetastore

func ResourceMetastore() *schema.Resource

func ResourceMetastoreAssignment

func ResourceMetastoreAssignment() *schema.Resource

func ResourceMetastoreDataAccess

func ResourceMetastoreDataAccess() *schema.Resource

func ResourceProvider added in v1.8.0

func ResourceProvider() *schema.Resource

func ResourceRecipient added in v1.3.0

func ResourceRecipient() *schema.Resource

func ResourceSchema

func ResourceSchema() *schema.Resource

func ResourceShare added in v1.6.0

func ResourceShare() *schema.Resource

func ResourceSqlTable added in v1.15.0

func ResourceSqlTable() *schema.Resource

func ResourceStorageCredential

func ResourceStorageCredential() *schema.Resource

func ResourceTable

func ResourceTable() *schema.Resource

func ResourceVolume added in v1.18.0

func ResourceVolume() *schema.Resource

func SuppressGcpSAKeyDiff added in v1.7.0

func SuppressGcpSAKeyDiff(k, old, new string, d *schema.ResourceData) bool

Types

type AwsIamRole

type AwsIamRole struct {
	RoleARN string `json:"role_arn"`
}

type AzureManagedIdentity

type AzureManagedIdentity struct {
	AccessConnectorID string `json:"access_connector_id"`
}

type AzureServicePrincipal

type AzureServicePrincipal struct {
	DirectoryID   string `json:"directory_id"`
	ApplicationID string `json:"application_id"`
	ClientSecret  string `json:"client_secret" tf:"sensitive"`
}

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"`
	ShareName      string            `json:"share_name,omitempty" tf:"force_new,conflicts:storage_root"`
	ConnectionName string            `json:"connection_name,omitempty" tf:"force_new,conflicts:storage_root"`
	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:"force_new,suppress_diff"`
	// 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 DataAccessConfiguration

type DataAccessConfiguration struct {
	ID                string                 `json:"id,omitempty" tf:"computed"`
	Name              string                 `json:"name"`
	ConfigurationType string                 `json:"configuration_type,omitempty" tf:"computed"`
	Aws               *AwsIamRole            `json:"aws_iam_role,omitempty" tf:"group:access"`
	Azure             *AzureServicePrincipal `json:"azure_service_principal,omitempty" tf:"group:access"`
	AzMI              *AzureManagedIdentity  `json:"azure_managed_identity,omitempty" tf:"group:access"`
	GcpSAKey          *GcpServiceAccountKey  `json:"gcp_service_account_key,omitempty" tf:"group:access"`
	DBGcpSA           *DbGcpServiceAccount   `json:"databricks_gcp_service_account,omitempty" tf:"group:access"`
}

type DbGcpServiceAccount added in v1.12.0

type DbGcpServiceAccount struct {
	Email string `json:"email,omitempty" tf:"computed"`
}

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"`
}

This structure contains the fields of both catalog.UpdateExternalLocation and catalog.CreateExternalLocation

type GcpServiceAccountKey added in v1.7.0

type GcpServiceAccountKey struct {
	Email        string `json:"email"`
	PrivateKeyId string `json:"private_key_id"`
	PrivateKey   string `json:"private_key" tf:"sensitive"`
}

type IpAccessList added in v1.3.0

type IpAccessList struct {
	AllowedIpAddresses []string `json:"allowed_ip_addresses"`
}

type MetastoreInfo

type MetastoreInfo struct {
	Name                                        string `json:"name"`
	StorageRoot                                 string `json:"storage_root" 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 Partition added in v1.10.0

type Partition struct {
	Values []PartitionValue `json:"values" tf:"alias:value"`
}

type PartitionValue added in v1.10.0

type PartitionValue struct {
	Name                 string `json:"name"`
	Op                   string `json:"op"`
	RecipientPropertyKey string `json:"recipient_property_key,omitempty"`
	Value                string `json:"value,omitempty"`
}

type PermissionsAPI

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

func NewPermissionsAPI

func NewPermissionsAPI(ctx context.Context, m any) PermissionsAPI

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 ProviderInfo added in v1.8.0

type ProviderInfo struct {
	Name                string `json:"name" tf:"force_new"`
	Comment             string `json:"comment,omitempty"`
	AuthenticationType  string `json:"authentication_type"`
	RecipientProfileStr string `json:"recipient_profile_str" tf:"sensitive"`
}

type Providers added in v1.8.0

type Providers struct {
	Providers []ProviderInfo `json:"providers"`
}

type ProvidersAPI added in v1.8.0

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

func NewProvidersAPI added in v1.8.0

func NewProvidersAPI(ctx context.Context, m interface{}) ProvidersAPI

type RecipientInfo added in v1.3.0

type RecipientInfo struct {
	Name                           string        `json:"name" tf:"force_new"`
	Comment                        string        `json:"comment,omitempty"`
	SharingCode                    string        `json:"sharing_code,omitempty" tf:"sensitive,force_new,suppress_diff"`
	AuthenticationType             string        `json:"authentication_type" tf:"force_new"`
	Tokens                         []Token       `json:"tokens,omitempty" tf:"computed"`
	DataRecipientGlobalMetastoreId string        `json:"data_recipient_global_metastore_id,omitempty" tf:"force_new,conflicts:ip_access_list"`
	IpAccessList                   *IpAccessList `json:"ip_access_list,omitempty"`
}

type Recipients added in v1.3.0

type Recipients struct {
	Recipients []RecipientInfo `json:"recipients"`
}

type RecipientsAPI added in v1.3.0

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

func NewRecipientsAPI added in v1.3.0

func NewRecipientsAPI(ctx context.Context, m any) RecipientsAPI

type SchemaInfo

type SchemaInfo struct {
	Name        string            `json:"name" tf:"force_new"`
	CatalogName string            `json:"catalog_name"`
	StorageRoot string            `json:"storage_root,omitempty" tf:"force_new"`
	Comment     string            `json:"comment,omitempty"`
	Properties  map[string]string `json:"properties,omitempty"`
	Owner       string            `json:"owner,omitempty" tf:"computed"`
	MetastoreID string            `json:"metastore_id,omitempty" tf:"computed"`
	FullName    string            `json:"full_name,omitempty" tf:"computed"`
}

type ShareDataChange added in v1.6.0

type ShareDataChange struct {
	Action     string           `json:"action"`
	DataObject SharedDataObject `json:"data_object"`
}

type ShareInfo added in v1.6.0

type ShareInfo struct {
	Name      string             `json:"name" tf:"force_new"`
	Owner     string             `json:"owner,omitempty" tf:"suppress_diff"`
	Objects   []SharedDataObject `json:"objects,omitempty" tf:"alias:object"`
	CreatedAt int64              `json:"created_at,omitempty" tf:"computed"`
	CreatedBy string             `json:"created_by,omitempty" tf:"computed"`
}

func (ShareInfo) Diff added in v1.6.0

func (beforeSi ShareInfo) Diff(afterSi ShareInfo) []ShareDataChange

type ShareUpdates added in v1.6.0

type ShareUpdates struct {
	Owner   string            `json:"owner,omitempty"`
	Updates []ShareDataChange `json:"updates"`
}

type SharedDataObject added in v1.6.0

type SharedDataObject struct {
	Name                     string      `json:"name"`
	DataObjectType           string      `json:"data_object_type"`
	Comment                  string      `json:"comment,omitempty"`
	SharedAs                 string      `json:"shared_as,omitempty" tf:"suppress_diff"`
	CDFEnabled               bool        `json:"cdf_enabled,omitempty" tf:"suppress_diff"`
	StartVersion             int64       `json:"start_version,omitempty" tf:"suppress_diff"`
	HistoryDataSharingStatus string      `json:"history_data_sharing_status,omitempty" tf:"suppress_diff"`
	Partitions               []Partition `json:"partitions,omitempty" tf:"alias:partition"`
	Status                   string      `json:"status,omitempty" tf:"computed"`
	AddedAt                  int64       `json:"added_at,omitempty" tf:"computed"`
	AddedBy                  string      `json:"added_by,omitempty" tf:"computed"`
}

func (SharedDataObject) Equal added in v1.18.0

func (sdo SharedDataObject) Equal(other SharedDataObject) bool

type Shares added in v1.6.0

type Shares struct {
	Shares []ShareInfo `json:"shares"`
}

type SharesAPI added in v1.6.0

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

func NewSharesAPI added in v1.6.0

func NewSharesAPI(ctx context.Context, m any) SharesAPI

type SqlColumnInfo added in v1.15.0

type SqlColumnInfo struct {
	Name     string `json:"name"`
	Type     string `json:"type_text,omitempty" tf:"suppress_diff,alias:type"`
	Comment  string `json:"comment,omitempty"`
	Nullable bool   `json:"nullable,omitempty" tf:"default:true"`
}

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,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"`
	ClusterID             string            `json:"cluster_id,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         *AwsIamRole            `json:"aws_iam_role,omitempty" tf:"group:access"`
	Azure       *AzureServicePrincipal `json:"azure_service_principal,omitempty" tf:"group:access"`
	AzMI        *AzureManagedIdentity  `json:"azure_managed_identity,omitempty" tf:"group:access"`
	GcpSAKey    *GcpServiceAccountKey  `json:"gcp_service_account_key,omitempty" tf:"group:access"`
	DBGcpSA     *DbGcpServiceAccount   `json:"databricks_gcp_service_account,omitempty" tf:"computed"`
	MetastoreID string                 `json:"metastore_id,omitempty" tf:"computed"`
	ReadOnly    bool                   `json:"read_only,omitempty"`
}

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"`
}

func (TableInfo) FullName

func (ti TableInfo) FullName() string

type TablesAPI

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

func NewTablesAPI

func NewTablesAPI(ctx context.Context, m any) TablesAPI

type Token added in v1.3.0

type Token struct {
	Id             string `json:"id,omitempty" tf:"computed"`
	CreatedAt      int64  `json:"created_at,omitempty" tf:"computed"`
	CreatedBy      string `json:"created_by,omitempty" tf:"computed"`
	ActivationUrl  string `json:"activation_url,omitempty" tf:"computed"`
	ExpirationTime int64  `json:"expiration_time,omitempty" tf:"computed"`
	UpdatedAt      int64  `json:"updated_at,omitempty" tf:"computed"`
	UpdatedBy      string `json:"updated_by,omitempty" tf:"computed"`
}

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"`
	// 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"`
	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"`
	VolumeType      catalog.VolumeType `json:"volume_type"`
}

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.

Jump to

Keyboard shortcuts

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