-
Notifications
You must be signed in to change notification settings - Fork 67
Description
What is the bug?
When I create an index pattern and start using it in OpenSearch I get diff in Terraform.
How can one reproduce the bug?
Create index pattern:
resource "opensearch_dashboard_object" "this" { body = <<EOF [ { "_id": "index-pattern:terraform-test", "_source": { "type": "index-pattern", "index-pattern": { "title": "terraform-test*", "timeFieldName": "timestamp" } } } ] EOF }
and run terraform apply.
Then go to OpenSearch discovery section - and use this index pattern for search.
Then run terraform plan and as a result diff will be:
`
~ resource "opensearch_dashboard_object" "this" {
~ body = jsonencode(
~ [
~ {
~ _source = {
~ index-pattern = {
- fields = jsonencode(
[
- {
- aggregatable = true
- count = 0
- esTypes = [
- "_id",
]
- name = "_id"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "_index",
]
- name = "_index"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = false
- count = 0
- name = "_score"
- readFromDocValues = false
- scripted = false
- searchable = false
- type = "number"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "_source",
]
- name = "_source"
- readFromDocValues = false
- scripted = false
- searchable = false
- type = "_source"
},
- {
- aggregatable = false
- count = 0
- name = "_type"
- readFromDocValues = false
- scripted = false
- searchable = false
- type = "string"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "text",
]
- name = "host"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "keyword",
]
- name = "host.keyword"
- readFromDocValues = true
- scripted = false
- searchable = true
- subType = {
- multi = {
- parent = "host"
}
}
- type = "string"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "text",
]
- name = "message"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "keyword",
]
- name = "message.keyword"
- readFromDocValues = true
- scripted = false
- searchable = true
- subType = {
- multi = {
- parent = "message"
}
}
- type = "string"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "text",
]
- name = "source"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "keyword",
]
- name = "source.keyword"
- readFromDocValues = true
- scripted = false
- searchable = true
- subType = {
- multi = {
- parent = "source"
}
}
- type = "string"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "text",
]
- name = "source_type"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "keyword",
]
- name = "source_type.keyword"
- readFromDocValues = true
- scripted = false
- searchable = true
- subType = {
- multi = {
- parent = "source_type"
}
}
- type = "string"
},
- {
- aggregatable = false
- count = 0
- esTypes = [
- "text",
]
- name = "tag"
- readFromDocValues = false
- scripted = false
- searchable = true
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "keyword",
]
- name = "tag.keyword"
- readFromDocValues = true
- scripted = false
- searchable = true
- subType = {
- multi = {
- parent = "tag"
}
}
- type = "string"
},
- {
- aggregatable = true
- count = 0
- esTypes = [
- "date",
]
- name = "timestamp"
- readFromDocValues = true
- scripted = false
- searchable = true
- type = "date"
},
]
)
# (2 unchanged attributes hidden)
}
- updated_at = "2024-12-06T08:39:09.240Z"
# (1 unchanged attribute hidden)
}
# (1 unchanged attribute hidden)
},
]
)
id = "index-pattern:terraform-test"
# (1 unchanged attribute hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
`
What is the expected behavior?
No diff should happen from the side of Terraform after index usage.
What is your host/environment?
Provider version is: 2.3.1
AWS OpenSearch version: v2.15.0
Metadata
Metadata
Assignees
Labels
Type
Projects
Status