Closed gscho closed 5 months ago
same issue with AWS OpenSearch 2.7
[Triage]
There was an question raised before by @mo-saeed https://github.com/opensearch-project/terraform-provider-opensearch/issues/40, did you declare ism_template
in the policy ? https://opensearch.org/docs/latest/im-plugin/ism/policies/
Adding @phillbaker who initially contributed to this ism mapping.
@Wyifei, @gscho can you share your policy tf file you are applying ? Also some reference here https://github.com/opensearch-project/terraform-provider-opensearch/issues/83#issue-1904552280.
Adding @bbarani @rblcoder
@prudhvigodithi I think the message could be made more clear. Something like:
"opensearch_ism_policy_mapping is deprecated in Opensearch 1.x please use the opensearch_ism_policy resource and specify the ism_template attribute in the policies instead."
I am specifying that attribute in my policy so I suspect if I switch to using the opensearch_ism_policy
resource instead it would remove the deprecation warning.
My policy:
{
"policy": {
"description": "delete_after_7d",
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [],
"transitions": [
{
"state_name": "cold",
"conditions": {
"min_index_age": "3d"
}
}
]
},
{
"name": "cold",
"actions": [],
"transitions": [
{
"state_name": "to_delete",
"conditions": {
"min_index_age": "7d"
}
}
]
},
{
"name": "to_delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"${index_pattern}"
],
"priority": 1
}
]
}
}
The message is also visibile in the documentation provider, see #166
I think this ticket can be closed
Thanks @loru88 , closing this issue. @rblcoder @bbarani
What is the bug?
When using the
opensearch_ism_policy_mapping
I'm told it is a deprecated resource. The message on how to remediate the issue is unclear.The message says:
I cannot figure out which resource has this attribute or how to fix this deprecation.
How can one reproduce the bug?
opensearch_ism_policy_mapping
resource.What is the expected behavior?
The message should tell me how to remediate the deprecation in a clear and concise manner.
What is your host/environment?