Hello,
I’m working with elasticsearch_opendistro_ism_policy resource.
I have a directory with JSON files with the content below
JSON policy
{
"policy": {
"description": "delete_all_indices_older_30d",
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "30d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"metrics-*",
],
"priority": 200
}
]
}
}
My goal is to extract the description value from all JSON files and assign it to policy_id argument from the tf resource
The same thing should be done with the body argument, but there I need to place the content of the JSON file
Can someone help to resolve it ?