Skip to content

[Bug] total_shards_per_node isn't supported by the allocate action of elasticstack_elasticsearch_index_lifecycle #112

@psypuff

Description

@psypuff

Describe the bug
According to the ILM docs, the allocate action supports the total_shards_per_node param. This TF provider, however, doesn't which produces an error when used.

To Reproduce

  1. TF configuration used:
resource "elasticstack_elasticsearch_index_lifecycle" "ilm_policy" {

  name = "ilm_policy"

  hot {
    min_age = "0m"
  }

  warm {
    min_age = "27h"
    allocate {
      include = jsonencode({
        _tier_preference = "data_cold,data_warm,data_hot"
      })
      require = jsonencode({
        es_lifecycle_role = "cold"
      })
      total_shards_per_node = 2
    }
    forcemerge {
      max_num_segments = 1
    }
  }

  cold {
    min_age = "3d"
    allocate {
      include = jsonencode({
        _tier_preference = "data_cold,data_warm,data_hot"
      })
      require = jsonencode({
        es_lifecycle_role = "cold"
      })
    }
  }
}
  1. Execute terraform plan
  2. See the error in the output:
╷
│ Error: Unsupported argument
│
│   on ilm_policy.tf line 18, in resource "elasticstack_elasticsearch_index_lifecycle" "ilm_policy":
│   18:       total_shards_per_node = 2
│
│ An argument named "total_shards_per_node" is not expected here.
╵
Operation failed: failed running terraform plan (exit 1)

Expected behavior
elasticstack_elasticsearch_index_lifecycle resource is expected to support the total_shards_per_node param as part of its allocate action.

Versions:

  • OS: Linux
  • Terraform Version 1.1.7
  • Provider version v0.3.3
  • Elasticsearch Version 7.17.3

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions