Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
psypuff opened this issue May 27, 2022 · 0 comments · Fixed by #120
Assignees
Labels
bug Something isn't working
Milestone

Comments

@psypuff
Copy link

psypuff commented May 27, 2022

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
@psypuff psypuff added the bug Something isn't working label May 27, 2022
@Kushmaro Kushmaro added this to the 0.6.0 milestone Aug 12, 2022
@webfella webfella self-assigned this Oct 18, 2022
@Kushmaro Kushmaro modified the milestones: 0.6.0, 0.5.0 Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants