--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opensearch_ism_policy Resource - terraform-provider-opensearch" subcategory: "" description: |- Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details. --- # opensearch_ism_policy (Resource) Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details. ## Example Usage ```terraform # Create an ISM policy resource "opensearch_ism_policy" "cleanup" { policy_id = "delete_after_15d" body = file("${path.module}/policies/delete_after_15d.json") } ``` ## Schema ### Required - `body` (String) The policy document. - `policy_id` (String) The id of the ISM policy. ### Optional - `primary_term` (Number) The primary term of the ISM policy version. - `seq_no` (Number) The sequence number of the ISM policy version. ### Read-Only - `id` (String) The ID of this resource. ## Import Import is supported using the following syntax: ```shell terraform import opensearch_ism_policy.cleanup delete_after_15d ```