Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

[SCHEMA]: "elasticstack_data_*" resources #7

Open
tsouza opened this issue Apr 29, 2021 · 0 comments
Open

[SCHEMA]: "elasticstack_data_*" resources #7

tsouza opened this issue Apr 29, 2021 · 0 comments

Comments

@tsouza
Copy link
Owner

tsouza commented Apr 29, 2021

The elasticstack_data_* defines the following:

Index Template

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html

resource 'elasticstack_data_index_template' '<name>' {
	index_patterns	[]string
	priority		integer
	version			integer
	metadata {
		# variable key/value pair
	}
	composed_of		[]string
    data_stream {
		hidden	     boolean
	}
	template {
		settings {
			# variable key/value pair - Should we force the usage of flat settings?
		}
		aliases {
			# key/value pair "alias_name" -> "alias_def" see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html 
		}
		mappings {
			# see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html
		}
	}
}

Component Template

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html#multiple-component-templates

resource 'elasticstack_data_component_template' '<name>' {
	# defines only "template" field from Index Template
}

Index Lifecycle Policy

https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html

resource 'elasticstack_data_index_lifecycle_policy' '<name>' {
	hot_phase {
        keep_data_forever boolean
		set_read_only	  boolean
		index_priority	integer
		force_merge {
			number_of_segments	integer
		}
		shrink {
			number_of_primary_shards	integer
		}
		rollover {
			max_index_size	string
			max_documents	integer
			max_age			string
		}
		searchable_snapshot {
			repository_name		string
		}
	}
	warm_phase {
		move_data_into_phase_when	string
        keep_data_forever boolean
		set_read_only	  boolean
		index_priority	  integer
		replicas {
			number_of_replicas	integer
        }
		force_merge {
			number_of_segments	integer
		}
		shrink {
			number_of_primary_shards	integer
		}
		data_allocation {
			custom {
				# variable key/value pair
			}
		}
	}
	cold_phase {
		move_data_into_phase_when	string
        keep_data_forever boolean
		set_read_only	  boolean
		index_priority	  integer
		freeze_index	  boolean
		replicas {
			number_of_replicas	integer
        }
		force_merge {
			number_of_segments	integer
		}
		data_allocation {
			custom {
				# variable key/value pair
			}
		}
		searchable_snapshot {
			repository_name		string
		}
	}
}

Snapshot Repository

https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html

resource 'elasticstack_data_snapshot_repository' '<name>' {
	type	string
	settings {
		# variable key/value pair
	}
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant