catalog

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var MaxSqlExecWaitTimeout = 50

Functions

func DataSourceCatalogs

func DataSourceCatalogs() *schema.Resource

func DataSourceCurrentMetastore added in v1.34.0

func DataSourceCurrentMetastore() *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 ResourceArtifactAllowlist added in v1.29.0

func ResourceArtifactAllowlist() *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 ResourceGrant added in v1.34.0

func ResourceGrant() *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 ResourceRegisteredModel added in v1.28.0

func ResourceRegisteredModel() *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 ResourceSystemSchema added in v1.28.0

func ResourceSystemSchema() *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 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"`
	ShareName      string            `json:"share_name,omitempty" tf:"force_new,conflicts:storage_root"`
	ConnectionName string            `json:"connection_name,omitempty" tf:"force_new,conflicts:storage_root"`
	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"`
}

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 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 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 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 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"`
	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"`
	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"`
	// 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.AwsIamRole                          `json:"aws_iam_role,omitempty" tf:"group:access"`
	Azure                       *catalog.AzureServicePrincipal               `json:"azure_service_principal,omitempty" tf:"group:access"`
	AzMI                        *catalog.AzureManagedIdentity                `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"`
}

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 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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