Skip to content

Commit

Permalink
[Examples Fix] Fixed examples provided against few resources (#126)
Browse files Browse the repository at this point in the history
* [111] fixed example for opensearch_index resource

Signed-off-by: premkiran <[email protected]>

* [111] fixed example for opensearch_index_template resource

Signed-off-by: premkiran <[email protected]>

* [111] fixed example for opensearch_index resource

Signed-off-by: premkiran <[email protected]>

* [111] fixed example for opensearch_index_template resource

Signed-off-by: premkiran <[email protected]>

---------

Signed-off-by: premkiran <[email protected]>
  • Loading branch information
premkirank authored Dec 19, 2023
1 parent 880a43b commit 0a0c87b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
11 changes: 3 additions & 8 deletions examples/resources/opensearch_index/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ resource "opensearch_index" "test" {
number_of_replicas = 1
mappings = <<EOF
{
"people": {
"_all": {
"enabled": false
},
"properties": {
"email": {
"type": "text"
}
"properties": {
"name": {
"type": "text"
}
}
}
Expand Down
27 changes: 13 additions & 14 deletions examples/resources/opensearch_index_template/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ resource "opensearch_index_template" "template_1" {
name = "template_1"
body = <<EOF
{
"template": "te*",
"settings": {
"number_of_shards": 1
},
"mappings": {
"type1": {
"_source": {
"enabled": false
},
"index_patterns": [
"logs-2020-01-*"
],
"template": {
"aliases": {
"my_logs": {}
},
"mappings": {
"properties": {
"host_name": {
"type": "keyword"
},
"created_at": {
"timestamp": {
"type": "date",
"format": "EEE MMM dd HH:mm:ss Z YYYY"
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
},
"value": {
"type": "double"
}
}
}
Expand Down

0 comments on commit 0a0c87b

Please sign in to comment.