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

Unable to delete saved objects #35

Open
eloo opened this issue Nov 24, 2022 · 0 comments
Open

Unable to delete saved objects #35

eloo opened this issue Nov 24, 2022 · 0 comments

Comments

@eloo
Copy link

eloo commented Nov 24, 2022

Hi,

i'm having trouble to delete saved objects in kibana.

my setup:

resource "kibana_object" "dashboards" {
  for_each       = fileset("./fixtures/saved-objects/${terraform.workspace}/dashboard", "*.json")
  name           = trimsuffix("${each.key}", ".json")
  data           = jsonencode(jsondecode("${file("./fixtures/saved-objects/${terraform.workspace}/dashboard/${each.key}")}"))
  deep_reference = false
  export_objects {
    id   = jsondecode("${file("./fixtures/saved-objects/${terraform.workspace}/dashboard/${each.key}")}").id
    type = "dashboard"
  }
}

the folder dashboard contains a couple of files where every file is a single dashboard.
So now when i remove one file from the directory TF is going to "destroy" this..
But in Kibana the dashboard is still there and thus not deleted.

Further if i remove the dashboard (or any saved object) in kibana i'm running into this issue:
#8

I'm also not sure what is the best practice to setup the kibana_objects resource..
Should we use export_objects? or export_types?
So a good example is missing here..
This would also reduce tickets like this: #34

Best regards
eloo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant