provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New is a helper function to simplify provider server and testing implementation.

func NewClusterDataSource

func NewClusterDataSource() datasource.DataSource

NewClusterDataSource is a helper function to simplify the provider implementation.

func NewClusterResource

func NewClusterResource() resource.Resource

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

func NewOrganizationResource() resource.Resource

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

func NewProjectResource() resource.Resource

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

Configure adds the provider configured client to the data source.

func (*ClusterDataSource) Metadata

Metadata returns the data source type name.

func (*ClusterDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*ClusterDataSource) Schema

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

type ClusterHealthModel struct {
	Status types.String `tfsdk:"status"`
}

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

Configure adds the provider configured client to the resource.

func (*ClusterResource) Create

Create creates the resource and sets the initial Terraform state.

func (*ClusterResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*ClusterResource) ImportState

func (*ClusterResource) Metadata

Metadata returns the resource type name.

func (*ClusterResource) Read

Read refreshes the Terraform state with the latest data.

func (*ClusterResource) Schema

Schema defines the schema for the resource.

func (*ClusterResource) Update

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

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

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

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.

func (DCModel) GetAttrType

func (o DCModel) GetAttrType() map[string]attr.Type

type OrganizationDataSource

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

OrganizationDataSource is the data source implementation.

func (*OrganizationDataSource) Configure

Configure adds the provider configured client to the data source.

func (*OrganizationDataSource) Metadata

Metadata returns the data source type name.

func (*OrganizationDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*OrganizationDataSource) Schema

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

Configure adds the provider configured client to the resource.

func (*OrganizationResource) Create

Create creates the resource and sets the initial Terraform state.

func (*OrganizationResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*OrganizationResource) ImportState

func (*OrganizationResource) Metadata

Metadata returns the resource type name.

func (*OrganizationResource) Read

Read refreshes the Terraform state with the latest data.

func (*OrganizationResource) Schema

Schema defines the schema for the resource.

func (*OrganizationResource) Update

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

Configure adds the provider configured client to the data source.

func (*OrganizationsDataSource) Metadata

Metadata returns the data source type name.

func (*OrganizationsDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*OrganizationsDataSource) Schema

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

Configure adds the provider configured client to the data source.

func (*ProjectDataSource) Metadata

Metadata returns the data source type name.

func (*ProjectDataSource) Read

Read refreshes the Terraform state with the latest data.

func (*ProjectDataSource) Schema

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

Configure adds the provider configured client to the resource.

func (*ProjectResource) Create

Create creates the resource and sets the initial Terraform state.

func (*ProjectResource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*ProjectResource) ImportState

func (*ProjectResource) Metadata

Metadata returns the resource type name.

func (*ProjectResource) Read

Read refreshes the Terraform state with the latest data.

func (*ProjectResource) Schema

Schema defines the schema for the resource.

func (*ProjectResource) Update

Update updates the resource and sets the updated Terraform state on success.

Jump to

Keyboard shortcuts

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