// Code generated by user config generator. DO NOT EDIT.

package service

import (
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"

	"github.com/aiven/terraform-provider-aiven/internal/sdkprovider/userconfig/diff"
)

func opensearchUserConfig() *schema.Schema {
	return &schema.Schema{
		Description:      "Opensearch user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later",
		DiffSuppressFunc: diff.SuppressUnchanged,
		Elem: &schema.Resource{Schema: map[string]*schema.Schema{
			"additional_backup_regions": {
				Description: "Additional Cloud Regions for Backup Replication.",
				Elem: &schema.Schema{
					Description: "Target cloud. Example: `aws-eu-central-1`.",
					Type:        schema.TypeString,
				},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"azure_migration": {
				Description: "Azure migration settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"account": {
						Description: "Account name.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"base_path": {
						Description: "The path to the repository data within its container. The value of this setting should not start or end with a /.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"chunk_size": {
						Description: "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"compress": {
						Description: "When set to true metadata files are stored in compressed format.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"container": {
						Description: "Azure container name.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"endpoint_suffix": {
						Description: "Defines the DNS suffix for Azure Storage endpoints.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"include_aliases": {
						Description: "Whether to restore aliases alongside their associated indexes. Default is true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"indices": {
						Description: "A comma-delimited list of indices to restore from the snapshot. Multi-index syntax is supported. Example: `metrics*,logs*,data-20240823`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"key": {
						Description: "Azure account secret key. One of key or sas_token should be specified.",
						Optional:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"readonly": {
						Description: "Whether the repository is read-only. Default: `true`.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"restore_global_state": {
						Description: "If true, restore the cluster state. Defaults to false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"sas_token": {
						Description: "A shared access signatures (SAS) token. One of key or sas_token should be specified.",
						Optional:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"snapshot_name": {
						Description: "The snapshot name to restore from.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"custom_domain": {
				Description: "Serve the web frontend using a custom CNAME pointing to the Aiven DNS name. Example: `grafana.example.org`.",
				Optional:    true,
				Type:        schema.TypeString,
			},
			"disable_replication_factor_adjustment": {
				Description: "Disable automatic replication factor adjustment for multi-node services. By default, Aiven ensures all indexes are replicated at least to two nodes. Note: Due to potential data loss in case of losing a service node, this setting can not be activated unless specifically allowed for the project.",
				Optional:    true,
				Type:        schema.TypeBool,
			},
			"gcs_migration": {
				Description: "Google Cloud Storage migration settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"base_path": {
						Description: "The path to the repository data within its container. The value of this setting should not start or end with a /.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"bucket": {
						Description: "The path to the repository data within its container.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"chunk_size": {
						Description: "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"compress": {
						Description: "When set to true metadata files are stored in compressed format.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"credentials": {
						Description: "Google Cloud Storage credentials file content.",
						Required:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"include_aliases": {
						Description: "Whether to restore aliases alongside their associated indexes. Default is true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"indices": {
						Description: "A comma-delimited list of indices to restore from the snapshot. Multi-index syntax is supported. Example: `metrics*,logs*,data-20240823`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"readonly": {
						Description: "Whether the repository is read-only. Default: `true`.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"restore_global_state": {
						Description: "If true, restore the cluster state. Defaults to false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"snapshot_name": {
						Description: "The snapshot name to restore from.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"index_patterns": {
				Description: "Index patterns",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"max_index_count": {
						Description: "Maximum number of indexes to keep. Example: `3`.",
						Required:    true,
						Type:        schema.TypeInt,
					},
					"pattern": {
						Description: "fnmatch pattern. Example: `logs_*_foo_*`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"sorting_algorithm": {
						Description:  "Enum: `alphabetical`, `creation_date`. Deletion sorting algorithm. Default: `creation_date`.",
						Optional:     true,
						Type:         schema.TypeString,
						ValidateFunc: validation.StringInSlice([]string{"alphabetical", "creation_date"}, false),
					},
				}},
				MaxItems: 512,
				Optional: true,
				Type:     schema.TypeList,
			},
			"index_rollup": {
				Description: "Index rollup settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"rollup_dashboards_enabled": {
						Description: "Whether rollups are enabled in OpenSearch Dashboards. Defaults to true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"rollup_enabled": {
						Description: "Whether the rollup plugin is enabled. Defaults to true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"rollup_search_backoff_count": {
						Description: "How many retries the plugin should attempt for failed rollup jobs. Defaults to 5.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"rollup_search_backoff_millis": {
						Description: "The backoff time between retries for failed rollup jobs. Defaults to 1000ms.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"rollup_search_search_all_jobs": {
						Description: "Whether OpenSearch should return all jobs that match all specified search terms. If disabled, OpenSearch returns just one, as opposed to all, of the jobs that matches the search terms. Defaults to false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"index_template": {
				Description: "Template settings for all new indexes",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"mapping_nested_objects_limit": {
						Description: "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. Deprecated, use an index template instead. Example: `10000`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"number_of_replicas": {
						Description: "The number of replicas each primary shard has. Deprecated, use an index template instead. Example: `1`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"number_of_shards": {
						Description: "The number of primary shards that an index should have. Deprecated, use an index template instead. Example: `1`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"ip_filter": {
				Deprecated:  "Deprecated. Use `ip_filter_string` instead.",
				Description: "Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`.",
				Elem: &schema.Schema{
					Description: "CIDR address block, either as a string, or in a dict with an optional description field. Example: `10.20.0.0/16`.",
					Type:        schema.TypeString,
				},
				MaxItems: 8000,
				Optional: true,
				Type:     schema.TypeSet,
			},
			"ip_filter_object": {
				Description: "Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"description": {
						Description: "Description for IP filter list entry. Example: `Production service IP range`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"network": {
						Description: "CIDR address block. Example: `10.20.0.0/16`.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 8000,
				Optional: true,
				Type:     schema.TypeSet,
			},
			"ip_filter_string": {
				Description: "Allow incoming connections from CIDR address block, e.g. `10.20.0.0/16`.",
				Elem: &schema.Schema{
					Description: "CIDR address block, either as a string, or in a dict with an optional description field. Example: `10.20.0.0/16`.",
					Type:        schema.TypeString,
				},
				MaxItems: 8000,
				Optional: true,
				Type:     schema.TypeSet,
			},
			"keep_index_refresh_interval": {
				Description: "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,
				Type:        schema.TypeBool,
			},
			"max_index_count": {
				Description: "Use index_patterns instead. Default: `0`.",
				Optional:    true,
				Type:        schema.TypeInt,
			},
			"openid": {
				Description: "OpenSearch OpenID Connect Configuration",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"client_id": {
						Description: "The ID of the OpenID Connect client configured in your IdP. Required.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"client_secret": {
						Description: "The client secret of the OpenID Connect client configured in your IdP. Required.",
						Required:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"connect_url": {
						Description: "The URL of your IdP where the Security plugin can find the OpenID Connect metadata/configuration settings. Example: `https://test-account.okta.com/app/exk491jujcVc83LEX697/sso/saml/metadata`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"enabled": {
						Description: "Enables or disables OpenID Connect authentication for OpenSearch. When enabled, users can authenticate using OpenID Connect with an Identity Provider. Default: `true`.",
						Required:    true,
						Type:        schema.TypeBool,
					},
					"header": {
						Description: "HTTP header name of the JWT token. Optional. Default is Authorization. Default: `Authorization`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"jwt_header": {
						Description: "The HTTP header that stores the token. Typically the Authorization header with the Bearer schema: Authorization: Bearer <token>. Optional. Default is Authorization. Example: `preferred_username`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"jwt_url_parameter": {
						Description: "If the token is not transmitted in the HTTP header, but as an URL parameter, define the name of the parameter here. Optional. Example: `preferred_username`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"refresh_rate_limit_count": {
						Description: "The maximum number of unknown key IDs in the time frame. Default is 10. Optional. Default: `10`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"refresh_rate_limit_time_window_ms": {
						Description: "The time frame to use when checking the maximum number of unknown key IDs, in milliseconds. Optional.Default is 10000 (10 seconds). Default: `10000`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"roles_key": {
						Description: "The key in the JSON payload that stores the user’s roles. The value of this key must be a comma-separated list of roles. Required only if you want to use roles in the JWT. Example: `roles`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"scope": {
						Description: "The scope of the identity token issued by the IdP. Optional. Default is openid profile email address phone.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"subject_key": {
						Description: "The key in the JSON payload that stores the user’s name. If not defined, the subject registered claim is used. Most IdP providers use the preferred_username claim. Optional. Example: `preferred_username`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"opensearch": {
				Description: "OpenSearch settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"action_auto_create_index_enabled": {
						Description: "Explicitly allow or block automatic creation of indices. Defaults to true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"action_destructive_requires_name": {
						Description: "Require explicit index names when deleting.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"auth_failure_listeners": {
						Description: "Opensearch Security Plugin Settings",
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"internal_authentication_backend_limiting": {
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"allowed_tries": {
										Description: "The number of login attempts allowed before login is blocked. Example: `10`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"authentication_backend": {
										Description:  "Enum: `internal`. internal_authentication_backend_limiting.authentication_backend.",
										Optional:     true,
										Type:         schema.TypeString,
										ValidateFunc: validation.StringInSlice([]string{"internal"}, false),
									},
									"block_expiry_seconds": {
										Description: "The duration of time that login remains blocked after a failed login. Example: `600`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"max_blocked_clients": {
										Description: "internal_authentication_backend_limiting.max_blocked_clients. Example: `100000`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"max_tracked_clients": {
										Description: "The maximum number of tracked IP addresses that have failed login. Example: `100000`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"time_window_seconds": {
										Description: "The window of time in which the value for `allowed_tries` is enforced. Example: `3600`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"type": {
										Description:  "Enum: `username`. internal_authentication_backend_limiting.type.",
										Optional:     true,
										Type:         schema.TypeString,
										ValidateFunc: validation.StringInSlice([]string{"username"}, false),
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"ip_rate_limiting": {
								Deprecated:  "This property is deprecated.",
								Description: "IP address rate limiting settings",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"allowed_tries": {
										Description: "The number of login attempts allowed before login is blocked. Example: `10`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"block_expiry_seconds": {
										Description: "The duration of time that login remains blocked after a failed login. Example: `600`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"max_blocked_clients": {
										Description: "The maximum number of blocked IP addresses. Example: `100000`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"max_tracked_clients": {
										Description: "The maximum number of tracked IP addresses that have failed login. Example: `100000`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"time_window_seconds": {
										Description: "The window of time in which the value for `allowed_tries` is enforced. Example: `3600`.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"type": {
										Description:  "Enum: `ip`. The type of rate limiting.",
										Optional:     true,
										Type:         schema.TypeString,
										ValidateFunc: validation.StringInSlice([]string{"ip"}, false),
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"cluster_filecache_remote_data_ratio": {
						Description: "Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 0.",
						Optional:    true,
						Type:        schema.TypeFloat,
					},
					"cluster_max_shards_per_node": {
						Description: "Controls the number of shards allowed in the cluster per data node. Example: `1000`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"cluster_remote_store": {
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"state_global_metadata_upload_timeout": {
								Description: "The amount of time to wait for the cluster state upload to complete. Defaults to 20s.",
								Optional:    true,
								Type:        schema.TypeString,
							},
							"state_metadata_manifest_upload_timeout": {
								Description: "The amount of time to wait for the manifest file upload to complete. The manifest file contains the details of each of the files uploaded for a single cluster state, both index metadata files and global metadata files. Defaults to 20s.",
								Optional:    true,
								Type:        schema.TypeString,
							},
							"translog_buffer_interval": {
								Description: "The default value of the translog buffer interval used when performing periodic translog updates. This setting is only effective when the index setting `index.remote_store.translog.buffer_interval` is not present. Defaults to 650ms.",
								Optional:    true,
								Type:        schema.TypeString,
							},
							"translog_max_readers": {
								Description: "Sets the maximum number of open translog files for remote-backed indexes. This limits the total number of translog files per shard. After reaching this limit, the remote store flushes the translog files. Default is 1000. The minimum required is 100. Example: `1000`.",
								Optional:    true,
								Type:        schema.TypeInt,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"cluster_routing_allocation_balance_prefer_primary": {
						Description: "When set to true, OpenSearch attempts to evenly distribute the primary shards between the cluster nodes. Enabling this setting does not always guarantee an equal number of primary shards on each node, especially in the event of a failover. Changing this setting to false after it was set to true does not invoke redistribution of primary shards. Default is false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"cluster_routing_allocation_node_concurrent_recoveries": {
						Description: "How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to node cpu count * 2.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"cluster_search_request_slowlog": {
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"level": {
								Description:  "Enum: `debug`, `info`, `trace`, `warn`. Log level. Default: `trace`.",
								Optional:     true,
								Type:         schema.TypeString,
								ValidateFunc: validation.StringInSlice([]string{"debug", "info", "trace", "warn"}, false),
							},
							"threshold": {
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"debug": {
										Description: "Debug threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1.",
										Optional:    true,
										Type:        schema.TypeString,
									},
									"info": {
										Description: "Info threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1.",
										Optional:    true,
										Type:        schema.TypeString,
									},
									"trace": {
										Description: "Trace threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1.",
										Optional:    true,
										Type:        schema.TypeString,
									},
									"warn": {
										Description: "Warning threshold for total request took time. The value should be in the form count and unit, where unit one of (s,m,h,d,nanos,ms,micros) or -1. Default is -1.",
										Optional:    true,
										Type:        schema.TypeString,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"disk_watermarks": {
						Description: "Watermark settings",
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"flood_stage": {
								Description: "The flood stage watermark for disk usage. Example: `95`.",
								Required:    true,
								Type:        schema.TypeInt,
							},
							"high": {
								Description: "The high watermark for disk usage. Example: `90`.",
								Required:    true,
								Type:        schema.TypeInt,
							},
							"low": {
								Description: "The low watermark for disk usage. Example: `85`.",
								Required:    true,
								Type:        schema.TypeInt,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"email_sender_name": {
						Description: "Sender name placeholder to be used in Opensearch Dashboards and Opensearch keystore. Example: `alert-sender`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"email_sender_password": {
						Description: "Sender password for Opensearch alerts to authenticate with SMTP server. Example: `very-secure-mail-password`.",
						Optional:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"email_sender_username": {
						Description: "Sender username for Opensearch alerts. Example: `jane@example.com`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"enable_remote_backed_storage": {
						Description: "Enable remote-backed storage.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"enable_searchable_snapshots": {
						Description: "Enable searchable snapshots.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"enable_security_audit": {
						Description: "Enable/Disable security audit.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"enable_snapshot_api": {
						Description: "Enable/Disable snapshot API for custom repositories, this requires security management to be enabled.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"http_max_content_length": {
						Description: "Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"http_max_header_size": {
						Description: "The max size of allowed headers, in bytes. Example: `8192`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"http_max_initial_line_length": {
						Description: "The max length of an HTTP URL, in bytes. Example: `4096`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_fielddata_cache_size": {
						Description: "Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_memory_index_buffer_size": {
						Description: "Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_memory_max_index_buffer_size": {
						Description: "Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_memory_min_index_buffer_size": {
						Description: "Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_queries_cache_size": {
						Description: "Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_query_bool_max_clause_count": {
						Description: "Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_recovery_max_bytes_per_sec": {
						Description: "Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"indices_recovery_max_concurrent_file_chunks": {
						Description: "Number of file chunks sent in parallel for each recovery. Defaults to 2.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"ism_enabled": {
						Description: "Specifies whether ISM is enabled or not.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"ism_history_enabled": {
						Description: "Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"ism_history_max_age": {
						Description: "The maximum age before rolling over the audit history index in hours. Example: `24`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"ism_history_max_docs": {
						Description: "The maximum number of documents before rolling over the audit history index.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"ism_history_rollover_check_period": {
						Description: "The time between rollover checks for the audit history index in hours. Example: `8`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"ism_history_rollover_retention_period": {
						Description: "How long audit history indices are kept in days. Example: `30`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"knn_memory_circuit_breaker_enabled": {
						Description: "Enable or disable KNN memory circuit breaker. Defaults to true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"knn_memory_circuit_breaker_limit": {
						Description: "Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"node_search_cache_size": {
						Description: "Defines a limit of how much total remote data can be referenced as a ratio of the size of the disk reserved for the file cache. This is designed to be a safeguard to prevent oversubscribing a cluster. Defaults to 5gb. Requires restarting all OpenSearch nodes.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"override_main_response_version": {
						Description: "Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"plugins_alerting_filter_by_backend_roles": {
						Description: "Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"reindex_remote_whitelist": {
						Description: "Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart.",
						Elem: &schema.Schema{
							Description: "Address (hostname:port or IP:port). Example: `anotherservice.aivencloud.com:12398`.",
							Type:        schema.TypeString,
						},
						MaxItems: 32,
						Optional: true,
						Type:     schema.TypeList,
					},
					"remote_store": {
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"segment_pressure_bytes_lag_variance_factor": {
								Description: "The variance factor that is used together with the moving average to calculate the dynamic bytes lag threshold for activating remote segment backpressure. Defaults to 10.",
								Optional:    true,
								Type:        schema.TypeFloat,
							},
							"segment_pressure_consecutive_failures_limit": {
								Description: "The minimum consecutive failure count for activating remote segment backpressure. Defaults to 5.",
								Optional:    true,
								Type:        schema.TypeInt,
							},
							"segment_pressure_enabled": {
								Description: "Enables remote segment backpressure. Default is `true`.",
								Optional:    true,
								Type:        schema.TypeBool,
							},
							"segment_pressure_time_lag_variance_factor": {
								Description: "The variance factor that is used together with the moving average to calculate the dynamic time lag threshold for activating remote segment backpressure. Defaults to 10.",
								Optional:    true,
								Type:        schema.TypeFloat,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"script_max_compilations_rate": {
						Description: "Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context. Example: `75/5m`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"search_backpressure": {
						Description: "Search Backpressure Settings",
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"mode": {
								Description:  "Enum: `disabled`, `enforced`, `monitor_only`. The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only.",
								Optional:     true,
								Type:         schema.TypeString,
								ValidateFunc: validation.StringInSlice([]string{"disabled", "enforced", "monitor_only"}, false),
							},
							"node_duress": {
								Description: "Node duress settings",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"cpu_threshold": {
										Description: "The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"heap_threshold": {
										Description: "The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"num_successive_breaches": {
										Description: "The number of successive limit breaches after which the node is considered to be under duress. Default is 3.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"search_shard_task": {
								Description: "Search shard settings",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"cancellation_burst": {
										Description: "The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cancellation_rate": {
										Description: "The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cancellation_ratio": {
										Description: "The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cpu_time_millis_threshold": {
										Description: "The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"elapsed_time_millis_threshold": {
										Description: "The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"heap_moving_average_window_size": {
										Description: "The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"heap_percent_threshold": {
										Description: "The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"heap_variance": {
										Description: "The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"total_heap_percent_threshold": {
										Description: "The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"search_task": {
								Description: "Search task settings",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"cancellation_burst": {
										Description: "The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cancellation_rate": {
										Description: "The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cancellation_ratio": {
										Description: "The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"cpu_time_millis_threshold": {
										Description: "The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"elapsed_time_millis_threshold": {
										Description: "The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"heap_moving_average_window_size": {
										Description: "The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"heap_percent_threshold": {
										Description: "The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"heap_variance": {
										Description: "The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"total_heap_percent_threshold": {
										Description: "The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"search_insights_top_queries": {
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"cpu": {
								Description: "Top N queries monitoring by CPU",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"enabled": {
										Description: "Enable or disable top N query monitoring by the metric. Default: `false`.",
										Optional:    true,
										Type:        schema.TypeBool,
									},
									"top_n_size": {
										Description: "Specify the value of N for the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"window_size": {
										Description: "The window size of the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeString,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"latency": {
								Description: "Top N queries monitoring by latency",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"enabled": {
										Description: "Enable or disable top N query monitoring by the metric. Default: `false`.",
										Optional:    true,
										Type:        schema.TypeBool,
									},
									"top_n_size": {
										Description: "Specify the value of N for the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"window_size": {
										Description: "The window size of the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeString,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"memory": {
								Description: "Top N queries monitoring by memory",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"enabled": {
										Description: "Enable or disable top N query monitoring by the metric. Default: `false`.",
										Optional:    true,
										Type:        schema.TypeBool,
									},
									"top_n_size": {
										Description: "Specify the value of N for the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeInt,
									},
									"window_size": {
										Description: "The window size of the top N queries by the metric.",
										Optional:    true,
										Type:        schema.TypeString,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"search_max_buckets": {
						Description: "Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined. Example: `10000`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"segrep": {
						Description: "Segment Replication Backpressure Settings",
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"pressure_checkpoint_limit": {
								Description: "The maximum number of indexing checkpoints that a replica shard can fall behind when copying from primary. Once `segrep.pressure.checkpoint.limit` is breached along with `segrep.pressure.time.limit`, the segment replication backpressure mechanism is initiated. Default is 4 checkpoints. Default: `4`.",
								Optional:    true,
								Type:        schema.TypeInt,
							},
							"pressure_enabled": {
								Description: "Enables the segment replication backpressure mechanism. Default is false. Default: `false`.",
								Optional:    true,
								Type:        schema.TypeBool,
							},
							"pressure_replica_stale_limit": {
								Description: "The maximum number of stale replica shards that can exist in a replication group. Once `segrep.pressure.replica.stale.limit` is breached, the segment replication backpressure mechanism is initiated. Default is .5, which is 50% of a replication group. Default: `0.5`.",
								Optional:    true,
								Type:        schema.TypeFloat,
							},
							"pressure_time_limit": {
								Description: "The maximum amount of time that a replica shard can take to copy from the primary shard. Once segrep.pressure.time.limit is breached along with segrep.pressure.checkpoint.limit, the segment replication backpressure mechanism is initiated. Default is 5 minutes. Default: `5m`.",
								Optional:    true,
								Type:        schema.TypeString,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"shard_indexing_pressure": {
						Description: "Shard indexing back pressure settings",
						Elem: &schema.Resource{Schema: map[string]*schema.Schema{
							"enabled": {
								Description: "Enable or disable shard indexing backpressure. Default is false.",
								Optional:    true,
								Type:        schema.TypeBool,
							},
							"enforced": {
								Description: "Run shard indexing backpressure in shadow mode or enforced mode. In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics, but it doesn’t actually reject any indexing requests. In enforced mode (value set as true), shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. Default is false.",
								Optional:    true,
								Type:        schema.TypeBool,
							},
							"operating_factor": {
								Description: "Operating factor",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"lower": {
										Description: "Specify the lower occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is below this limit, shard indexing backpressure decreases the current allocated memory for that shard. Default is 0.75.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"optimal": {
										Description: "Specify the optimal occupancy of the allocated quota of memory for the shard. If the total memory usage of a shard is at this level, shard indexing backpressure doesn’t change the current allocated memory for that shard. Default is 0.85.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
									"upper": {
										Description: "Specify the upper occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is above this limit, shard indexing backpressure increases the current allocated memory for that shard. Default is 0.95.",
										Optional:    true,
										Type:        schema.TypeFloat,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
							"primary_parameter": {
								Description: "Primary parameter",
								Elem: &schema.Resource{Schema: map[string]*schema.Schema{
									"node": {
										Elem: &schema.Resource{Schema: map[string]*schema.Schema{"soft_limit": {
											Description: "Define the percentage of the node-level memory threshold that acts as a soft indicator for strain on a node. Default is 0.7.",
											Optional:    true,
											Type:        schema.TypeFloat,
										}}},
										MaxItems: 1,
										Optional: true,
										Type:     schema.TypeList,
									},
									"shard": {
										Elem: &schema.Resource{Schema: map[string]*schema.Schema{"min_limit": {
											Description: "Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. Default is 0.001.",
											Optional:    true,
											Type:        schema.TypeFloat,
										}}},
										MaxItems: 1,
										Optional: true,
										Type:     schema.TypeList,
									},
								}},
								MaxItems: 1,
								Optional: true,
								Type:     schema.TypeList,
							},
						}},
						MaxItems: 1,
						Optional: true,
						Type:     schema.TypeList,
					},
					"thread_pool_analyze_queue_size": {
						Description: "Size for the thread pool queue. See documentation for exact details.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_analyze_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_force_merge_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_get_queue_size": {
						Description: "Size for the thread pool queue. See documentation for exact details.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_get_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_search_queue_size": {
						Description: "Size for the thread pool queue. See documentation for exact details.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_search_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_search_throttled_queue_size": {
						Description: "Size for the thread pool queue. See documentation for exact details.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_search_throttled_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_write_queue_size": {
						Description: "Size for the thread pool queue. See documentation for exact details.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
					"thread_pool_write_size": {
						Description: "Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"opensearch_dashboards": {
				Description: "OpenSearch Dashboards settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"enabled": {
						Description: "Enable or disable OpenSearch Dashboards. Default: `true`.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"max_old_space_size": {
						Description: "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,
						Type:        schema.TypeInt,
					},
					"multiple_data_source_enabled": {
						Description: "Enable or disable multiple data sources in OpenSearch Dashboards. Default: `true`.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"opensearch_request_timeout": {
						Description: "Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch. Default: `30000`.",
						Optional:    true,
						Type:        schema.TypeInt,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"opensearch_version": {
				Description: "Enum: `1`, `2`, `2.19`, and newer. OpenSearch version.",
				Optional:    true,
				Type:        schema.TypeString,
			},
			"private_access": {
				Description: "Allow access to selected service ports from private networks",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"opensearch": {
						Description: "Allow clients to connect to opensearch with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"opensearch_dashboards": {
						Description: "Allow clients to connect to opensearch_dashboards with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"prometheus": {
						Description: "Allow clients to connect to prometheus with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"privatelink_access": {
				Description: "Allow access to selected service components through Privatelink",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"opensearch": {
						Description: "Enable opensearch.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"opensearch_dashboards": {
						Description: "Enable opensearch_dashboards.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"prometheus": {
						Description: "Enable prometheus.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"project_to_fork_from": {
				Description: "Name of another project to fork a service from. This has effect only when a new service is being created. Example: `anotherprojectname`.",
				ForceNew:    true,
				Optional:    true,
				Type:        schema.TypeString,
			},
			"public_access": {
				Description: "Allow access to selected service ports from the public Internet",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"opensearch": {
						Description: "Allow clients to connect to opensearch from the public internet for service nodes that are in a project VPC or another type of private network.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"opensearch_dashboards": {
						Description: "Allow clients to connect to opensearch_dashboards from the public internet for service nodes that are in a project VPC or another type of private network.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"prometheus": {
						Description: "Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"recovery_basebackup_name": {
				Description: "Name of the basebackup to restore in forked service. Example: `backup-20191112t091354293891z`.",
				Optional:    true,
				Type:        schema.TypeString,
			},
			"s3_migration": {
				Description: "AWS S3 / AWS S3 compatible migration settings",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"access_key": {
						Description: "AWS Access key.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"base_path": {
						Description: "The path to the repository data within its container. The value of this setting should not start or end with a /.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"bucket": {
						Description: "S3 bucket name.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"chunk_size": {
						Description: "Big files can be broken down into chunks during snapshotting if needed. Should be the same as for the 3rd party repository.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"compress": {
						Description: "When set to true metadata files are stored in compressed format.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"endpoint": {
						Description: "The S3 service endpoint to connect to. If you are using an S3-compatible service then you should set this to the service’s endpoint.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"include_aliases": {
						Description: "Whether to restore aliases alongside their associated indexes. Default is true.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"indices": {
						Description: "A comma-delimited list of indices to restore from the snapshot. Multi-index syntax is supported. Example: `metrics*,logs*,data-20240823`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"readonly": {
						Description: "Whether the repository is read-only. Default: `true`.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"region": {
						Description: "S3 region.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"restore_global_state": {
						Description: "If true, restore the cluster state. Defaults to false.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"secret_key": {
						Description: "AWS secret key.",
						Required:    true,
						Sensitive:   true,
						Type:        schema.TypeString,
					},
					"server_side_encryption": {
						Description: "When set to true files are encrypted on server side.",
						Optional:    true,
						Type:        schema.TypeBool,
					},
					"snapshot_name": {
						Description: "The snapshot name to restore from.",
						Required:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"saml": {
				Description: "OpenSearch SAML configuration",
				Elem: &schema.Resource{Schema: map[string]*schema.Schema{
					"enabled": {
						Description: "Enables or disables SAML-based authentication for OpenSearch. When enabled, users can authenticate using SAML with an Identity Provider. Default: `true`.",
						Required:    true,
						Type:        schema.TypeBool,
					},
					"idp_entity_id": {
						Description: "The unique identifier for the Identity Provider (IdP) entity that is used for SAML authentication. This value is typically provided by the IdP. Example: `test-idp-entity-id`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"idp_metadata_url": {
						Description: "The URL of the SAML metadata for the Identity Provider (IdP). This is used to configure SAML-based authentication with the IdP. Example: `https://test-account.okta.com/app/exk491jujcVc83LEX697/sso/saml/metadata`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"idp_pemtrustedcas_content": {
						Description: "This parameter specifies the PEM-encoded root certificate authority (CA) content for the SAML identity provider (IdP) server verification. The root CA content is used to verify the SSL/TLS certificate presented by the server. Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"roles_key": {
						Description: "Optional. Specifies the attribute in the SAML response where role information is stored, if available. Role attributes are not required for SAML authentication, but can be included in SAML assertions by most Identity Providers (IdPs) to determine user access levels or permissions. Example: `RoleName`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
					"sp_entity_id": {
						Description: "The unique identifier for the Service Provider (SP) entity that is used for SAML authentication. This value is typically provided by the SP. Example: `test-sp-entity-id`.",
						Required:    true,
						Type:        schema.TypeString,
					},
					"subject_key": {
						Description: "Optional. Specifies the attribute in the SAML response where the subject identifier is stored. If not configured, the NameID attribute is used by default. Example: `NameID`.",
						Optional:    true,
						Type:        schema.TypeString,
					},
				}},
				MaxItems: 1,
				Optional: true,
				Type:     schema.TypeList,
			},
			"service_log": {
				Description: "Store logs for the service so that they are available in the HTTP API and console.",
				Optional:    true,
				Type:        schema.TypeBool,
			},
			"service_to_fork_from": {
				Description: "Name of another service to fork from. This has effect only when a new service is being created. Example: `anotherservicename`.",
				ForceNew:    true,
				Optional:    true,
				Type:        schema.TypeString,
			},
			"static_ips": {
				Description: "Use static public IP addresses.",
				Optional:    true,
				Type:        schema.TypeBool,
			},
		}},
		MaxItems: 1,
		Optional: true,
		Type:     schema.TypeList,
	}
}
