Skip to content

[Bug] Creating elasticstack_elasticsearch_index with a mapping results in provider error #802

Closed
@Zawadidone

Description

@Zawadidone

Describe the bug
Creating an Elasticsearch index combined with a dynamic index template, results in a provider error since version 0.11.7.

The temporary solution is to revert back to version 0.11.6.

To Reproduce

Steps to reproduce the behavior:

  1. TF configuration with elasticstack_elasticsearch_index and elasticstack_elasticsearch_index_template with a dynamic index template (https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html)
  2. Execute terraform apply
  3. The index was successfully created but the provider returned an inconsistent result.
  4. See the error in the output.
╷
 Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to elasticstack_elasticsearch_index.index, provider
│ "provider[\"registry.terraform.io/elastic/elasticstack\"]" produced an unexpected new value: .mappings: was cty.StringVal("{}"), but now
│ cty.StringVal("{\"dynamic_templates\":"[...]").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected behavior

The creation of a Elasticsearch index without an error.

Debug output

I could not find the error in the log. All the API calls to Elasticsearch returned status 200.

Versions (please complete the following information):

  • OS: Linux Alpine
  • Terraform Version 1.8.1
  • Provider version 0.11.7
  • Elasticsearch Version 8.15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions