forked from phillbaker/terraform-provider-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add suport for new composable template (#9)
* feat: rename index_template to index_template_legacy. Add index_component_template resource Signed-off-by: disaster37 <[email protected]> * feat: Add support for new index template API Signed-off-by: disaster37 <[email protected]>
- Loading branch information
1 parent
16da12c
commit 5ca17fe
Showing
15 changed files
with
1,000 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# elasticsearch_index_component_template Resource Source | ||
|
||
This resource permit to manage the index component template in Elasticsearch. | ||
You can see the API documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html | ||
|
||
***Supported Elasticsearch version:*** | ||
- v7 | ||
|
||
## Example Usage | ||
|
||
It will create index template. | ||
|
||
```tf | ||
resource elasticsearch_index_component_template "test" { | ||
name = "terraform-test" | ||
template = <<EOF | ||
{ | ||
"template": { | ||
"settings": { | ||
"index.refresh_interval": "3s" | ||
}, | ||
"mappings": { | ||
"_source": { | ||
"enabled": false | ||
}, | ||
"properties": { | ||
"host_name": { | ||
"type": "keyword" | ||
}, | ||
"created_at": { | ||
"type": "date", | ||
"format": "EEE MMM dd HH:mm:ss Z yyyy" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
EOF | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
***The following arguments are supported:*** | ||
- **name**: (required) Identifier for the template. | ||
- **template**: (required) The template specification. It's a string as JSON object. | ||
|
||
## Attribute Reference | ||
|
||
NA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# elasticsearch_index_template_legacy Resource Source | ||
|
||
This resource permit to manage the index template in Elasticsearch (the legacy API). | ||
You can see the API documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html | ||
|
||
***Supported Elasticsearch version:*** | ||
- v6 | ||
- v7 | ||
|
||
## Example Usage | ||
|
||
It will create index template. | ||
|
||
```tf | ||
resource elasticsearch_index_template_legacy "test" { | ||
name = "terraform-test" | ||
template = <<EOF | ||
{ | ||
"index_patterns": [ | ||
"test" | ||
], | ||
"settings": { | ||
"index.refresh_interval": "5s", | ||
"index.lifecycle.name": "policy-logstash-backup", | ||
"index.lifecycle.rollover_alias": "logstash-backup-alias" | ||
}, | ||
"order": 2 | ||
} | ||
EOF | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
***The following arguments are supported:*** | ||
- **name**: (required) Identifier for the template. | ||
- **template**: (required) The template specification. It's a string as JSON object. | ||
|
||
## Attribute Reference | ||
|
||
NA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.