database

package
v0.69.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const DataSourceURIDescription = `` /* 315-byte string literal not displayed */
View Source
const SERVICE_READY_DELAY = time.Second * 10

Some services need a few seconds after becoming ready for API to stabilize so we enforce a sleep. Any additional delays are to be added in this file after this one

Variables

View Source
var ResourceGrafanaSchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*grafana* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "A list of CIDR blocks to allow incoming connections from.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"grafana_settings": schema.StringAttribute{
			MarkdownDescription: "Grafana configuration settings in JSON format (`exo dbaas type show grafana --settings=grafana` for reference).",
			Optional:            true,
			Computed:            true,
		},
	},
}
View Source
var ResourceKafkaSchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*kafka* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"enable_cert_auth": schema.BoolAttribute{
			MarkdownDescription: "Enable certificate-based authentication method.",
			Optional:            true,
			Computed:            true,
		},
		"enable_kafka_connect": schema.BoolAttribute{
			MarkdownDescription: "Enable Kafka Connect.",
			Optional:            true,
			Computed:            true,
		},
		"enable_kafka_rest": schema.BoolAttribute{
			MarkdownDescription: "Enable Kafka REST.",
			Optional:            true,
			Computed:            true,
		},
		"enable_sasl_auth": schema.BoolAttribute{
			MarkdownDescription: "Enable SASL-based authentication method.",
			Optional:            true,
			Computed:            true,
		},
		"enable_schema_registry": schema.BoolAttribute{
			MarkdownDescription: "Enable Schema Registry.",
			Optional:            true,
			Computed:            true,
		},
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "A list of CIDR blocks to allow incoming connections from.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"kafka_settings": schema.StringAttribute{
			MarkdownDescription: "Kafka configuration settings in JSON format (`exo dbaas type show kafka --settings=kafka` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"kafka_connect_settings": schema.StringAttribute{
			MarkdownDescription: "Kafka Connect configuration settings in JSON format (`exo dbaas type show kafka --settings=kafka-connect` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"kafka_rest_settings": schema.StringAttribute{
			MarkdownDescription: "Kafka REST configuration settings in JSON format (`exo dbaas type show kafka --settings=kafka-rest` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"schema_registry_settings": schema.StringAttribute{
			MarkdownDescription: "Schema Registry configuration settings in JSON format (`exo dbaas type show kafka --settings=schema-registry` for reference)",
			Optional:            true,
			Computed:            true,
		},
		"version": schema.StringAttribute{
			MarkdownDescription: "Kafka major version (`exo dbaas type show kafka` for reference; may only be set at creation time).",
			Optional:            true,
			Computed:            true,
		},
	},
}
View Source
var ResourceMysqlSchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*mysql* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"admin_password": schema.StringAttribute{
			MarkdownDescription: "A custom administrator account password (may only be set at creation time).",
			Optional:            true,
			Sensitive:           true,
		},
		"admin_username": schema.StringAttribute{
			MarkdownDescription: "A custom administrator account username (may only be set at creation time).",
			Optional:            true,
		},
		"backup_schedule": schema.StringAttribute{
			MarkdownDescription: "The automated backup schedule (`HH:MM`).",
			Optional:            true,
			Computed:            true,
		},
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "A list of CIDR blocks to allow incoming connections from.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"mysql_settings": schema.StringAttribute{
			MarkdownDescription: "MySQL configuration settings in JSON format (`exo dbaas type show mysql --settings=mysql` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"version": schema.StringAttribute{
			MarkdownDescription: "MySQL major version (`exo dbaas type show mysql` for reference; may only be set at creation time).",
			Optional:            true,
			Computed:            true,
			Validators: []validator.String{
				validators.IsMajorVersionValidator,
			},
		},
	},
}
View Source
var ResourceOpensearchSchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*opensearch* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"fork_from_service": schema.StringAttribute{
			MarkdownDescription: "❗ Service name",
			Optional:            true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.RequiresReplace(),
			},
		},
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "Allow incoming connections from this list of CIDR address block, e.g. `[\"10.20.0.0/16\"]",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"keep_index_refresh_interval": schema.BoolAttribute{
			MarkdownDescription: "Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.",
			Optional:            true,
		},
		"max_index_count": schema.Int64Attribute{
			MarkdownDescription: "Maximum number of indexes to keep (Minimum value is `0`)",
			Optional:            true,
			DeprecationMessage:  "This attribute is deprecated and is ignored",
		},
		"settings": schema.StringAttribute{
			MarkdownDescription: "OpenSearch-specific settings, in json. e.g.`jsonencode({thread_pool_search_size: 64})`. Use `exo x get-dbaas-settings-opensearch` to get a list of available settings.",
			Optional:            true,
			Computed:            true,
		},
		"recovery_backup_name": schema.StringAttribute{
			MarkdownDescription: "❗ Name of a backup to recover from",
			Optional:            true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.RequiresReplace(),
			},
		},
		"version": schema.StringAttribute{
			MarkdownDescription: "❗ OpenSearch major version (`exo dbaas type show opensearch` for reference)",
			Optional:            true,
			Computed:            true,
			Validators: []validator.String{
				validators.IsMajorVersionValidator,
			},
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.RequiresReplaceIfConfigured(),
			},
		},
		"index_pattern": schema.ListNestedAttribute{
			MarkdownDescription: "(can be used multiple times) Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like 'logs.?' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note 'logs.?' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.",
			Optional:            true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"max_index_count": schema.Int64Attribute{
						MarkdownDescription: "Maximum number of indexes to keep before deleting the oldest one (Minimum value is `0`)",
						Optional:            true,
					},
					"pattern": schema.StringAttribute{
						MarkdownDescription: "fnmatch pattern",
						Optional:            true,
					},
					"sorting_algorithm": schema.StringAttribute{
						MarkdownDescription: "`alphabetical` or `creation_date`.",
						Optional:            true,
					},
				},
			},
		},
		"index_template": schema.SingleNestedAttribute{
			MarkdownDescription: "Template settings for all new indexes",
			Optional:            true,
			Attributes: map[string]schema.Attribute{
				"mapping_nested_objects_limit": schema.Int64Attribute{
					MarkdownDescription: "The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. (Default is 10000. Minimum value is `0`, maximum value is `100000`.)",
					Optional:            true,
				},
				"number_of_replicas": schema.Int64Attribute{
					MarkdownDescription: "The number of replicas each primary shard has. (Minimum value is `0`, maximum value is `29`)",
					Optional:            true,
				},
				"number_of_shards": schema.Int64Attribute{
					MarkdownDescription: "The number of primary shards that an index should have. (Minimum value is `1`, maximum value is `1024`.)",
					Optional:            true,
				},
			},
		},
		"dashboards": schema.SingleNestedAttribute{
			MarkdownDescription: "OpenSearch Dashboards settings",
			Optional:            true,
			Attributes: map[string]schema.Attribute{
				"enabled": schema.BoolAttribute{
					MarkdownDescription: "Enable or disable OpenSearch Dashboards (default: true).",
					Optional:            true,
				},
				"max_old_space_size": schema.Int64Attribute{
					MarkdownDescription: "Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128).",
					Optional:            true,
				},
				"request_timeout": schema.Int64Attribute{
					MarkdownDescription: "Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)",
					Optional:            true,
				},
			},
		},
	},
}
View Source
var ResourcePgSchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*pg* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"admin_password": schema.StringAttribute{
			MarkdownDescription: "A custom administrator account password (may only be set at creation time).",
			Optional:            true,
			Sensitive:           true,
		},
		"admin_username": schema.StringAttribute{
			MarkdownDescription: "A custom administrator account username (may only be set at creation time).",
			Optional:            true,
		},
		"backup_schedule": schema.StringAttribute{
			MarkdownDescription: "The automated backup schedule (`HH:MM`).",
			Optional:            true,
			Computed:            true,
		},
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "A list of CIDR blocks to allow incoming connections from.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"pg_settings": schema.StringAttribute{
			MarkdownDescription: "PostgreSQL configuration settings in JSON format (`exo dbaas type show pg --settings=pg` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"version": schema.StringAttribute{
			MarkdownDescription: "PostgreSQL major version (`exo dbaas type show pg` for reference; may only be set at creation time).",
			Optional:            true,
			Computed:            true,
			Validators: []validator.String{
				validators.IsMajorVersionValidator,
			},
		},
		"pgbouncer_settings": schema.StringAttribute{
			MarkdownDescription: "PgBouncer configuration settings in JSON format (`exo dbaas type show pg --settings=pgbouncer` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"pglookout_settings": schema.StringAttribute{
			MarkdownDescription: "pglookout configuration settings in JSON format (`exo dbaas type show pg --settings=pglookout` for reference).",
			Optional:            true,
			Computed:            true,
		},
		"shared_buffers_percentage": schema.Int64Attribute{
			MarkdownDescription: "Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60, which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Int64{
				int64validator.Between(20, 60),
			},
			PlanModifiers: []planmodifier.Int64{
				int64planmodifier.UseStateForUnknown(),
			},
		},
		"timescaledb_settings": schema.StringAttribute{
			MarkdownDescription: "TimescaleDB extension configuration settings in JSON format (`exo dbaas type show pg --settings=timescaledb` for reference).",
			Optional:            true,
			Computed:            true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.UseStateForUnknown(),
			},
		},
		"variant": schema.StringAttribute{
			MarkdownDescription: "PostgreSQL variant (`timescale` or `aiven`). May only be set at creation time.",
			Optional:            true,
			Validators: []validator.String{
				stringvalidator.OneOf("timescale", "aiven"),
			},
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.RequiresReplace(),
			},
		},
		"recovery_backup_time": schema.StringAttribute{
			MarkdownDescription: "ISO time of a backup to recover from. May only be set at creation time.",
			Optional:            true,
			PlanModifiers: []planmodifier.String{
				stringplanmodifier.RequiresReplace(),
			},
		},
		"work_mem": schema.Int64Attribute{
			MarkdownDescription: "Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).",
			Optional:            true,
			Computed:            true,
			PlanModifiers: []planmodifier.Int64{
				int64planmodifier.UseStateForUnknown(),
			},
		},
	},
}
View Source
var ResourceValkeySchema = schema.SingleNestedAttribute{
	Optional:            true,
	MarkdownDescription: "*valkey* database service type specific arguments. Structure is documented below.",
	Attributes: map[string]schema.Attribute{
		"ip_filter": schema.SetAttribute{
			ElementType:         types.StringType,
			MarkdownDescription: "A list of CIDR blocks to allow incoming connections from.",
			Optional:            true,
			Computed:            true,
			Validators: []validator.Set{
				setvalidator.ValueStringsAre(validators.IsCIDRNetworkValidator{Min: 0, Max: 128}),
			},
		},
		"valkey_settings": schema.StringAttribute{
			MarkdownDescription: "Valkey configuration settings in JSON format (`exo dbaas type show valkey --settings=valkey` for reference).",
			Optional:            true,
			Computed:            true,
		},
	},
}
View Source
var (
	ServicesList = []string{
		"kafka",
		"mysql",
		"pg",
		"valkey",
		"opensearch",
		"grafana",
	}
)

Functions

func CreateResource added in v0.64.1

func CreateResource[T ResourceModelInterface](ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, data T, client *exoscale.Client)

func DeleteResource added in v0.64.1

func DeleteResource[T ResourceModelInterface](ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, data T, client *exoscale.Client)

func DeprecatedNewResource added in v0.64.1

func DeprecatedNewResource() resource.Resource

func NewDataSourceURI

func NewDataSourceURI() datasource.DataSource

NewDataSourceURI creates instance of DataSourceURI.

func NewExternalEndpointDatadogResource added in v0.69.3

func NewExternalEndpointDatadogResource() resource.Resource

func NewExternalEndpointElasticsearchResource added in v0.69.3

func NewExternalEndpointElasticsearchResource() resource.Resource

func NewExternalEndpointOpensearchResource added in v0.69.3

func NewExternalEndpointOpensearchResource() resource.Resource

func NewExternalEndpointPrometheusResource added in v0.69.3

func NewExternalEndpointPrometheusResource() resource.Resource

func NewExternalEndpointRsyslogResource added in v0.69.3

func NewExternalEndpointRsyslogResource() resource.Resource

func NewExternalIntegrationResource added in v0.69.3

func NewExternalIntegrationResource() resource.Resource

func NewKafkaUserResource added in v0.63.0

func NewKafkaUserResource() resource.Resource

func NewMysqlDatabaseResource added in v0.64.1

func NewMysqlDatabaseResource() resource.Resource

func NewMysqlUserResource added in v0.63.0

func NewMysqlUserResource() resource.Resource

func NewOpensearchUserResource added in v0.63.0

func NewOpensearchUserResource() resource.Resource

func NewPGConnectionPoolResource added in v0.69.0

func NewPGConnectionPoolResource() resource.Resource

func NewPGDatabaseResource added in v0.64.1

func NewPGDatabaseResource() resource.Resource

func NewPGUserResource added in v0.63.0

func NewPGUserResource() resource.Resource

func NewServiceResource added in v0.64.1

func NewServiceResource() resource.Resource

func NewValkeyUserResource added in v0.69.3

func NewValkeyUserResource() resource.Resource

func PartialSettingsPatch added in v0.58.0

func PartialSettingsPatch(data, patch map[string]any)

PartialSettingsPatch updates all keys in `data` that exist in `patch`. If key from `data` is not present in `patch` then removes the key from `data`.

func ReadResource added in v0.64.1

func ReadResource[T ResourceModelInterface](ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, data T, client *exoscale.Client)

func ReadResourceForImport added in v0.64.1

func ReadResourceForImport[T ResourceModelInterface](ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, data T, client *exoscale.Client)

func UpdateResource added in v0.64.1

func UpdateResource[T ResourceModelInterface](ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, stateData, planData T, client *exoscale.Client)

Types

type DBResource added in v0.64.1

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

type DBResourceModel added in v0.64.1

type DBResourceModel struct {
	Id           types.String `tfsdk:"id"`
	Service      types.String `tfsdk:"service"`
	DatabaseName types.String `tfsdk:"database_name"`
	Zone         types.String `tfsdk:"zone"`

	Timeouts timeouts.Value `tfsdk:"timeouts"`
}

type DataSourceURI

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

DataSourceURI defines the resource implementation.

func (*DataSourceURI) Configure

Configure sets up data source dependencies.

func (*DataSourceURI) Metadata

Metadata specifies resource name.

func (*DataSourceURI) Read

Read defines how the data source updates Terraform's state to reflect the retrieved data.

func (*DataSourceURI) Schema

Schema defines resource attributes.

type DataSourceURIModel

type DataSourceURIModel struct {
	Id types.String `tfsdk:"id"`

	Name types.String `tfsdk:"name"`
	Type types.String `tfsdk:"type"`

	URI types.String `tfsdk:"uri"`

	// URI components for convenience
	Schema   types.String `tfsdk:"schema"`
	Host     types.String `tfsdk:"host"`
	Port     types.Int64  `tfsdk:"port"`
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
	DbName   types.String `tfsdk:"db_name"`

	Zone types.String `tfsdk:"zone"`

	Timeouts timeouts.Value `tfsdk:"timeouts"`
}

DataSourceURIModel defines the data model.

type DeprecatedServiceResource added in v0.64.1

type DeprecatedServiceResource struct {
	Resource *ServiceResource
}

We're renaming `exoscale_dbaas` to `exoscale_dbaas“

func (*DeprecatedServiceResource) Configure added in v0.64.1

func (*DeprecatedServiceResource) Create added in v0.64.1

func (*DeprecatedServiceResource) Delete added in v0.64.1

func (*DeprecatedServiceResource) ImportState added in v0.64.1

func (*DeprecatedServiceResource) Metadata added in v0.64.1

func (*DeprecatedServiceResource) Read added in v0.64.1

func (*DeprecatedServiceResource) Schema added in v0.64.1

func (*DeprecatedServiceResource) Update added in v0.64.1

func (*DeprecatedServiceResource) UpgradeState added in v0.64.1

func (*DeprecatedServiceResource) ValidateConfig added in v0.64.1

type ExternalEndpointDatadogResource added in v0.69.3

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

func (*ExternalEndpointDatadogResource) Configure added in v0.69.3

func (*ExternalEndpointDatadogResource) Create added in v0.69.3

func (*ExternalEndpointDatadogResource) Delete added in v0.69.3

func (*ExternalEndpointDatadogResource) ImportState added in v0.69.3

func (*ExternalEndpointDatadogResource) Metadata added in v0.69.3

func (*ExternalEndpointDatadogResource) Read added in v0.69.3

func (*ExternalEndpointDatadogResource) Schema added in v0.69.3

func (*ExternalEndpointDatadogResource) Update added in v0.69.3

type ExternalEndpointDatadogResourceModel added in v0.69.3

type ExternalEndpointDatadogResourceModel struct {
	ID            types.String   `tfsdk:"id"`
	Name          types.String   `tfsdk:"name"`
	Zone          types.String   `tfsdk:"zone"`
	DatadogAPIKey types.String   `tfsdk:"datadog_api_key"`
	Site          types.String   `tfsdk:"site"`
	Timeouts      timeouts.Value `tfsdk:"timeouts"`
}

type ExternalEndpointElasticsearchResource added in v0.69.3

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

func (*ExternalEndpointElasticsearchResource) Configure added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Create added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Delete added in v0.69.3

func (*ExternalEndpointElasticsearchResource) ImportState added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Metadata added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Read added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Schema added in v0.69.3

func (*ExternalEndpointElasticsearchResource) Update added in v0.69.3

type ExternalEndpointElasticsearchResourceModel added in v0.69.3

type ExternalEndpointElasticsearchResourceModel struct {
	ID           types.String   `tfsdk:"id"`
	Name         types.String   `tfsdk:"name"`
	Zone         types.String   `tfsdk:"zone"`
	URL          types.String   `tfsdk:"url"`
	IndexPrefix  types.String   `tfsdk:"index_prefix"`
	IndexDaysMax types.Int64    `tfsdk:"index_days_max"`
	Timeout      types.Int64    `tfsdk:"timeout"`
	CA           types.String   `tfsdk:"ca"`
	Timeouts     timeouts.Value `tfsdk:"timeouts"`
}

type ExternalEndpointOpensearchResource added in v0.69.3

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

func (*ExternalEndpointOpensearchResource) Configure added in v0.69.3

func (*ExternalEndpointOpensearchResource) Create added in v0.69.3

func (*ExternalEndpointOpensearchResource) Delete added in v0.69.3

func (*ExternalEndpointOpensearchResource) ImportState added in v0.69.3

func (*ExternalEndpointOpensearchResource) Metadata added in v0.69.3

func (*ExternalEndpointOpensearchResource) Read added in v0.69.3

func (*ExternalEndpointOpensearchResource) Schema added in v0.69.3

func (*ExternalEndpointOpensearchResource) Update added in v0.69.3

type ExternalEndpointOpensearchResourceModel added in v0.69.3

type ExternalEndpointOpensearchResourceModel struct {
	ID           types.String   `tfsdk:"id"`
	Name         types.String   `tfsdk:"name"`
	Zone         types.String   `tfsdk:"zone"`
	URL          types.String   `tfsdk:"url"`
	IndexPrefix  types.String   `tfsdk:"index_prefix"`
	IndexDaysMax types.Int64    `tfsdk:"index_days_max"`
	Timeout      types.Int64    `tfsdk:"timeout"`
	CA           types.String   `tfsdk:"ca"`
	Timeouts     timeouts.Value `tfsdk:"timeouts"`
}

type ExternalEndpointPrometheusResource added in v0.69.3

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

func (*ExternalEndpointPrometheusResource) Configure added in v0.69.3

func (*ExternalEndpointPrometheusResource) Create added in v0.69.3

func (*ExternalEndpointPrometheusResource) Delete added in v0.69.3

func (*ExternalEndpointPrometheusResource) ImportState added in v0.69.3

func (*ExternalEndpointPrometheusResource) Metadata added in v0.69.3

func (*ExternalEndpointPrometheusResource) Read added in v0.69.3

func (*ExternalEndpointPrometheusResource) Schema added in v0.69.3

func (*ExternalEndpointPrometheusResource) Update added in v0.69.3

type ExternalEndpointPrometheusResourceModel added in v0.69.3

type ExternalEndpointPrometheusResourceModel struct {
	ID                types.String   `tfsdk:"id"`
	Name              types.String   `tfsdk:"name"`
	Zone              types.String   `tfsdk:"zone"`
	BasicAuthUsername types.String   `tfsdk:"basic_auth_username"`
	BasicAuthPassword types.String   `tfsdk:"basic_auth_password"`
	Timeouts          timeouts.Value `tfsdk:"timeouts"`
}

type ExternalEndpointRsyslogResource added in v0.69.3

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

func (*ExternalEndpointRsyslogResource) Configure added in v0.69.3

func (*ExternalEndpointRsyslogResource) Create added in v0.69.3

func (*ExternalEndpointRsyslogResource) Delete added in v0.69.3

func (*ExternalEndpointRsyslogResource) ImportState added in v0.69.3

func (*ExternalEndpointRsyslogResource) Metadata added in v0.69.3

func (*ExternalEndpointRsyslogResource) Read added in v0.69.3

func (*ExternalEndpointRsyslogResource) Schema added in v0.69.3

func (*ExternalEndpointRsyslogResource) Update added in v0.69.3

type ExternalEndpointRsyslogResourceModel added in v0.69.3

type ExternalEndpointRsyslogResourceModel struct {
	ID             types.String   `tfsdk:"id"`
	Name           types.String   `tfsdk:"name"`
	Zone           types.String   `tfsdk:"zone"`
	Server         types.String   `tfsdk:"server"`
	Port           types.Int64    `tfsdk:"port"`
	TLS            types.Bool     `tfsdk:"tls"`
	Format         types.String   `tfsdk:"format"`
	Logline        types.String   `tfsdk:"logline"`
	MaxMessageSize types.Int64    `tfsdk:"max_message_size"`
	SD             types.String   `tfsdk:"sd"`
	CA             types.String   `tfsdk:"ca"`
	Cert           types.String   `tfsdk:"cert"`
	Key            types.String   `tfsdk:"key"`
	Timeouts       timeouts.Value `tfsdk:"timeouts"`
}

type ExternalIntegrationResource added in v0.69.3

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

func (*ExternalIntegrationResource) Configure added in v0.69.3

func (*ExternalIntegrationResource) Create added in v0.69.3

func (*ExternalIntegrationResource) Delete added in v0.69.3

func (*ExternalIntegrationResource) ImportState added in v0.69.3

func (*ExternalIntegrationResource) Metadata added in v0.69.3

func (*ExternalIntegrationResource) Read added in v0.69.3

func (*ExternalIntegrationResource) Schema added in v0.69.3

func (*ExternalIntegrationResource) Update added in v0.69.3

type ExternalIntegrationResourceModel added in v0.69.3

type ExternalIntegrationResourceModel struct {
	ID                types.String   `tfsdk:"id"`
	SourceServiceName types.String   `tfsdk:"source_service_name"`
	DestEndpointID    types.String   `tfsdk:"dest_endpoint_id"`
	Type              types.String   `tfsdk:"type"`
	Zone              types.String   `tfsdk:"zone"`
	Description       types.String   `tfsdk:"description"`
	Status            types.String   `tfsdk:"status"`
	DestEndpointName  types.String   `tfsdk:"dest_endpoint_name"`
	SourceServiceType types.String   `tfsdk:"source_service_type"`
	Timeouts          timeouts.Value `tfsdk:"timeouts"`
}

type KafkaUserResource added in v0.63.0

type KafkaUserResource struct {
	UserResource
}

func (*KafkaUserResource) Configure added in v0.63.0

func (*KafkaUserResource) Create added in v0.63.0

func (*KafkaUserResource) Delete added in v0.63.0

func (*KafkaUserResource) ImportState added in v0.63.0

func (*KafkaUserResource) Metadata added in v0.63.0

func (*KafkaUserResource) Read added in v0.63.0

func (*KafkaUserResource) Schema added in v0.63.0

func (*KafkaUserResource) Update added in v0.63.0

type KafkaUserResourceModel added in v0.63.0

type KafkaUserResourceModel struct {
	UserResourceModel
	AccessKey        types.String `tfsdk:"access_key"`
	AccessCert       types.String `tfsdk:"access_cert"`
	AccessCertExpiry types.String `tfsdk:"access_cert_expiry"`
}

func (*KafkaUserResourceModel) CreateResource added in v0.63.0

func (data *KafkaUserResourceModel) CreateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*KafkaUserResourceModel) DeleteResource added in v0.64.1

func (data *KafkaUserResourceModel) DeleteResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*KafkaUserResourceModel) GenerateID added in v0.63.0

func (data *KafkaUserResourceModel) GenerateID()

func (*KafkaUserResourceModel) GetID added in v0.63.0

func (*KafkaUserResourceModel) GetTimeouts added in v0.63.0

func (data *KafkaUserResourceModel) GetTimeouts() timeouts.Value

func (*KafkaUserResourceModel) GetZone added in v0.63.0

func (*KafkaUserResourceModel) ReadResource added in v0.63.0

func (data *KafkaUserResourceModel) ReadResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*KafkaUserResourceModel) SetTimeouts added in v0.63.0

func (data *KafkaUserResourceModel) SetTimeouts(t timeouts.Value)

func (*KafkaUserResourceModel) UpdateResource added in v0.63.0

func (data *KafkaUserResourceModel) UpdateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*KafkaUserResourceModel) WaitForService added in v0.63.0

func (data *KafkaUserResourceModel) WaitForService(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

type MysqlDatabaseResource added in v0.64.1

type MysqlDatabaseResource struct {
	DBResource
}

func (*MysqlDatabaseResource) Configure added in v0.64.1

func (*MysqlDatabaseResource) Create added in v0.64.1

Create implements resource.Resource.

func (*MysqlDatabaseResource) Delete added in v0.64.1

Delete implements resource.Resource.

func (*MysqlDatabaseResource) ImportState added in v0.64.1

ImportState implements resource.ResourceWithImportState.

func (*MysqlDatabaseResource) Metadata added in v0.64.1

Metadata implements resource.Resource.

func (*MysqlDatabaseResource) Read added in v0.64.1

Read implements resource.Resource.

func (*MysqlDatabaseResource) Schema added in v0.64.1

Schema implements resource.Resource.

func (*MysqlDatabaseResource) Update added in v0.64.1

Update implements resource.Resource.

type MysqlDatabaseResourceModel added in v0.64.1

type MysqlDatabaseResourceModel struct {
	DBResourceModel
}

func (MysqlDatabaseResourceModel) CreateResource added in v0.64.1

func (data MysqlDatabaseResourceModel) CreateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

CreateResource creates the resource according to the model, and then update computed fields if applicable

func (MysqlDatabaseResourceModel) DeleteResource added in v0.64.1

func (data MysqlDatabaseResourceModel) DeleteResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

DeleteResource deletes the resource

func (*MysqlDatabaseResourceModel) GenerateID added in v0.64.1

func (data *MysqlDatabaseResourceModel) GenerateID()

Should set the return value of .GetID() to service/database_name

func (*MysqlDatabaseResourceModel) GetID added in v0.64.1

func (*MysqlDatabaseResourceModel) GetTimeouts added in v0.64.1

func (data *MysqlDatabaseResourceModel) GetTimeouts() timeouts.Value

Accessing and setting attributes

func (*MysqlDatabaseResourceModel) GetZone added in v0.64.1

func (MysqlDatabaseResourceModel) ReadResource added in v0.64.1

func (data MysqlDatabaseResourceModel) ReadResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics) (clearState bool)

ReadResource reads resource from remote and populate the model accordingly

func (*MysqlDatabaseResourceModel) SetTimeouts added in v0.64.1

func (data *MysqlDatabaseResourceModel) SetTimeouts(t timeouts.Value)

func (MysqlDatabaseResourceModel) UpdateResource added in v0.64.1

func (MysqlDatabaseResourceModel) UpdateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

UpdateResource updates the remote resource w/ the new model

func (MysqlDatabaseResourceModel) WaitForService added in v0.64.1

func (data MysqlDatabaseResourceModel) WaitForService(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

type MysqlUserResource added in v0.63.0

type MysqlUserResource struct {
	UserResource
}

func (*MysqlUserResource) Configure added in v0.63.0

func (*MysqlUserResource) Create added in v0.63.0

func (*MysqlUserResource) Delete added in v0.63.0

func (*MysqlUserResource) ImportState added in v0.63.0

func (*MysqlUserResource) Metadata added in v0.63.0

func (*MysqlUserResource) Read added in v0.63.0

func (*MysqlUserResource) Schema added in v0.63.0

func (*MysqlUserResource) Update added in v0.63.0

type MysqlUserResourceModel added in v0.63.0

type MysqlUserResourceModel struct {
	UserResourceModel
	Authentication types.String `tfsdk:"authentication"`
}

func (*MysqlUserResourceModel) CreateResource added in v0.63.0

func (data *MysqlUserResourceModel) CreateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*MysqlUserResourceModel) DeleteResource added in v0.64.1

func (data *MysqlUserResourceModel) DeleteResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*MysqlUserResourceModel) GenerateID added in v0.63.0

func (data *MysqlUserResourceModel) GenerateID()

func (*MysqlUserResourceModel) GetID added in v0.63.0

func (*MysqlUserResourceModel) GetTimeouts added in v0.63.0

func (data *MysqlUserResourceModel) GetTimeouts() timeouts.Value

func (*MysqlUserResourceModel) GetZone added in v0.63.0

func (*MysqlUserResourceModel) ReadResource added in v0.63.0

func (data *MysqlUserResourceModel) ReadResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*MysqlUserResourceModel) SetTimeouts added in v0.63.0

func (data *MysqlUserResourceModel) SetTimeouts(t timeouts.Value)

func (*MysqlUserResourceModel) UpdateResource added in v0.63.0

func (data *MysqlUserResourceModel) UpdateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*MysqlUserResourceModel) WaitForService added in v0.63.0

func (data *MysqlUserResourceModel) WaitForService(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

type OpensearchUserResource added in v0.63.0

type OpensearchUserResource struct {
	UserResource
}

func (*OpensearchUserResource) Configure added in v0.63.0

func (*OpensearchUserResource) Create added in v0.63.0

func (*OpensearchUserResource) Delete added in v0.63.0

func (*OpensearchUserResource) ImportState added in v0.63.0

func (*OpensearchUserResource) Metadata added in v0.63.0

func (*OpensearchUserResource) Read added in v0.63.0

func (*OpensearchUserResource) Schema added in v0.63.0

func (*OpensearchUserResource) Update added in v0.63.0

type OpensearchUserResourceModel added in v0.63.0

type OpensearchUserResourceModel struct {
	UserResourceModel
}

func (*OpensearchUserResourceModel) CreateResource added in v0.63.0

func (data *OpensearchUserResourceModel) CreateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*OpensearchUserResourceModel) DeleteResource added in v0.64.1

func (data *OpensearchUserResourceModel) DeleteResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*OpensearchUserResourceModel) GenerateID added in v0.63.0

func (data *OpensearchUserResourceModel) GenerateID()

func (*OpensearchUserResourceModel) GetID added in v0.63.0

func (*OpensearchUserResourceModel) GetTimeouts added in v0.63.0

func (data *OpensearchUserResourceModel) GetTimeouts() timeouts.Value

func (*OpensearchUserResourceModel) GetZone added in v0.63.0

func (*OpensearchUserResourceModel) ReadResource added in v0.63.0

func (data *OpensearchUserResourceModel) ReadResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*OpensearchUserResourceModel) SetTimeouts added in v0.63.0

func (data *OpensearchUserResourceModel) SetTimeouts(t timeouts.Value)

func (*OpensearchUserResourceModel) UpdateResource added in v0.63.0

func (data *OpensearchUserResourceModel) UpdateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*OpensearchUserResourceModel) WaitForService added in v0.63.0

func (data *OpensearchUserResourceModel) WaitForService(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

type PGConnectionPoolResource added in v0.69.0

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

func (*PGConnectionPoolResource) Configure added in v0.69.0

func (*PGConnectionPoolResource) Create added in v0.69.0

func (*PGConnectionPoolResource) Delete added in v0.69.0

func (*PGConnectionPoolResource) ImportState added in v0.69.0

func (*PGConnectionPoolResource) Metadata added in v0.69.0

func (*PGConnectionPoolResource) Read added in v0.69.0

func (*PGConnectionPoolResource) Schema added in v0.69.0

func (*PGConnectionPoolResource) Update added in v0.69.0

type PGConnectionPoolResourceModel added in v0.69.0

type PGConnectionPoolResourceModel struct {
	Id            types.String `tfsdk:"id"`
	Service       types.String `tfsdk:"service"`
	Name          types.String `tfsdk:"name"`
	DatabaseName  types.String `tfsdk:"database_name"`
	Username      types.String `tfsdk:"username"`
	Mode          types.String `tfsdk:"mode"`
	Size          types.Int64  `tfsdk:"size"`
	ConnectionURI types.String `tfsdk:"connection_uri"`
	Zone          types.String `tfsdk:"zone"`

	Timeouts timeouts.Value `tfsdk:"timeouts"`
	// contains filtered or unexported fields
}

func (*PGConnectionPoolResourceModel) CreateResource added in v0.69.0

func (data *PGConnectionPoolResourceModel) CreateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGConnectionPoolResourceModel) DeleteResource added in v0.69.0

func (data *PGConnectionPoolResourceModel) DeleteResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGConnectionPoolResourceModel) GenerateID added in v0.69.0

func (data *PGConnectionPoolResourceModel) GenerateID()

func (*PGConnectionPoolResourceModel) GetID added in v0.69.0

func (*PGConnectionPoolResourceModel) GetTimeouts added in v0.69.0

func (data *PGConnectionPoolResourceModel) GetTimeouts() timeouts.Value

func (*PGConnectionPoolResourceModel) GetZone added in v0.69.0

func (*PGConnectionPoolResourceModel) ReadResource added in v0.69.0

func (data *PGConnectionPoolResourceModel) ReadResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*PGConnectionPoolResourceModel) SetTimeouts added in v0.69.0

func (data *PGConnectionPoolResourceModel) SetTimeouts(t timeouts.Value)

func (*PGConnectionPoolResourceModel) UpdateResource added in v0.69.0

func (data *PGConnectionPoolResourceModel) UpdateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGConnectionPoolResourceModel) WaitForService added in v0.69.0

func (data *PGConnectionPoolResourceModel) WaitForService(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

type PGDatabaseResource added in v0.64.1

type PGDatabaseResource struct {
	DBResource
}

func (*PGDatabaseResource) Configure added in v0.64.1

func (*PGDatabaseResource) Create added in v0.64.1

Create implements resource.Resource.

func (*PGDatabaseResource) Delete added in v0.64.1

Delete implements resource.Resource.

func (*PGDatabaseResource) ImportState added in v0.64.1

ImportState implements resource.ResourceWithImportState.

func (*PGDatabaseResource) Metadata added in v0.64.1

Metadata implements resource.Resource.

func (*PGDatabaseResource) Read added in v0.64.1

Read implements resource.Resource.

func (*PGDatabaseResource) Schema added in v0.64.1

Schema implements resource.Resource.

func (*PGDatabaseResource) Update added in v0.64.1

Update implements resource.Resource.

type PGDatabaseResourceModel added in v0.64.1

type PGDatabaseResourceModel struct {
	DBResourceModel
	LcCtype   types.String `tfsdk:"lc_ctype"`
	LcCollate types.String `tfsdk:"lc_collate"`
}

func (PGDatabaseResourceModel) CreateResource added in v0.64.1

func (data PGDatabaseResourceModel) CreateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

CreateResource creates the resource according to the model, and then update computed fields if applicable

func (PGDatabaseResourceModel) DeleteResource added in v0.64.1

func (data PGDatabaseResourceModel) DeleteResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

DeleteResource deletes the resource

func (*PGDatabaseResourceModel) GenerateID added in v0.64.1

func (data *PGDatabaseResourceModel) GenerateID()

Should set the return value of .GetID() to service/database_name

func (*PGDatabaseResourceModel) GetID added in v0.64.1

func (*PGDatabaseResourceModel) GetTimeouts added in v0.64.1

func (data *PGDatabaseResourceModel) GetTimeouts() timeouts.Value

Accessing and setting attributes

func (*PGDatabaseResourceModel) GetZone added in v0.64.1

func (PGDatabaseResourceModel) ReadResource added in v0.64.1

func (data PGDatabaseResourceModel) ReadResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics) (clearState bool)

ReadResource reads resource from remote and populate the model accordingly

func (*PGDatabaseResourceModel) SetTimeouts added in v0.64.1

func (data *PGDatabaseResourceModel) SetTimeouts(t timeouts.Value)

func (PGDatabaseResourceModel) UpdateResource added in v0.64.1

func (PGDatabaseResourceModel) UpdateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

UpdateResource updates the remote resource w/ the new model

func (PGDatabaseResourceModel) WaitForService added in v0.64.1

