Skip to content

[BUG] opensearch_data_stream doesw not seem to work as described. #267

@EastOfEden6502

Description

@EastOfEden6502

What is the bug?

I get an error :

Error: elastic: Error 400 (Bad Request): no matching index template found for data stream [upc-ww-fb-service-logs] [type=illegal_argument_exception]

│ with opensearch_data_stream.service_logs,
│ on main.tf line 11, in resource "opensearch_data_stream" "service_logs":
│ 11: resource "opensearch_data_stream" "service_logs" {

when using info from : https://registry.terraform.io/providers/opensearch-project/opensearch/2.3.2/docs/resources/data_stream
The documentation seems to break in a middle of a sentence.

How can one reproduce the bug?

Try to deploy :
resource "opensearch_composable_index_template" "service_logs" {
name = "upc-ww-fb-service-logs-i"
body = file("${path.module}/templates/service_logs_template.json")
}

resource "opensearch_data_stream" "service_logs" {
name = "upc-ww-fb-service-logs"
depends_on = [opensearch_composable_index_template.service_logs]
}

What is the expected behavior?

No error - just deployment.
Documentation not breaking in the middle of a sentence. I expect it to say:
name (String) Name of the data stream to create, must have a matching index template.
But possibly there is more and this is what creates my problem.

What is your host/environment?

WSL 2.0

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Trying to cre4ate datastreams via terraform. The index upc-ww-fb-service-logs-i is created but the DT is not and fails with the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions