terraform-provider-elasticstack icon indicating copy to clipboard operation
terraform-provider-elasticstack copied to clipboard

[Bug] elasticstack_elasticsearch_snapshot_lifecycle: Problem with indicies

Open Tim-herbie opened this issue 2 years ago • 1 comments

Describe the bug When I tried to import the elasticstack_elasticsearch_snapshot_lifecycle resource into my .tfstate, I got the following error message:

Error: json: cannot unmarshal string into Go struct field SnapshotPolicyConfig.policy.config.indices of type []string

I run a GET against the API (/_slm/policy) and got the following result for the indicies:

"config": {
        "include_global_state": true,
        "indices": ".a*,.k*,.r*,.t*,.s*",
        "ignore_unavailable": true
      },

To Reproduce Steps to reproduce the behavior: Create a Snapshot Lifefycle Policy with the indices above and try to import the resource

Expected behavior No error messages while importing the resource

Versions (please complete the following information):

  • OS: Mac
  • Terraform Version: v1.5.7
  • Provider version: 0.8.0
  • Elasticsearch Version: v 8.9.2

Tim-herbie avatar Oct 04 '23 06:10 Tim-herbie

It´s still not possible with the newer provider versions 0.9.0 or 0.10.0

Tim-herbie avatar Nov 02 '23 08:11 Tim-herbie