provider

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCreateTimeout    = "Error waiting for service creation"
	ErrUpdateService    = "Error updating service"
	ErrInvalidAttribute = "Invalid Attribute Value"

	DefaultMilliCPU = 500
	DefaultMemoryGB = 2

	DefaultEnableHAReplica = false
)

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewProductsDataSource

func NewProductsDataSource() datasource.DataSource

NewProductsDataSource is a helper function to simplify the provider implementation.

func NewServiceDataSource

func NewServiceDataSource() datasource.DataSource

func NewServiceResource

func NewServiceResource() resource.Resource

func NewVpcsDataSource added in v0.2.1

func NewVpcsDataSource() datasource.DataSource

NewVpcsDataSource is a helper function to simplify the provider implementation.

Types

type ResourceModel

type ResourceModel struct {
	ID   types.String      `tfsdk:"id"`
	Spec ResourceSpecModel `tfsdk:"spec"`
}

type ResourceSpecModel

type ResourceSpecModel struct {
	MilliCPU        types.Int64 `tfsdk:"milli_cpu"`
	MemoryGB        types.Int64 `tfsdk:"memory_gb"`
	EnableHAReplica types.Bool  `tfsdk:"enable_ha_replica"`
}

type ServiceDataSource

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

ServiceDataSource defines the data source implementation.

func (*ServiceDataSource) Configure

func (*ServiceDataSource) Metadata

func (*ServiceDataSource) Read

func (*ServiceDataSource) Schema

type ServiceDataSourceModel

type ServiceDataSourceModel struct {
	ID         types.String    `tfsdk:"id"`
	Name       types.String    `tfsdk:"name"`
	RegionCode types.String    `tfsdk:"region_code"`
	Spec       SpecModel       `tfsdk:"spec"`
	Resources  []ResourceModel `tfsdk:"resources"`
	Created    types.String    `tfsdk:"created"`
	VpcId      types.Int64     `tfsdk:"vpc_id"`
}

ServiceDataSourceModel describes the data source data model.

type ServiceResource

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

ServiceResource defines the resource implementation.

func (*ServiceResource) Configure

Configure adds the provider configured client to the service resource.

func (*ServiceResource) Create

func (*ServiceResource) Delete

func (*ServiceResource) ImportState

func (*ServiceResource) Metadata

func (*ServiceResource) Read

func (*ServiceResource) Schema

Schema defines the schema for the service resource.

func (*ServiceResource) Update

type SpecModel

type SpecModel struct {
	Hostname types.String `tfsdk:"hostname"`
	Username types.String `tfsdk:"username"`
	Port     types.Int64  `tfsdk:"port"`
}

type TimescaleProvider

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

TimescaleProvider defines the provider implementation.

func (*TimescaleProvider) ConfigValidators

func (p *TimescaleProvider) ConfigValidators(ctx context.Context) []provider.ConfigValidator

func (*TimescaleProvider) Configure

Configure initializes a Timescale API client for data sources and resources.

func (*TimescaleProvider) DataSources

func (p *TimescaleProvider) DataSources(ctx context.Context) []func() datasource.DataSource

DataSources defines the data sources implemented in the provider.

func (*TimescaleProvider) Metadata

func (*TimescaleProvider) Resources

func (p *TimescaleProvider) Resources(ctx context.Context) []func() resource.Resource

Resources defines the resources implemented in the provider.

func (*TimescaleProvider) Schema

Schema defines the provider-level schema for configuration data.

type TimescaleProviderModel

type TimescaleProviderModel struct {
	ProjectID   types.String `tfsdk:"project_id"`
	AccessToken types.String `tfsdk:"access_token"`
	AccessKey   types.String `tfsdk:"access_key"`
	SecretKey   types.String `tfsdk:"secret_key"`
}

TimescaleProviderModel describes the provider data model.

Jump to

Keyboard shortcuts

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