database_instance

package
v1.114.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceDatabaseInstance

func DataSourceDatabaseInstance() datasource.DataSource

func DataSourceDatabaseInstances

func DataSourceDatabaseInstances() datasource.DataSource

func ProviderConfigDataWorkspaceIDPlanModifier added in v1.106.0

func ProviderConfigDataWorkspaceIDPlanModifier(ctx context.Context, req planmodifier.StringRequest, resp *stringplanmodifier.RequiresReplaceIfFuncResponse)

ProviderConfigDataWorkspaceIDPlanModifier is plan modifier for the workspace_id field. Resource requires replacement if the workspace_id changes from one non-empty value to another.

func ProviderConfigWorkspaceIDPlanModifier added in v1.106.0

func ProviderConfigWorkspaceIDPlanModifier(ctx context.Context, req planmodifier.StringRequest, resp *stringplanmodifier.RequiresReplaceIfFuncResponse)

ProviderConfigWorkspaceIDPlanModifier is plan modifier for the workspace_id field. Resource requires replacement if the workspace_id changes from one non-empty value to another.

func ResourceDatabaseInstance

func ResourceDatabaseInstance() resource.Resource

Types

type DatabaseInstance added in v1.88.0

type DatabaseInstance struct {
	// The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8".
	Capacity types.String `tfsdk:"capacity"`
	// The refs of the child instances. This is only available if the instance
	// is parent instance.
	ChildInstanceRefs types.List `tfsdk:"child_instance_refs"`
	// The timestamp when the instance was created.
	CreationTime types.String `tfsdk:"creation_time"`
	// The email of the creator of the instance.
	Creator types.String `tfsdk:"creator"`
	// Custom tags associated with the instance. This field is only included on
	// create and update responses.
	CustomTags types.List `tfsdk:"custom_tags"`
	// Deprecated. The sku of the instance; this field will always match the
	// value of capacity. This is an output only field that contains the value
	// computed from the input field combined with server side defaults. Use the
	// field without the effective_ prefix to set the value.
	EffectiveCapacity types.String `tfsdk:"effective_capacity"`
	// The recorded custom tags associated with the instance. This is an output
	// only field that contains the value computed from the input field combined
	// with server side defaults. Use the field without the effective_ prefix to
	// set the value.
	EffectiveCustomTags types.List `tfsdk:"effective_custom_tags"`
	// Whether the instance has PG native password login enabled. This is an
	// output only field that contains the value computed from the input field
	// combined with server side defaults. Use the field without the effective_
	// prefix to set the value.
	EffectiveEnablePgNativeLogin types.Bool `tfsdk:"effective_enable_pg_native_login"`
	// Whether secondaries serving read-only traffic are enabled. Defaults to
	// false. This is an output only field that contains the value computed from
	// the input field combined with server side defaults. Use the field without
	// the effective_ prefix to set the value.
	EffectiveEnableReadableSecondaries types.Bool `tfsdk:"effective_enable_readable_secondaries"`
	// The number of nodes in the instance, composed of 1 primary and 0 or more
	// secondaries. Defaults to 1 primary and 0 secondaries. This is an output
	// only field that contains the value computed from the input field combined
	// with server side defaults. Use the field without the effective_ prefix to
	// set the value.
	EffectiveNodeCount types.Int64 `tfsdk:"effective_node_count"`
	// The retention window for the instance. This is the time window in days
	// for which the historical data is retained. This is an output only field
	// that contains the value computed from the input field combined with
	// server side defaults. Use the field without the effective_ prefix to set
	// the value.
	EffectiveRetentionWindowInDays types.Int64 `tfsdk:"effective_retention_window_in_days"`
	// Whether the instance is stopped. This is an output only field that
	// contains the value computed from the input field combined with server
	// side defaults. Use the field without the effective_ prefix to set the
	// value.
	EffectiveStopped types.Bool `tfsdk:"effective_stopped"`
	// The policy that is applied to the instance. This is an output only field
	// that contains the value computed from the input field combined with
	// server side defaults. Use the field without the effective_ prefix to set
	// the value.
	EffectiveUsagePolicyId types.String `tfsdk:"effective_usage_policy_id"`
	// Whether to enable PG native password login on the instance. Defaults to
	// false.
	EnablePgNativeLogin types.Bool `tfsdk:"enable_pg_native_login"`
	// Whether to enable secondaries to serve read-only traffic. Defaults to
	// false.
	EnableReadableSecondaries types.Bool `tfsdk:"enable_readable_secondaries"`
	// The name of the instance. This is the unique identifier for the instance.
	Name types.String `tfsdk:"name"`
	// The number of nodes in the instance, composed of 1 primary and 0 or more
	// secondaries. Defaults to 1 primary and 0 secondaries. This field is input
	// only, see effective_node_count for the output.
	NodeCount types.Int64 `tfsdk:"node_count"`
	// The ref of the parent instance. This is only available if the instance is
	// child instance. Input: For specifying the parent instance to create a
	// child instance. Optional. Output: Only populated if provided as input to
	// create a child instance.
	ParentInstanceRef types.Object `tfsdk:"parent_instance_ref"`
	// The version of Postgres running on the instance.
	PgVersion types.String `tfsdk:"pg_version"`
	// Deprecated. Omitting the field or setting it to true will result in the
	// field being hard deleted. Setting a value of false will throw a bad
	// request.
	PurgeOnDelete types.Bool `tfsdk:"purge_on_delete"`
	// The DNS endpoint to connect to the instance for read only access. This is
	// only available if enable_readable_secondaries is true.
	ReadOnlyDns types.String `tfsdk:"read_only_dns"`
	// The DNS endpoint to connect to the instance for read+write access.
	ReadWriteDns types.String `tfsdk:"read_write_dns"`
	// The retention window for the instance. This is the time window in days
	// for which the historical data is retained. The default value is 7 days.
	// Valid values are 2 to 35 days.
	RetentionWindowInDays types.Int64 `tfsdk:"retention_window_in_days"`
	// The current state of the instance.
	State types.String `tfsdk:"state"`
	// Whether to stop the instance. An input only param, see effective_stopped
	// for the output.
	Stopped types.Bool `tfsdk:"stopped"`
	// An immutable UUID identifier for the instance.
	Uid types.String `tfsdk:"uid"`
	// The desired usage policy to associate with the instance.
	UsagePolicyId  types.String `tfsdk:"usage_policy_id"`
	ProviderConfig types.Object `tfsdk:"provider_config"`
}

