Skip to content

Commit

Permalink
fix example data
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
loru88 committed Mar 6, 2024
1 parent f8fb3fa commit 86559d6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
16 changes: 10 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ resource "opensearch_index_template" "template_1" {
name = "template_1"
body = <<EOF
{
"template": "te*",
"settings": {
"number_of_shards": 1
},
"mappings": {
"type1": {
"index_patterns": [
"your-pattern-here-*"
],
"template": {
"settings": {
"index": {
"number_of_shards": "1"
}
},
"mappings": {
"_source": {
"enabled": false
},
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/component_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "opensearch_component_template" "test" {
"template": {
"settings": {
"index": {
"number_of_shards": 1
"number_of_shards": "1"
}
},
"mappings": {
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/composable_index_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "opensearch_composable_index_template" "template_1" {
"template": {
"settings": {
"index": {
"number_of_shards": 1
"number_of_shards": "1"
}
},
"mappings": {
Expand Down
17 changes: 6 additions & 11 deletions docs/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,15 @@ Provides an OpenSearch index resource.

```terraform
# Create a simple index
resource "opensearch_index" "test" {
resource "opensearch_index" "test-simple-index" {
name = "terraform-test"
number_of_shards = 1
number_of_replicas = 1
number_of_shards = "1"
number_of_replicas = "1"
mappings = <<EOF
{
"people": {
"_all": {
"enabled": false
},
"properties": {
"email": {
"type": "text"
}
"properties": {
"email": {
"type": "text"
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions docs/resources/index_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ resource "opensearch_index_template" "template_1" {
name = "template_1"
body = <<EOF
{
"template": "te*",
"settings": {
"number_of_shards": 1
},
"mappings": {
"type1": {
"index_patterns": [
"your-pattern-here-*"
],
"template": {
"settings": {
"index": {
"number_of_shards": "1"
}
},
"mappings": {
"_source": {
"enabled": false
},
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/ism_policy_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ description: |-
Provides an OpenSearch Index State Management (ISM) policy. Please refer to the OpenSearch ISM documentation for details.
---

!> **NOTE:** `opensearch_ism_policy_mapping` has been deprecated in Opensearch 1.x, please use the `ism_template` field in the index policies instead

# opensearch_ism_policy_mapping (Resource)

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

0 comments on commit 86559d6

Please sign in to comment.