Skip to content

Commit 86559d6

Browse files
committed
fix example data
- some where based on legacy Elasticsearch version - switch to string instead of number to match the OpenSearch type - add deprecation message to opensearch_ism_policy_mapping
1 parent f8fb3fa commit 86559d6

File tree

6 files changed

+30
-25
lines changed

6 files changed

+30
-25
lines changed

docs/index.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ resource "opensearch_index_template" "template_1" {
2828
name = "template_1"
2929
body = <<EOF
3030
{
31-
"template": "te*",
32-
"settings": {
33-
"number_of_shards": 1
34-
},
35-
"mappings": {
36-
"type1": {
31+
"index_patterns": [
32+
"your-pattern-here-*"
33+
],
34+
"template": {
35+
"settings": {
36+
"index": {
37+
"number_of_shards": "1"
38+
}
39+
},
40+
"mappings": {
3741
"_source": {
3842
"enabled": false
3943
},

docs/resources/component_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resource "opensearch_component_template" "test" {
2020
"template": {
2121
"settings": {
2222
"index": {
23-
"number_of_shards": 1
23+
"number_of_shards": "1"
2424
}
2525
},
2626
"mappings": {

docs/resources/composable_index_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "opensearch_composable_index_template" "template_1" {
2121
"template": {
2222
"settings": {
2323
"index": {
24-
"number_of_shards": 1
24+
"number_of_shards": "1"
2525
}
2626
},
2727
"mappings": {

docs/resources/index.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@ Provides an OpenSearch index resource.
1414

1515
```terraform
1616
# Create a simple index
17-
resource "opensearch_index" "test" {
17+
resource "opensearch_index" "test-simple-index" {
1818
name = "terraform-test"
19-
number_of_shards = 1
20-
number_of_replicas = 1
19+
number_of_shards = "1"
20+
number_of_replicas = "1"
2121
mappings = <<EOF
2222
{
23-
"people": {
24-
"_all": {
25-
"enabled": false
26-
},
27-
"properties": {
28-
"email": {
29-
"type": "text"
30-
}
23+
"properties": {
24+
"email": {
25+
"type": "text"
3126
}
3227
}
3328
}

docs/resources/index_template.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ resource "opensearch_index_template" "template_1" {
1818
name = "template_1"
1919
body = <<EOF
2020
{
21-
"template": "te*",
22-
"settings": {
23-
"number_of_shards": 1
24-
},
25-
"mappings": {
26-
"type1": {
21+
"index_patterns": [
22+
"your-pattern-here-*"
23+
],
24+
"template": {
25+
"settings": {
26+
"index": {
27+
"number_of_shards": "1"
28+
}
29+
},
30+
"mappings": {
2731
"_source": {
2832
"enabled": false
2933
},

docs/resources/ism_policy_mapping.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: |-
66
Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details.
77
---
88

9+
!> **NOTE:** `opensearch_ism_policy_mapping` has been deprecated in Opensearch 1.x, please use the `ism_template` field in the index policies instead
10+
911
# opensearch_ism_policy_mapping (Resource)
1012

1113
Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details.

0 commit comments

Comments
 (0)