You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4- remove the definition of default-settings and its reference from the sample2-template
5- run terraform apply and you will get this error message:
module.component_template.opensearch_component_template.default-settings: Destroying... [id=default-settings] ╷ │ Error: elastic: Error 400 (Bad Request): component templates [default-settings] cannot be removed as they are still in use by index templates [sample2-template] [type=illegal_argument_exception]
What is the expected behavior?
A method to set destroy dependency between the 2 resources in order to update sample2-template before destroying default-settings
Do you have any additional context?
Plan of the step 5:
Terraform will perform the following actions:
# module.component_template.opensearch_component_template.default-settings will be destroyed
# (because opensearch_component_template.default-settings is not in configuration)
- resource "opensearch_component_template" "default-settings" {
- body = jsonencode(
{
- template = {
- settings = {
- index = {
- codec = "best_compression"
- number_of_replicas = "1"
- number_of_shards = "3"
}
}
}
}
) -> null
- id = "default-settings" -> null
- name = "default-settings" -> null
}
# module.data_streams.opensearch_composable_index_template.sample2-template will be updated in-place
~ resource "opensearch_composable_index_template" "sample2-template" {
~ body = jsonencode(
~ {
~ composed_of = [
- "default-settings",
]
}
)
id = "sample2-template"
name = "sample2-template"
}
The text was updated successfully, but these errors were encountered:
What is the bug?
When trying to delete a component_template
How can one reproduce the bug?
1- define opensearch_component_template.default-settings
2- define opensearch_composable_index_template.sample2-template that reference default-settings
3- run terraform apply and create resources
4- remove the definition of default-settings and its reference from the sample2-template
5- run terraform apply and you will get this error message:
module.component_template.opensearch_component_template.default-settings: Destroying... [id=default-settings] ╷ │ Error: elastic: Error 400 (Bad Request): component templates [default-settings] cannot be removed as they are still in use by index templates [sample2-template] [type=illegal_argument_exception]
What is the expected behavior?
A method to set destroy dependency between the 2 resources in order to update sample2-template before destroying default-settings
Do you have any additional context?
Plan of the step 5:
The text was updated successfully, but these errors were encountered: