provider

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 32 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
)

Variables

View Source
var (
	ErrPeeringConnRead   = "Error reading Peering Connection"
	ErrPeeringConnCreate = "Error creating Peering Connection"
)

Ensure the implementation satisfies the expected interfaces.

View Source
var (
	PeeringConnectionsType = types.ObjectType{
		AttrTypes: PeeringConnectionType,
	}

	PeeringConnectionType = map[string]attr.Type{
		"id":               types.Int64Type,
		"vpc_id":           types.StringType,
		"provisioned_id":   types.StringType,
		"status":           types.StringType,
		"error_message":    types.StringType,
		"peer_vpc_id":      types.StringType,
		"peer_cidr":        types.StringType,
		"peer_account_id":  types.StringType,
		"peer_region_code": types.StringType,
		"timescale_vpc_id": types.Int64Type,
	}
)
View Source
var (
	ErrVPCRead   = "Error reading VPC"
	ErrVPCCreate = "Error creating VPC"
	ErrVPCUpdate = "Error updating VPC"
)

Ensure the implementation satisfies the expected interfaces.

View Source
var (
	PeeringConnectionsDSType = types.ObjectType{
		AttrTypes: map[string]attr.Type{
			"vpc_id":           types.StringType,
			"provisioned_id":   types.StringType,
			"status":           types.StringType,
			"error_message":    types.StringType,
			"peer_vpc_id":      types.StringType,
			"peer_cidr":        types.StringType,
			"peer_account_id":  types.StringType,
			"peer_region_code": types.StringType,
		},
	}
)

Functions

func New

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

func NewPeeringConnectionResource added in v1.6.0

func NewPeeringConnectionResource() resource.Resource

NewPeeringConnectionResource is a helper function to simplify the provider implementation.

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.

func NewVpcsResource added in v1.3.0

func NewVpcsResource() resource.Resource

NewVpcsResource 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"`
	PoolerHostname types.String `tfsdk:"pooler_hostname"`
	PoolerPort     types.Int64  `tfsdk:"pooler_port"`
}

type TimescaleProvider

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

TimescaleProvider defines the provider implementation.

func (*TimescaleProvider) ConfigValidators

func (p *TimescaleProvider) ConfigValidators(_ 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