func (data PGDatabaseResourceModel) WaitForService(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

type PGUserResource added in v0.63.0

type PGUserResource struct {
	UserResource
}

func (*PGUserResource) Configure added in v0.63.0

func (*PGUserResource) Create added in v0.63.0

func (*PGUserResource) Delete added in v0.63.0

func (*PGUserResource) ImportState added in v0.63.0

func (*PGUserResource) Metadata added in v0.63.0

func (*PGUserResource) Read added in v0.63.0

func (*PGUserResource) Schema added in v0.63.0

func (*PGUserResource) Update added in v0.63.0

type PGUserResourceModel added in v0.63.0

type PGUserResourceModel struct {
	UserResourceModel
	AllowReplication types.Bool `tfsdk:"allow_replication"`
}

func (*PGUserResourceModel) CreateResource added in v0.63.0

func (data *PGUserResourceModel) CreateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGUserResourceModel) DeleteResource added in v0.64.1

func (data *PGUserResourceModel) DeleteResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGUserResourceModel) GenerateID added in v0.63.0

func (data *PGUserResourceModel) GenerateID()

func (*PGUserResourceModel) GetID added in v0.63.0

func (*PGUserResourceModel) GetTimeouts added in v0.63.0

func (data *PGUserResourceModel) GetTimeouts() timeouts.Value

func (*PGUserResourceModel) GetZone added in v0.63.0

func (data *PGUserResourceModel) GetZone() basetypes.StringValue

func (*PGUserResourceModel) ReadResource added in v0.63.0

func (data *PGUserResourceModel) ReadResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*PGUserResourceModel) SetTimeouts added in v0.63.0

func (data *PGUserResourceModel) SetTimeouts(t timeouts.Value)

func (*PGUserResourceModel) UpdateResource added in v0.63.0

func (data *PGUserResourceModel) UpdateResource(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

func (*PGUserResourceModel) WaitForService added in v0.63.0

func (data *PGUserResourceModel) WaitForService(ctx context.Context, client *v3.Client, diagnostics *diag.Diagnostics)

type ResourceGrafanaModel

type ResourceGrafanaModel struct {
	IpFilter types.Set    `tfsdk:"ip_filter"`
	Settings types.String `tfsdk:"grafana_settings"`
}

type ResourceKafkaModel

type ResourceKafkaModel struct {
	EnableCertAuth         types.Bool   `tfsdk:"enable_cert_auth"`
	EnableKafkaConnect     types.Bool   `tfsdk:"enable_kafka_connect"`
	EnableKafkaREST        types.Bool   `tfsdk:"enable_kafka_rest"`
	EnableSASLAuth         types.Bool   `tfsdk:"enable_sasl_auth"`
	EnableSchemaRegistry   types.Bool   `tfsdk:"enable_schema_registry"`
	IpFilter               types.Set    `tfsdk:"ip_filter"`
	Settings               types.String `tfsdk:"kafka_settings"`
	ConnectSettings        types.String `tfsdk:"kafka_connect_settings"`
	RestSettings           types.String `tfsdk:"kafka_rest_settings"`
	SchemaRegistrySettings types.String `tfsdk:"schema_registry_settings"`
	Version                types.String `tfsdk:"version"`
}

type ResourceModelInterface added in v0.63.0

type ResourceModelInterface interface {
	// ReadResource reads resource from remote and populate the model accordingly
	ReadResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics) (clearState bool)
	// CreateResource creates the resource according to the model, and then
	// update computed fields if applicable
	CreateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)
	// DeleteResource deletes the resource
	DeleteResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)
	// UpdateResource updates the remote resource w/ the new model
	UpdateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

	// WaitForService waits for the service to be be available for resource updates.
	// different services have different quirks regarding what available means, so
	// it's best to dispatch like this
	WaitForService(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

	// Accessing and setting attributes
	GetTimeouts() timeouts.Value
	SetTimeouts(timeouts.Value)
	GetID() basetypes.StringValue
	GetZone() basetypes.StringValue

	// Should set the return value of .GetID() to service/username
	GenerateID()
}

ResourceModelInterface defines necessary functions for interacting with resources through abstraction

type ResourceMysqlModel

type ResourceMysqlModel struct {
	AdminPassword  types.String `tfsdk:"admin_password"`
	AdminUsername  types.String `tfsdk:"admin_username"`
	BackupSchedule types.String `tfsdk:"backup_schedule"`
	IpFilter       types.Set    `tfsdk:"ip_filter"`
	Settings       types.String `tfsdk:"mysql_settings"`
	Version        types.String `tfsdk:"version"`
}

type ResourceOpensearchDashboardsModel

type ResourceOpensearchDashboardsModel struct {
	Enabled         types.Bool  `tfsdk:"enabled"`
	MaxOldSpaceSize types.Int64 `tfsdk:"max_old_space_size"`
	RequestTimeout  types.Int64 `tfsdk:"request_timeout"`
}

type ResourceOpensearchIndexPatternsModel

type ResourceOpensearchIndexPatternsModel struct {
	MaxIndexCount    types.Int64  `tfsdk:"max_index_count"`
	Pattern          types.String `tfsdk:"pattern"`
	SortingAlgorithm types.String `tfsdk:"sorting_algorithm"`
}

type ResourceOpensearchIndexTemplateModel

type ResourceOpensearchIndexTemplateModel struct {
	MappingNestedObjectsLimit types.Int64 `tfsdk:"mapping_nested_objects_limit"`
	NumberOfReplicas          types.Int64 `tfsdk:"number_of_replicas"`
	NumberOfShards            types.Int64 `tfsdk:"number_of_shards"`
}

type ResourceOpensearchModel

type ResourceOpensearchModel struct {
	ForkFromService          types.String `tfsdk:"fork_from_service"`
	RecoveryBackupName       types.String `tfsdk:"recovery_backup_name"`
	IpFilter                 types.Set    `tfsdk:"ip_filter"`
	KeepIndexRefreshInterval types.Bool   `tfsdk:"keep_index_refresh_interval"`
	MaxIndexCount            types.Int64  `tfsdk:"max_index_count"`
	Settings                 types.String `tfsdk:"settings"`
	Version                  types.String `tfsdk:"version"`

	IndexPatterns []ResourceOpensearchIndexPatternsModel `tfsdk:"index_pattern"`
	IndexTemplate *ResourceOpensearchIndexTemplateModel  `tfsdk:"index_template"`
	Dashboards    *ResourceOpensearchDashboardsModel     `tfsdk:"dashboards"`
}

