Documentation
¶
Index ¶
- Constants
- Variables
- func New(version string) func() provider.Provider
- func NewPeeringConnectionResource() resource.Resource
- func NewProductsDataSource() datasource.DataSource
- func NewServiceDataSource() datasource.DataSource
- func NewServiceResource() resource.Resource
- func NewVpcsDataSource() datasource.DataSource
- func NewVpcsResource() resource.Resource
- type ResourceModel
- type ResourceSpecModel
- type ServiceDataSource
- func (d *ServiceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ServiceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *ServiceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ServiceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type ServiceDataSourceModel
- type ServiceResource
- func (r *ServiceResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ServiceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ServiceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ServiceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ServiceResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ServiceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ServiceResource) Schema(ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ServiceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type SpecModel
- type TimescaleProvider
- func (p *TimescaleProvider) ConfigValidators(_ context.Context) []provider.ConfigValidator
- func (p *TimescaleProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *TimescaleProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *TimescaleProvider) Metadata(ctx context.Context, _ provider.MetadataRequest, ...)
- func (p *TimescaleProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *TimescaleProvider) Schema(ctx context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse)
- type TimescaleProviderModel
Constants ¶
const ( ErrCreateTimeout = "Error waiting for service creation" ErrUpdateService = "Error updating service" ErrInvalidAttribute = "Invalid Attribute Value" DefaultMilliCPU = 500 DefaultMemoryGB = 2 )
Variables ¶
var ( ErrPeeringConnRead = "Error reading Peering Connection" ErrPeeringConnCreate = "Error creating Peering Connection" )
Ensure the implementation satisfies the expected interfaces.
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, } )
var ( ErrVPCRead = "Error reading VPC" ErrVPCCreate = "Error creating VPC" ErrVPCUpdate = "Error updating VPC" )
Ensure the implementation satisfies the expected interfaces.
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 NewPeeringConnectionResource ¶ added in v1.6.0
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 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
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 ServiceDataSource ¶
type ServiceDataSource struct {
// contains filtered or unexported fields
}
ServiceDataSource defines the data source implementation.
func (*ServiceDataSource) Configure ¶
func (d *ServiceDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*ServiceDataSource) Metadata ¶
func (d *ServiceDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ServiceDataSource) Read ¶
func (d *ServiceDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ServiceDataSource) Schema ¶
func (d *ServiceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
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"` EnvironmentTag types.String `tfsdk:"environment_tag"` }
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 ¶
func (r *ServiceResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the provider configured client to the service resource.
func (*ServiceResource) Create ¶
func (r *ServiceResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ServiceResource) Delete ¶
func (r *ServiceResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ServiceResource) ImportState ¶
func (r *ServiceResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ServiceResource) Metadata ¶
func (r *ServiceResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ServiceResource) Read ¶
func (r *ServiceResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ServiceResource) Schema ¶
func (r *ServiceResource) Schema(ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the service resource.
func (*ServiceResource) Update ¶
func (r *ServiceResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type SpecModel ¶
type SpecModel struct { Username types.String `tfsdk:"username"` Hostname types.String `tfsdk:"hostname"` Port types.Int64 `tfsdk:"port"` ReplicaHostname types.String `tfsdk:"replica_hostname"` ReplicaPort types.Int64 `tfsdk:"replica_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 ¶
func (p *TimescaleProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
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 (p *TimescaleProvider) Metadata(ctx context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
func (*TimescaleProvider) Resources ¶
func (p *TimescaleProvider) Resources(ctx context.Context) []func() resource.Resource
Resources defines the resources implemented in the provider.
func (*TimescaleProvider) Schema ¶
func (p *TimescaleProvider) Schema(ctx context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse)
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.