-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
When we have dynamic field like metadata
below, it can be ForceNew
because there will be type diff from the latest mapping which have dynamically added inner fields.
It would be great if we could suppress those diffs and not cause recreate.
resource "elasticstack_elasticsearch_index" "test" {
name = "test"
mappings = jsonencode({
"dynamic" : false,
"properties" : {
"name" : {
"type" : "keyword"
},
"metadata" : {
"type" : "object",
"dynamic" : true
}
},
"dynamic_templates" : [
{
"metadata" : {
"path_match" : "metadata.*",
"mapping" : {
"type" : "keyword",
"fields" : {
"text" : {
"type" : "text",
"analyzer" : "standard",
"search_analyzer" : "standard"
}
}
}
}
}
}
Diff
~ metadata = {
~ dynamic = "true" -> true
- properties = {
...
- someMetadata = {
- fields = {
- text = {
- analyzer = "standard"
- search_analyzer = "standard"
- type = "text"
}
}
- type = "keyword"
}
},
...
Describe the resource you would like to have implemented.
elasticstack_elasticsearch_index
Describe the solution you'd like
Supress diff in dynamic object field.
Describe alternatives you've considered
Additional context
pakio and KosukeArase
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request