Documentation ¶
Index ¶
- func New(version string) func() provider.Provider
- func NewClusterDataSource() datasource.DataSource
- func NewClusterResource() resource.Resource
- func NewOrganizationDataSource() datasource.DataSource
- func NewOrganizationResource() resource.Resource
- func NewOrganizationsDataSource() datasource.DataSource
- func NewProjectDataSource() datasource.DataSource
- func NewProjectResource() resource.Resource
- type ClusterDataSource
- func (d *ClusterDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ClusterDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ClusterDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ClusterDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ClusterHardwareSpecsModel
- type ClusterHealthModel
- type ClusterIpWhitelistModel
- type ClusterModel
- type ClusterResource
- func (r *ClusterResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ClusterResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ClusterResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ClusterResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ClusterResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ClusterResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ClusterResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ClusterResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type CrateDBProvider
- func (p *CrateDBProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *CrateDBProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *CrateDBProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *CrateDBProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *CrateDBProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type CrateDBProviderModel
- type DCModel
- type OrganizationDataSource
- func (d *OrganizationDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *OrganizationDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *OrganizationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *OrganizationDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type OrganizationModel
- type OrganizationResource
- func (r *OrganizationResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *OrganizationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *OrganizationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *OrganizationResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *OrganizationResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *OrganizationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *OrganizationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type OrganizationsDataSource
- func (d *OrganizationsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *OrganizationsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *OrganizationsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *OrganizationsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type OrganizationsDataSourceModel
- type ProjectDataSource
- func (d *ProjectDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ProjectDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ProjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ProjectDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ProjectModel
- type ProjectResource
- func (r *ProjectResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterDataSource ¶
func NewClusterDataSource() datasource.DataSource
NewClusterDataSource is a helper function to simplify the provider implementation.
func NewClusterResource ¶
NewClusterResource is a helper function to simplify the provider implementation.
func NewOrganizationDataSource ¶
func NewOrganizationDataSource() datasource.DataSource
NewOrganizationDataSource is a helper function to simplify the provider implementation.
func NewOrganizationResource ¶
NewOrganizationResource is a helper function to simplify the provider implementation.
func NewOrganizationsDataSource ¶
func NewOrganizationsDataSource() datasource.DataSource
NewOrganizationsDataSource is a helper function to simplify the provider implementation.
func NewProjectDataSource ¶
func NewProjectDataSource() datasource.DataSource
NewProjectDataSource is a helper function to simplify the provider implementation.
func NewProjectResource ¶
NewProjectResource is a helper function to simplify the provider implementation.
Types ¶
type ClusterDataSource ¶
type ClusterDataSource struct {
// contains filtered or unexported fields
}
ClusterDataSource is the data source implementation.
func (*ClusterDataSource) Configure ¶
func (d *ClusterDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*ClusterDataSource) Metadata ¶
func (d *ClusterDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata returns the data source type name.
func (*ClusterDataSource) Read ¶
func (d *ClusterDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ClusterDataSource) Schema ¶
func (d *ClusterDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source.
type ClusterHardwareSpecsModel ¶
type ClusterHardwareSpecsModel struct { CpusPerNode types.Int32 `tfsdk:"cpus_per_node"` DiskSizePerNodeBytes types.Int64 `tfsdk:"disk_size_per_node_bytes"` DiskType types.String `tfsdk:"disk_type"` DisksPerNode types.Int32 `tfsdk:"disks_per_node"` HeapSizeBytes types.Int64 `tfsdk:"heap_size_bytes"` MemoryPerNodeBytes types.Int64 `tfsdk:"memory_per_node_bytes"` }
ClusterDCModel maps CrateDB cluster HardwareSpecs schema data.
func (ClusterHardwareSpecsModel) GetAttrType ¶
func (c ClusterHardwareSpecsModel) GetAttrType() map[string]attr.Type
type ClusterHealthModel ¶
ClusterHealthModel maps CrateDB cluster Health schema data.
func (ClusterHealthModel) GetAttrType ¶
func (c ClusterHealthModel) GetAttrType() map[string]attr.Type
type ClusterIpWhitelistModel ¶
type ClusterIpWhitelistModel struct { Cidr types.String `tfsdk:"cidr"` Description types.String `tfsdk:"description"` }
ClusterIpWhitelistModel maps CrateDB cluster IpWhitelist schema data.
func (ClusterIpWhitelistModel) GetAttrType ¶
func (c ClusterIpWhitelistModel) GetAttrType() attr.Type
type ClusterModel ¶
type ClusterModel struct { OrganizationId types.String `tfsdk:"organization_id"` AllowCustomStorage types.Bool `tfsdk:"allow_custom_storage"` AllowSuspend types.Bool `tfsdk:"allow_suspend"` BackupSchedule types.String `tfsdk:"backup_schedule"` Channel types.String `tfsdk:"channel"` CrateVersion types.String `tfsdk:"crate_version"` Dc types.Object `tfsdk:"dc"` DeletionProtected types.Bool `tfsdk:"deletion_protected"` ExternalIp types.String `tfsdk:"external_ip"` Fqdn types.String `tfsdk:"fqdn"` GcAvailable types.Bool `tfsdk:"gc_available"` HardwareSpecs types.Object `tfsdk:"hardware_specs"` Health types.Object `tfsdk:"health"` Id types.String `tfsdk:"id"` IpWhitelist []ClusterIpWhitelistModel `tfsdk:"ip_whitelist"` Name types.String `tfsdk:"name"` NumNodes types.Int32 `tfsdk:"num_nodes"` Origin types.String `tfsdk:"origin"` ProductName types.String `tfsdk:"product_name"` ProductTier types.String `tfsdk:"product_tier"` ProductUnit types.Int32 `tfsdk:"product_unit"` ProjectId types.String `tfsdk:"project_id"` SubscriptionId types.String `tfsdk:"subscription_id"` Suspended types.Bool `tfsdk:"suspended"` Url types.String `tfsdk:"url"` Username types.String `tfsdk:"username"` Password types.String `tfsdk:"password"` }
ClusterModel maps CrateDB cluster schema data.
type ClusterResource ¶
type ClusterResource struct {
// contains filtered or unexported fields
}
ClusterResource defines the resource implementation.
func (*ClusterResource) Configure ¶
func (r *ClusterResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the provider configured client to the resource.
func (*ClusterResource) Create ¶
func (r *ClusterResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*ClusterResource) Delete ¶
func (r *ClusterResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*ClusterResource) ImportState ¶
func (r *ClusterResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ClusterResource) Metadata ¶
func (r *ClusterResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the resource type name.
func (*ClusterResource) Read ¶
func (r *ClusterResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ClusterResource) Schema ¶
func (r *ClusterResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the resource.
func (*ClusterResource) Update ¶
func (r *ClusterResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update updates the resource and sets the updated Terraform state on success.
type CrateDBProvider ¶
type CrateDBProvider struct {
// contains filtered or unexported fields
}
CrateDBProvider defines the provider implementation.
func (*CrateDBProvider) Configure ¶
func (p *CrateDBProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
Configure prepares a CrateDB API client for data sources and resources.
func (*CrateDBProvider) DataSources ¶
func (p *CrateDBProvider) DataSources(ctx context.Context) []func() datasource.DataSource
DataSources defines the data sources implemented in the provider.
func (*CrateDBProvider) Metadata ¶
func (p *CrateDBProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
Metadata returns the provider type name.
func (*CrateDBProvider) Resources ¶
func (p *CrateDBProvider) Resources(ctx context.Context) []func() resource.Resource
Resources defines the resources implemented in the provider.
func (*CrateDBProvider) Schema ¶
func (p *CrateDBProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
Schema defines the provider-level schema for configuration data.
type CrateDBProviderModel ¶
type CrateDBProviderModel struct { APIKey types.String `tfsdk:"api_key"` APISecret types.String `tfsdk:"api_secret"` URL types.String `tfsdk:"url"` }
CrateDBProviderModel maps provider schema data to a Go type.
type DCModel ¶
type DCModel struct { Created types.String `tfsdk:"created"` Modified types.String `tfsdk:"modified"` }
DCModel maps CrateDB DC schema data.
type OrganizationDataSource ¶
type OrganizationDataSource struct {
// contains filtered or unexported fields
}
OrganizationDataSource is the data source implementation.
func (*OrganizationDataSource) Configure ¶
func (d *OrganizationDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*OrganizationDataSource) Metadata ¶
func (d *OrganizationDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata returns the data source type name.
func (*OrganizationDataSource) Read ¶
func (d *OrganizationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*OrganizationDataSource) Schema ¶
func (d *OrganizationDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source.
type OrganizationModel ¶
type OrganizationModel struct { Dc types.Object `tfsdk:"dc"` Email types.String `tfsdk:"email"` Id types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` NotificationsEnabled types.Bool `tfsdk:"notifications_enabled"` PlanType types.Int32 `tfsdk:"plan_type"` ProjectCount types.Int32 `tfsdk:"project_count"` RoleFQN types.String `tfsdk:"role_fqn"` }
OrganizationModel maps CrateDB organization schema data.
type OrganizationResource ¶
type OrganizationResource struct {
// contains filtered or unexported fields
}
OrganizationResource defines the resource implementation.
func (*OrganizationResource) Configure ¶
func (r *OrganizationResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the provider configured client to the resource.
func (*OrganizationResource) Create ¶
func (r *OrganizationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*OrganizationResource) Delete ¶
func (r *OrganizationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*OrganizationResource) ImportState ¶
func (r *OrganizationResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*OrganizationResource) Metadata ¶
func (r *OrganizationResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the resource type name.
func (*OrganizationResource) Read ¶
func (r *OrganizationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*OrganizationResource) Schema ¶
func (r *OrganizationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the resource.
func (*OrganizationResource) Update ¶
func (r *OrganizationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update updates the resource and sets the updated Terraform state on success.
type OrganizationsDataSource ¶
type OrganizationsDataSource struct {
// contains filtered or unexported fields
}
OrganizationsDataSource is the data source implementation.
func (*OrganizationsDataSource) Configure ¶
func (d *OrganizationsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*OrganizationsDataSource) Metadata ¶
func (d *OrganizationsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata returns the data source type name.
func (*OrganizationsDataSource) Read ¶
func (d *OrganizationsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*OrganizationsDataSource) Schema ¶
func (d *OrganizationsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source.
type OrganizationsDataSourceModel ¶
type OrganizationsDataSourceModel struct {
Organizations []OrganizationModel `tfsdk:"organizations"`
}
OrganizationsDataSourceModel describes the data source data model.
type ProjectDataSource ¶
type ProjectDataSource struct {
// contains filtered or unexported fields
}
ProjectDataSource is the data source implementation.
func (*ProjectDataSource) Configure ¶
func (d *ProjectDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*ProjectDataSource) Metadata ¶
func (d *ProjectDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata returns the data source type name.
func (*ProjectDataSource) Read ¶
func (d *ProjectDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ProjectDataSource) Schema ¶
func (d *ProjectDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema defines the schema for the data source.
type ProjectModel ¶
type ProjectModel struct { Dc types.Object `tfsdk:"dc"` Id types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` OrganizationId types.String `tfsdk:"organization_id"` Region types.String `tfsdk:"region"` }
ProjectModel maps CrateDB project schema data.
type ProjectResource ¶
type ProjectResource struct {
// contains filtered or unexported fields
}
ProjectResource defines the resource implementation.
func (*ProjectResource) Configure ¶
func (r *ProjectResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the provider configured client to the resource.
func (*ProjectResource) Create ¶
func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*ProjectResource) Delete ¶
func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*ProjectResource) ImportState ¶
func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ProjectResource) Metadata ¶
func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the resource type name.
func (*ProjectResource) Read ¶
func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*ProjectResource) Schema ¶
func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the resource.
func (*ProjectResource) Update ¶
func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update updates the resource and sets the updated Terraform state on success.