chaossearch_index_model Resource

Manage indexing of object groups in Terraform

The chaossearch_index_model resource starts, stops, or restarts indexing for an object group.

Example Usage

The structure of the resource follows:

resource "chaossearch_index_model" "index" {  
  bucket_name = ""  
  model_mode = 0  
  options {
    delete_enabled = false  
    delete_timeout = 0  
    skip_index_pause = false
  }
}

Argument Reference

Field

Required

Description

bucket_name

Yes

The name of the object group to be indexed

model_mode

Yes

The mode or state to apply to the object group index:
-1 Restart indexing
0 Start indexing
1 Pause indexing

delete_enabled

No

An option to delete index data for the object group when the Terraform environment is destroyed. This is a safeguard to prevent accidental data loss by protecting/keeping indexed data during terraform destroy operations.

false – Do not delete index data during destroy (default).
true – Delete index data during destroy.

  • *WARNING:** Do not leave the setting delete_enabled = true in the Terraform files that you check into source control to avoid accidental removal of indexed data.

You must update this argument value in your .tfstate file to delete your index.

delete_timeout

No

A timeout limit in seconds for the index deletion confirmation.

The default is 0. This setting does not disable the index deletion call. It is the time to wait for the delete confirmation. If the timeout expires before the confirmation is processed, you must manually confirm that the index data is deleted in your ChaosSearch cluster.

skip_index_pause

No

An option that causes Terraform to wait for the indexing of an object group to complete, or to proceed without waiting for indexing to finish.

Enable this setting if you do not want Terraform processing to wait for indexing to complete.

Attribute Reference

AttributeTypeDescription
indexedBooleanDisplays a true/false indicator about whether the object group has been indexed
resultBooleanIndex request confirmation