-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When you define a space_id
other than "default" in your resource definition, it's ignored and the data view is still created in the default space.
If you define a space_id
and data_view.namespaces
the resource is created in the right space, but terraform isn't able to verify it, will throw an error and create a duplicate each time terraform runs.
To Reproduce
Steps to reproduce the behavior:
- Add a new data view resource, with space_id defined (other than default):
resource "elasticstack_kibana_data_view" "dataview-backend-staging" { space_id = "backend" data_view = { name = "staging" title = "logs-*-staging" time_field_name = "@timestamp" } }
- Apply the new data view resource
- Check the created data view in Kibana. It's created in the default space, not in the backend space.
And the other issue:
- Add a new data view resource, with space_id defined (other than default) and namespaces defined:
resource "elasticstack_kibana_data_view" "dataview-backend-staging" { space_id = "backend" data_view = { name = "staging" title = "logs-*-staging" namespaces = ["backend"] time_field_name = "@timestamp" } }
- Apply the new data view resource
- The data view is now created in the correct space, but Terraform will throw the error:
Error: Missing Resource State After Create with elasticstack_kibana_data_view.dataview-backend-staging, on team-backend.tf line 1, in resource "elasticstack_kibana_data_view" "dataview-backend-staging": 1: resource "elasticstack_kibana_data_view" "dataview-backend-staging" { The Terraform Provider unexpectedly returned no resource state after having no errors in the resource creation. This is always an issue in the Terraform Provider and should be reported to the provider developers. The resource may have been successfully created, but Terraform is not tracking it. Applying the configuration again with no other action may result in duplicate resource errors.
Expected behavior
In both cases, we expect that the data view is created in the defined space, in our case the space is called backend.
Versions (please complete the following information):
- Terraform Version v1.5.7
- Provider version v0.11.0
- Elasticsearch Version 8.11.2
dllegru, anontrex, Chr0my and Valent1ne93
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working