DatabaseInstance extends the main model with additional fields.

func (DatabaseInstance) ApplySchemaCustomizations added in v1.92.0

func (m DatabaseInstance) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder

func (*DatabaseInstance) GetChildInstanceRefs added in v1.92.0

func (m *DatabaseInstance) GetChildInstanceRefs(ctx context.Context) ([]database_tf.DatabaseInstanceRef, bool)

GetChildInstanceRefs returns the value of the ChildInstanceRefs field in DatabaseInstance as a slice of database_tf.DatabaseInstanceRef values. If the field is unknown or null, the boolean return value is false.

func (DatabaseInstance) GetComplexFieldTypes added in v1.88.0

func (m DatabaseInstance) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type

GetComplexFieldTypes returns a map of the types of elements in complex fields in the extended DatabaseInstance struct. Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry the type information of their elements in the Go type system. This function provides a way to retrieve the type information of the elements in complex fields at runtime. The values of the map are the reflected types of the contained elements. They must be either primitive values from the plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF SDK values.

func (*DatabaseInstance) GetCustomTags added in v1.92.0

func (m *DatabaseInstance) GetCustomTags(ctx context.Context) ([]database_tf.CustomTag, bool)

GetCustomTags returns the value of the CustomTags field in DatabaseInstance as a slice of database_tf.CustomTag values. If the field is unknown or null, the boolean return value is false.

func (*DatabaseInstance) GetEffectiveCustomTags added in v1.92.0

func (m *DatabaseInstance) GetEffectiveCustomTags(ctx context.Context) ([]database_tf.CustomTag, bool)

GetEffectiveCustomTags returns the value of the EffectiveCustomTags field in DatabaseInstance as a slice of database_tf.CustomTag values. If the field is unknown or null, the boolean return value is false.

func (*DatabaseInstance) GetParentInstanceRef added in v1.92.0

func (m *DatabaseInstance) GetParentInstanceRef(ctx context.Context) (database_tf.DatabaseInstanceRef, bool)

GetParentInstanceRef returns the value of the ParentInstanceRef field in DatabaseInstance as a database_tf.DatabaseInstanceRef value. If the field is unknown or null, the boolean return value is false.

func (*DatabaseInstance) SetChildInstanceRefs added in v1.92.0

func (m *DatabaseInstance) SetChildInstanceRefs(ctx context.Context, v []database_tf.DatabaseInstanceRef)

SetChildInstanceRefs sets the value of the ChildInstanceRefs field in DatabaseInstance.

func (*DatabaseInstance) SetCustomTags added in v1.92.0

func (m *DatabaseInstance) SetCustomTags(ctx context.Context, v []database_tf.CustomTag)

SetCustomTags sets the value of the CustomTags field in DatabaseInstance.

func (*DatabaseInstance) SetEffectiveCustomTags added in v1.92.0

func (m *DatabaseInstance) SetEffectiveCustomTags(ctx context.Context, v []database_tf.CustomTag)

SetEffectiveCustomTags sets the value of the EffectiveCustomTags field in DatabaseInstance.

func (*DatabaseInstance) SetParentInstanceRef added in v1.92.0

func (m *DatabaseInstance) SetParentInstanceRef(ctx context.Context, v database_tf.DatabaseInstanceRef)

SetParentInstanceRef sets the value of the ParentInstanceRef field in DatabaseInstance.

func (*DatabaseInstance) SyncFieldsDuringCreateOrUpdate added in v1.88.0

func (to *DatabaseInstance) SyncFieldsDuringCreateOrUpdate(ctx context.Context, from DatabaseInstance)

SyncFieldsDuringCreateOrUpdate copies values from the plan into the receiver, including both embedded model fields and additional fields. This method is called during create and update.

func (*DatabaseInstance) SyncFieldsDuringRead added in v1.88.0

func (to *DatabaseInstance) SyncFieldsDuringRead(ctx context.Context, from DatabaseInstance)

SyncFieldsDuringRead copies values from the existing state into the receiver, including both embedded model fields and additional fields. This method is called during read.

func (DatabaseInstance) ToObjectValue added in v1.88.0

func (m DatabaseInstance) ToObjectValue(ctx context.Context) basetypes.ObjectValue

ToObjectValue returns the object value for the resource, combining attributes from the embedded TFSDK model and contains additional fields.

TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise interfere with how the plugin framework retrieves and sets values in state. Thus, DatabaseInstance only implements ToObjectValue() and Type().

func (DatabaseInstance) Type added in v1.88.0

Type returns the object type with attributes from both the embedded TFSDK model and contains additional fields.

type DatabaseInstanceData added in v1.88.0

type DatabaseInstanceData struct {
	// The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8".
	Capacity types.String `tfsdk:"capacity"`
	// The refs of the child instances. This is only available if the instance
	// is parent instance.
	ChildInstanceRefs types.List `tfsdk:"child_instance_refs"`
	// The timestamp when the instance was created.
	CreationTime types.String `tfsdk:"creation_time"`
	// The email of the creator of the instance.
	Creator types.String `tfsdk:"creator"`
	// Custom tags associated with the instance. This field is only included on
	// create and update responses.
	CustomTags types.List `tfsdk:"custom_tags"`
	// Deprecated. The sku of the instance; this field will always match the
	// value of capacity. This is an output only field that contains the value
	// computed from the input field combined with server side defaults. Use the
	// field without the effective_ prefix to set the value.
	EffectiveCapacity types.String `tfsdk:"effective_capacity"`
	// The recorded custom tags associated with the instance. This is an output
	// only field that contains the value computed from the input field combined
	// with server side defaults. Use the field without the effective_ prefix to
	// set the value.
	EffectiveCustomTags types.List `tfsdk:"effective_custom_tags"`
	// Whether the instance has PG native password login enabled. This is an
	// output only field that contains the value computed from the input field
	// combined with server side defaults. Use the field without the effective_
	// prefix to set the value.
	EffectiveEnablePgNativeLogin types.Bool `tfsdk:"effective_enable_pg_native_login"`
	// Whether secondaries serving read-only traffic are enabled. Defaults to
	// false. This is an output only field that contains the value computed from
	// the input field combined with server side defaults. Use the field without
	// the effective_ prefix to set the value.
	EffectiveEnableReadableSecondaries types.Bool `tfsdk:"effective_enable_readable_secondaries"`
	// The number of nodes in the instance, composed of 1 primary and 0 or more
	// secondaries. Defaults to 1 primary and 0 secondaries. This is an output
	// only field that contains the value computed from the input field combined
	// with server side defaults. Use the field without the effective_ prefix to
	// set the value.
	EffectiveNodeCount types.Int64 `tfsdk:"effective_node_count"`
	// The retention window for the instance. This is the time window in days
	// for which the historical data is retained. This is an output only field
	// that contains the value computed from the input field combined with
	// server side defaults. Use the field without the effective_ prefix to set
	// the value.
	EffectiveRetentionWindowInDays types.Int64 `tfsdk:"effective_retention_window_in_days"`
	// Whether the instance is stopped. This is an output only field that
	// contains the value computed from the input field combined with server
	// side defaults. Use the field without the effective_ prefix to set the
	// value.
	EffectiveStopped types.Bool `tfsdk:"effective_stopped"`
	// The policy that is applied to the instance. This is an output only field
	// that contains the value computed from the input field combined with
	// server side defaults. Use the field without the effective_ prefix to set
	// the value.
	EffectiveUsagePolicyId types.String `tfsdk:"effective_usage_policy_id"`
	// Whether to enable PG native password login on the instance. Defaults to
	// false.
	EnablePgNativeLogin types.Bool `tfsdk:"enable_pg_native_login"`
	// Whether to enable secondaries to serve read-only traffic. Defaults to
	// false.
	EnableReadableSecondaries types.Bool `tfsdk:"enable_readable_secondaries"`
	// The name of the instance. This is the unique identifier for the instance.
	Name types.String `tfsdk:"name"`
	// The number of nodes in the instance, composed of 1 primary and 0 or more
	// secondaries. Defaults to 1 primary and 0 secondaries. This field is input
	// only, see effective_node_count for the output.
	NodeCount types.Int64 `tfsdk:"node_count"`
	// The ref of the parent instance. This is only available if the instance is
	// child instance. Input: For specifying the parent instance to create a
	// child instance. Optional. Output: Only populated if provided as input to
	// create a child instance.
	ParentInstanceRef types.Object `tfsdk:"parent_instance_ref"`
	// The version of Postgres running on the instance.
	PgVersion types.String `tfsdk:"pg_version"`
	// The DNS endpoint to connect to the instance for read only access. This is
	// only available if enable_readable_secondaries is true.
	ReadOnlyDns types.String `tfsdk:"read_only_dns"`
	// The DNS endpoint to connect to the instance for read+write access.
	ReadWriteDns types.String `tfsdk:"read_write_dns"`
	// The retention window for the instance. This is the time window in days
	// for which the historical data is retained. The default value is 7 days.
	// Valid values are 2 to 35 days.
	RetentionWindowInDays types.Int64 `tfsdk:"retention_window_in_days"`
	// The current state of the instance.
	State types.String `tfsdk:"state"`
	// Whether to stop the instance. An input only param, see effective_stopped
	// for the output.
	Stopped types.Bool `tfsdk:"stopped"`
	// An immutable UUID identifier for the instance.
	Uid types.String `tfsdk:"uid"`
	// The desired usage policy to associate with the instance.
	UsagePolicyId      types.String `tfsdk:"usage_policy_id"`
	ProviderConfigData types.Object `tfsdk:"provider_config"`
}

DatabaseInstanceData extends the main model with additional fields.

func (DatabaseInstanceData) ApplySchemaCustomizations added in v1.92.0

func (m DatabaseInstanceData) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder

func (DatabaseInstanceData) GetComplexFieldTypes added in v1.88.0

func (m DatabaseInstanceData) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type

GetComplexFieldTypes returns a map of the types of elements in complex fields in the extended DatabaseInstanceData struct. Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry the type information of their elements in the Go type system. This function provides a way to retrieve the type information of the elements in complex fields at runtime. The values of the map are the reflected types of the contained elements. They must be either primitive values from the plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF SDK values.

func (DatabaseInstanceData) ToObjectValue added in v1.88.0

ToObjectValue returns the object value for the resource, combining attributes from the embedded TFSDK model and contains additional fields.

TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise interfere with how the plugin framework retrieves and sets values in state. Thus, DatabaseInstanceData only implements ToObjectValue() and Type().

func (DatabaseInstanceData) Type added in v1.88.0

Type returns the object type with attributes from both the embedded TFSDK model and contains additional fields.

type DatabaseInstanceDataSource

type DatabaseInstanceDataSource struct {
	Client *autogen.DatabricksClient
}

func (*DatabaseInstanceDataSource) Configure

func (*DatabaseInstanceDataSource) Metadata

func (*DatabaseInstanceDataSource) Read

func (*DatabaseInstanceDataSource) Schema

type DatabaseInstanceResource

type DatabaseInstanceResource struct {
	Client *autogen.DatabricksClient
}

func (*DatabaseInstanceResource) Configure

func (*DatabaseInstanceResource) Create

func (*DatabaseInstanceResource) Delete

func (*DatabaseInstanceResource) ImportState

func (*DatabaseInstanceResource) Metadata

func (*DatabaseInstanceResource) ModifyPlan added in v1.113.0

func (*DatabaseInstanceResource) Read

func (*DatabaseInstanceResource) Schema

func (*DatabaseInstanceResource) Update

type DatabaseInstancesData added in v1.88.0

type DatabaseInstancesData struct {
	Database types.List `tfsdk:"database_instances"`
	// Upper bound for items returned. The maximum value is 100.
	PageSize           types.Int64  `tfsdk:"page_size"`
	ProviderConfigData types.Object `tfsdk:"provider_config"`
}

DatabaseInstancesData extends the main model with additional fields.

func (DatabaseInstancesData) ApplySchemaCustomizations added in v1.92.0

func (m DatabaseInstancesData) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder

func (DatabaseInstancesData) GetComplexFieldTypes added in v1.88.0

func (DatabaseInstancesData) GetComplexFieldTypes(context.Context) map[string]reflect.Type

type DatabaseInstancesDataSource

type DatabaseInstancesDataSource struct {
	Client *autogen.DatabricksClient
}

func (*DatabaseInstancesDataSource) Configure

func (*DatabaseInstancesDataSource) Metadata

func (*DatabaseInstancesDataSource) Read

func (*DatabaseInstancesDataSource) Schema

type ProviderConfig added in v1.106.0

type ProviderConfig struct {
	WorkspaceID types.String `tfsdk:"workspace_id"`
}

ProviderConfig contains the fields to configure the provider.

func (ProviderConfig) ApplySchemaCustomizations added in v1.106.0

func (r ProviderConfig) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder

ApplySchemaCustomizations applies the schema customizations to the ProviderConfig type.

func (ProviderConfig) GetComplexFieldTypes added in v1.106.0

func (r ProviderConfig) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type

GetComplexFieldTypes returns a map of the types of elements in complex fields in the extended ProviderConfig struct. Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry the type information of their elements in the Go type system. This function provides a way to retrieve the type information of the elements in complex fields at runtime. The values of the map are the reflected types of the contained elements. They must be either primitive values from the plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF SDK values.

func (ProviderConfig) ToObjectValue added in v1.106.0

func (r ProviderConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue

ToObjectValue returns the object value for the resource, combining attributes from the embedded TFSDK model and contains additional fields.

TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise interfere with how the plugin framework retrieves and sets values in state. Thus, ProviderConfig only implements ToObjectValue() and Type().

func (ProviderConfig) Type added in v1.106.0

func (r ProviderConfig) Type(ctx context.Context) attr.Type

Type returns the object type with attributes from both the embedded TFSDK model and contains additional fields.

type ProviderConfigData added in v1.106.0

type ProviderConfigData struct {
	WorkspaceID types.String `tfsdk:"workspace_id"`
}

ProviderConfigData contains the fields to configure the provider.

func (ProviderConfigData) ApplySchemaCustomizations added in v1.106.0

func (r ProviderConfigData) ApplySchemaCustomizations(attrs map[string]tfschema.AttributeBuilder) map[string]tfschema.AttributeBuilder

ApplySchemaCustomizations applies the schema customizations to the ProviderConfig type.

func (ProviderConfigData) GetComplexFieldTypes added in v1.106.0

func (r ProviderConfigData) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type

GetComplexFieldTypes returns a map of the types of elements in complex fields in the extended ProviderConfigData struct. Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry the type information of their elements in the Go type system. This function provides a way to retrieve the type information of the elements in complex fields at runtime. The values of the map are the reflected types of the contained elements. They must be either primitive values from the plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF SDK values.

func (ProviderConfigData) ToObjectValue added in v1.106.0

ToObjectValue returns the object value for the resource, combining attributes from the embedded TFSDK model and contains additional fields.

TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise interfere with how the plugin framework retrieves and sets values in state. Thus, ProviderConfigData only implements ToObjectValue() and Type().

func (ProviderConfigData) Type added in v1.106.0

Type returns the object type with attributes from both the embedded TFSDK model and contains additional fields.

Jump to

Keyboard shortcuts

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