--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opensearch_ism_policy_mapping 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_mapping (Resource) Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details. ## Example Usage ```terraform resource "opensearch_ism_policy_mapping" "test" { policy_id = "policy_1" indexes = "test_index" state = "delete" } ``` ## Schema ### Required - `indexes` (String) Name of the index to apply the policy to. You can use an index pattern to update multiple indices at once. - `policy_id` (String) The name of the policy. ### Optional - `include` (Set of Map of String) When updating multiple indices, you might want to include a state filter to only affect certain managed indices. The background process only applies the change if the index is currently in the state specified. - `is_safe` (Boolean) - `managed_indexes` (Set of String) - `state` (String) After a change in policy takes place, specify the state for the index to transition to - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) ### Read-Only - `id` (String) The ID of this resource. ### Nested Schema for `timeouts` Optional: - `create` (String) - `update` (String) ## Import Import is supported using the following syntax: ```shell # Import by poilcy_id terraform import opensearch_ism_policy_mapping.test policy_1 ```