resources

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareURLs

func CompareURLs(url1, url2 string) bool

func CronExpressionValidator

func CronExpressionValidator() validator.String

func IsJobStatusRunning

func IsJobStatusRunning(status string) bool

func NewBackupScheduleResource

func NewBackupScheduleResource() resource.Resource

func NewChangefeedResource

func NewChangefeedResource() resource.Resource

func NewClusterSettingResource

func NewClusterSettingResource() resource.Resource

func NewExternalConnectionResource

func NewExternalConnectionResource() resource.Resource

func NewMigrationResource

func NewMigrationResource() resource.Resource

func NewPersistentCursorResource

func NewPersistentCursorResource() resource.Resource

func NewRoleGrantResource

func NewRoleGrantResource() resource.Resource

func NewSqlRoleResource

func NewSqlRoleResource() resource.Resource

func NewSqlUserResource

func NewSqlUserResource() resource.Resource

func ParseCursorId

func ParseCursorId(cursorId string) (clusterId, key string)

func SanatizeValue

func SanatizeValue(value string) string

func UpdateCursorJobId

func UpdateCursorJobId(ctx context.Context, client *ccloud.CcloudClient, clusterId string, key string, jobId *int64) error

Types

type BackupScheduleResource

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

func (*BackupScheduleResource) Configure

func (*BackupScheduleResource) Create

func (*BackupScheduleResource) Delete

func (*BackupScheduleResource) Metadata

func (*BackupScheduleResource) Read

func (*BackupScheduleResource) Schema

func (*BackupScheduleResource) Update

type BackupScheduleResourceModel

type BackupScheduleResourceModel struct {
	ClusterId types.String `tfsdk:"cluster_id"`
	Label     types.String `tfsdk:"label"`
	Id        types.String `tfsdk:"id"`
	Location  types.String `tfsdk:"location"`
	Recurring types.String `tfsdk:"recurring"`
	//ExecutionLocality     types.Map    `tfsdk:"execution_locality"`
	Target *struct {
		Tables            types.List `tfsdk:"tables"`
		Databases         types.List `tfsdk:"databases"`
		FullClusterBackup types.Bool `tfsdk:"full_cluster_backup"`
	} `tfsdk:"target"`
	ScheduleOptions *struct {
		FirstRun              types.String `tfsdk:"first_run"`
		OnExecutionFailure    types.String `tfsdk:"on_execution_failure"`
		OnPreviousRunning     types.String `tfsdk:"on_previous_running"`
		IgnoreExistingBackups types.Bool   `tfsdk:"ignore_existing_backups"`
	} `tfsdk:"schedule_options"`
	FullBackupScheduleId        types.Int64 `tfsdk:"full_backup_schedule_id"`
	IncrementalBackupScheduleId types.Int64 `tfsdk:"incremental_backup_schedule_id"`
	BackupOptions               *struct {
		Kms                       types.String `tfsdk:"kms"`
		EncryptionPassphrase      types.String `tfsdk:"encryption_passphrase"`
		RevisionHistory           types.Bool   `tfsdk:"revision_history"`
		FullBackupFrequency       types.String `tfsdk:"full_backup_frequency"`
		IncrementalBackupLocation types.String `tfsdk:"incremental_backup_location"`
	} `tfsdk:"backup_options"`
}

type ChangefeedResource

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

func (*ChangefeedResource) ConfigValidators added in v0.0.26

func (r *ChangefeedResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator

func (*ChangefeedResource) Configure

func (*ChangefeedResource) Create

func (*ChangefeedResource) Delete

func (*ChangefeedResource) Metadata

func (*ChangefeedResource) Read

func (*ChangefeedResource) Schema

func (*ChangefeedResource) Update

type ChangefeedResourceModel

type ChangefeedResourceModel struct {
	ClusterId           types.String `tfsdk:"cluster_id"`
	Id                  types.String `tfsdk:"id"`
	JobId               types.Int64  `tfsdk:"job_id"`
	Target              types.List   `tfsdk:"target"`
	Select              types.String `tfsdk:"select"`
	SinkUri             types.String `tfsdk:"sink_uri"`
	InitialScanOnUpdate types.Bool   `tfsdk:"initial_scan_on_update"`
	Status              types.String `tfsdk:"status"`
	PersistentCursor    types.String `tfsdk:"persistent_cursor"`
	Options             struct {
		AvroSchemaPrefix             types.String `tfsdk:"avro_schema_prefix"`
		Compression                  types.String `tfsdk:"compression"`
		ConfluentSchemaRegistry      types.String `tfsdk:"confluent_schema_registry"`
		Cursor                       types.String `tfsdk:"cursor"`
		Diff                         types.Bool   `tfsdk:"diff"`
		EndTime                      types.String `tfsdk:"end_time"`
		Envelope                     types.String `tfsdk:"envelope"`
		ExecutionLocality            types.String `tfsdk:"execution_locality"`
		Format                       types.String `tfsdk:"format"`
		FullTableName                types.Bool   `tfsdk:"full_table_name"`
		GcProtectExpiresAfter        types.String `tfsdk:"gc_protect_expires_after"`
		InitialScan                  types.String `tfsdk:"initial_scan"`
		KafkaSinkConfig              types.String `tfsdk:"kafka_sink_config"`
		KeyColumn                    types.String `tfsdk:"key_column"`
		KeyInValue                   types.Bool   `tfsdk:"key_in_value"`
		LaggingRangesThreshold       types.String `tfsdk:"lagging_ranges_threshold"`
		LaggingRangesPollingInterval types.String `tfsdk:"lagging_ranges_polling_interval"`
		MetricsLabel                 types.String `tfsdk:"metrics_label"`
		MinCheckpointFrequency       types.String `tfsdk:"min_checkpoint_frequency"`
		MvccTimestamp                types.Bool   `tfsdk:"mvcc_timestamp"`
		OnError                      types.String `tfsdk:"on_error"`
		ProtectDataFromGcOnPause     types.Bool   `tfsdk:"protect_data_from_gc_on_pause"`
		Resolved                     types.String `tfsdk:"resolved"`
		SchemaChangeEvents           types.String `tfsdk:"schema_change_events"`
		SchemaChangePolicy           types.String `tfsdk:"schema_change_policy"`
		SplitColumnFamilies          types.Bool   `tfsdk:"split_column_families"`
		TopicInValue                 types.Bool   `tfsdk:"topic_in_value"`
		Unordered                    types.Bool   `tfsdk:"unordered"`
		Updated                      types.Bool   `tfsdk:"updated"`
		VirtualColumns               types.String `tfsdk:"virtual_columns"`
		WebhookAuthHeader            types.String `tfsdk:"webhook_auth_header"`
		WebhookSinkConfig            types.String `tfsdk:"webhook_sink_config"`
	} `tfsdk:"options"`
}

type ClusterSettingResource

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

func (*ClusterSettingResource) Configure

func (*ClusterSettingResource) Create

func (*ClusterSettingResource) Delete

func (*ClusterSettingResource) ImportState

func (*ClusterSettingResource) Metadata

func (*ClusterSettingResource) Read

func (*ClusterSettingResource) Schema

func (*ClusterSettingResource) Update

type ClusterSettingResourceModel

type ClusterSettingResourceModel struct {
	ClusterId    types.String `tfsdk:"cluster_id"`
	SettingName  types.String `tfsdk:"setting_name"`
	SettingValue types.String `tfsdk:"setting_value"`
	Id           types.String `tfsdk:"id"`
}

type CursorValue

type CursorValue struct {
	Cursor        *string
	OffsetCursor  *string
	Offset        *int64
	Exists        bool
	LastJobId     *int64
	LastJobStatus *string
	InUse         bool
}

func GetCursor

func GetCursor(ctx context.Context, client *ccloud.CcloudClient, clusterId string, key string) (*CursorValue, error)

type ExternalConnectionResource

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

func (*ExternalConnectionResource) Configure

func (*ExternalConnectionResource) Create

func (*ExternalConnectionResource) Delete

func (*ExternalConnectionResource) ImportState

func (*ExternalConnectionResource) Metadata

func (*ExternalConnectionResource) Read

func (*ExternalConnectionResource) Schema

func (*ExternalConnectionResource) Update

type ExternalConnectionResourceModel

type ExternalConnectionResourceModel struct {
	ClusterId                types.String `tfsdk:"cluster_id"`
	ConnectionName           types.String `tfsdk:"name"`
	ConnectionUri            types.String `tfsdk:"uri"`
	ExternalConnectionRefUri types.String `tfsdk:"ref_uri"`
	Id                       types.String `tfsdk:"id"`
}

type MigrationLogger

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

func (MigrationLogger) Printf

func (l MigrationLogger) Printf(format string, v ...interface{})

func (MigrationLogger) Verbose

func (l MigrationLogger) Verbose() bool

type MigrationResource

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

func (*MigrationResource) Configure

func (*MigrationResource) Create

func (*MigrationResource) Delete

func (*MigrationResource) Metadata

func (*MigrationResource) Read

func (*MigrationResource) Schema

func (*MigrationResource) Update

type MigrationResourceModel

type MigrationResourceModel struct {
	ClusterId     types.String `tfsdk:"cluster_id"`
	Database      types.String `tfsdk:"database"`
	MigrationsUrl types.String `tfsdk:"migrations_url"`
	DestroyMode   types.String `tfsdk:"destroy_mode"`
	Version       types.Int64  `tfsdk:"version"`
	Id            types.String `tfsdk:"id"`
}

type PersistentCursorResource

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

func (*PersistentCursorResource) Configure

func (*PersistentCursorResource) Create

func (*PersistentCursorResource) Delete

func (*PersistentCursorResource) Metadata

func (*PersistentCursorResource) Read

func (*PersistentCursorResource) Schema

func (*PersistentCursorResource) Update

type PersistentCursorResourceModel

type PersistentCursorResourceModel struct {
	ClusterId     types.String `tfsdk:"cluster_id"`
	Key           types.String `tfsdk:"key"`
	ResumeOffset  types.Int64  `tfsdk:"resume_offset"`
	Id            types.String `tfsdk:"id"`
	LastUsedJobId types.Int64  `tfsdk:"last_used_job_id"`
	HighWaterMark types.String `tfsdk:"value"`
	Ref           types.String `tfsdk:"ref"`
}

type RoleGrantResource

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

func (*RoleGrantResource) Configure

func (*RoleGrantResource) Create

func (*RoleGrantResource) Delete

func (*RoleGrantResource) Metadata

func (*RoleGrantResource) Read

func (*RoleGrantResource) Schema

func (*RoleGrantResource) Update

Update Role grants should never be updated in place, as they are immutable. Throw an error if the user tries to do so.

type RoleGrantResourceModel

type RoleGrantResourceModel struct {
	ClusterId types.String `tfsdk:"cluster_id"`
	Username  types.String `tfsdk:"user_name"`
	Role      types.String `tfsdk:"role_name"`
	Id        types.String `tfsdk:"id"`
}

type SqlRoleResource

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

func (*SqlRoleResource) Configure

func (*SqlRoleResource) Create

func (*SqlRoleResource) Delete

func (*SqlRoleResource) Metadata

func (*SqlRoleResource) Read

func (*SqlRoleResource) Schema

func (*SqlRoleResource) Update

type SqlRoleResourceModel

type SqlRoleResourceModel struct {
	ClusterId types.String `tfsdk:"cluster_id"`
	RoleName  types.String `tfsdk:"name"`
	Id        types.String `tfsdk:"id"`
}

type SqlUserResource

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

func (*SqlUserResource) Configure

func (*SqlUserResource) Create

func (*SqlUserResource) Delete

func (*SqlUserResource) Metadata

func (*SqlUserResource) Read

func (*SqlUserResource) Schema

func (*SqlUserResource) Update

type SqlUserResourceModel

type SqlUserResourceModel struct {
	ClusterId types.String `tfsdk:"cluster_id"`
	Username  types.String `tfsdk:"name"`
	Password  types.String `tfsdk:"password"`
	Id        types.String `tfsdk:"id"`
}

Jump to

Keyboard shortcuts

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