type ResourcePgModel

type ResourcePgModel struct {
	AdminPassword           types.String `tfsdk:"admin_password"`
	AdminUsername           types.String `tfsdk:"admin_username"`
	BackupSchedule          types.String `tfsdk:"backup_schedule"`
	IpFilter                types.Set    `tfsdk:"ip_filter"`
	Settings                types.String `tfsdk:"pg_settings"`
	Version                 types.String `tfsdk:"version"`
	PgbouncerSettings       types.String `tfsdk:"pgbouncer_settings"`
	PglookoutSettings       types.String `tfsdk:"pglookout_settings"`
	SharedBuffersPercentage types.Int64  `tfsdk:"shared_buffers_percentage"`
	TimescaledbSettings     types.String `tfsdk:"timescaledb_settings"`
	Variant                 types.String `tfsdk:"variant"`
	WorkMem                 types.Int64  `tfsdk:"work_mem"`
	RecoveryBackupTime      types.String `tfsdk:"recovery_backup_time"`
}

type ResourceValkeyModel added in v0.64.0

type ResourceValkeyModel struct {
	IPFilter types.Set    `tfsdk:"ip_filter"`
	Settings types.String `tfsdk:"valkey_settings"`
}

type ServiceResource added in v0.64.1

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

ServiceResource defines the DBaaS Service resource implementation.

func (*ServiceResource) Configure added in v0.64.1

func (*ServiceResource) Create added in v0.64.1

func (*ServiceResource) Delete added in v0.64.1

func (*ServiceResource) ImportState added in v0.64.1

func (*ServiceResource) Metadata added in v0.64.1

func (*ServiceResource) Read added in v0.64.1

func (*ServiceResource) Schema added in v0.64.1

func (*ServiceResource) Update added in v0.64.1

func (*ServiceResource) UpgradeState added in v0.64.1

func (r *ServiceResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader

func (*ServiceResource) ValidateConfig added in v0.64.1

type ServiceResourceModel added in v0.64.1

type ServiceResourceModel struct {
	Id                    types.String `tfsdk:"id"`
	CreatedAt             types.String `tfsdk:"created_at"`
	DiskSize              types.Int64  `tfsdk:"disk_size"`
	MaintenanceDOW        types.String `tfsdk:"maintenance_dow"`
	MaintenanceTime       types.String `tfsdk:"maintenance_time"`
	Name                  types.String `tfsdk:"name"`
	NodeCPUs              types.Int64  `tfsdk:"node_cpus"`
	NodeMemory            types.Int64  `tfsdk:"node_memory"`
	Nodes                 types.Int64  `tfsdk:"nodes"`
	Plan                  types.String `tfsdk:"plan"`
	State                 types.String `tfsdk:"state"`
	CA                    types.String `tfsdk:"ca_certificate"`
	TerminationProtection types.Bool   `tfsdk:"termination_protection"`
	Type                  types.String `tfsdk:"type"`
	UpdatedAt             types.String `tfsdk:"updated_at"`
	Zone                  types.String `tfsdk:"zone"`

	Pg         *ResourcePgModel         `tfsdk:"pg"`
	Mysql      *ResourceMysqlModel      `tfsdk:"mysql"`
	Valkey     *ResourceValkeyModel     `tfsdk:"valkey"`
	Kafka      *ResourceKafkaModel      `tfsdk:"kafka"`
	Opensearch *ResourceOpensearchModel `tfsdk:"opensearch"`
	Grafana    *ResourceGrafanaModel    `tfsdk:"grafana"`

	Timeouts timeouts.Value `tfsdk:"timeouts"`
}

ServiceResourceModel describes the generic DBaaS Service resource data model.

type UserResource added in v0.63.0

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

UserResource defines the resource implementation.

type UserResourceModel added in v0.63.0

type UserResourceModel struct {
	Id       types.String `tfsdk:"id"`
	Service  types.String `tfsdk:"service"`
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
	Zone     types.String `tfsdk:"zone"`
	Type     types.String `tfsdk:"type"`

	Timeouts timeouts.Value `tfsdk:"timeouts"`
}

UserResourceModel describes the resource data model.

type ValkeyUserResource added in v0.69.3

type ValkeyUserResource struct {
	UserResource
}

func (*ValkeyUserResource) Configure added in v0.69.3

func (*ValkeyUserResource) Create added in v0.69.3

func (*ValkeyUserResource) Delete added in v0.69.3

func (*ValkeyUserResource) ImportState added in v0.69.3

func (*ValkeyUserResource) Metadata added in v0.69.3

func (*ValkeyUserResource) Read added in v0.69.3

func (*ValkeyUserResource) Schema added in v0.69.3

func (*ValkeyUserResource) Update added in v0.69.3

type ValkeyUserResourceModel added in v0.69.3

type ValkeyUserResourceModel struct {
	UserResourceModel
}

func (*ValkeyUserResourceModel) CreateResource added in v0.69.3

func (data *ValkeyUserResourceModel) CreateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*ValkeyUserResourceModel) DeleteResource added in v0.69.3

func (data *ValkeyUserResourceModel) DeleteResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*ValkeyUserResourceModel) GenerateID added in v0.69.3

func (data *ValkeyUserResourceModel) GenerateID()

func (*ValkeyUserResourceModel) GetID added in v0.69.3

func (*ValkeyUserResourceModel) GetTimeouts added in v0.69.3

func (data *ValkeyUserResourceModel) GetTimeouts() timeouts.Value

func (*ValkeyUserResourceModel) GetZone added in v0.69.3

func (*ValkeyUserResourceModel) ReadResource added in v0.69.3

func (data *ValkeyUserResourceModel) ReadResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics) (clearState bool)

func (*ValkeyUserResourceModel) SetTimeouts added in v0.69.3

func (data *ValkeyUserResourceModel) SetTimeouts(t timeouts.Value)

func (*ValkeyUserResourceModel) UpdateResource added in v0.69.3

func (data *ValkeyUserResourceModel) UpdateResource(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

func (*ValkeyUserResourceModel) WaitForService added in v0.69.3

func (data *ValkeyUserResourceModel) WaitForService(ctx context.Context, client *exoscale.Client, diagnostics *diag.Diagnostics)

Jump to

Keyboard shortcuts

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