Open pravan07 opened 8 months ago
Same bug for me with provider version 0.11.2
Same issue here with provider version 0.11.3. Any tentative ETA for the fix? Thanks in advance
Setting overwrite = true
and space_id
in the resource block fixed the error for me.
Setting
overwrite = true
andspace_id
in the resource block fixed the error for me.
Didn't work for me. Maybe I'm missing any other required parameter?
Same issue here with Versions:
OS: linux_amd64 Terraform Version v1.9.0 Provider version 0.11.4
Describe the bug Trying to import a simple dashboard using the import_saved_objects resource. The file content was obtained from export API. However, I see
Value conversion error
during terraform apply.To Reproduce Steps to reproduce the behavior:
Use the following resource
resource "elasticstack_kibana_import_saved_objects" "sample_test_dashbaord" { overwrite = false ignore_import_errors = true file_contents = <<-EOT {"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"useMargins\":true,\"syncColors\":false,\"syncCursor\":true,\"syncTooltips\":false,\"hidePanelTitles\":false}","panelsJSON":"[{\"type\":\"lens\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"62af4052-0b97-4a24-a240-254a00b05af1\"},\"panelIndex\":\"62af4052-0b97-4a24-a240-254a00b05af1\",\"embeddableConfig\":{\"attributes\":{\"title\":\"\",\"description\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"138a8030-d730-11ee-9898-efd69997acab\",\"name\":\"indexpattern-datasource-layer-6f2581a6-1431-4383-8acb-e964d08ea50b\"}],\"state\":{\"visualization\":{\"title\":\"Empty XY chart\",\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"valueLabels\":\"hide\",\"preferredSeriesType\":\"bar_stacked\",\"layers\":[{\"layerId\":\"6f2581a6-1431-4383-8acb-e964d08ea50b\",\"accessors\":[\"2e2cf943-09c7-4ad6-968a-b9648f0310c4\"],\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"layerType\":\"data\",\"xAccessor\":\"e9dfe683-d464-45dc-92e1-f6ff031e6f9a\"}]},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"formBased\":{\"layers\":{\"6f2581a6-1431-4383-8acb-e964d08ea50b\":{\"columns\":{\"e9dfe683-d464-45dc-92e1-f6ff031e6f9a\":{\"label\":\"Top 5 values of sample_name\",\"dataType\":\"string\",\"operationType\":\"terms\",\"scale\":\"ordinal\",\"sourceField\":\"sample_name\",\"isBucketed\":true,\"params\":{\"size\":5,\"orderBy\":{\"type\":\"column\",\"columnId\":\"2e2cf943-09c7-4ad6-968a-b9648f0310c4\"},\"orderDirection\":\"desc\",\"otherBucket\":true,\"missingBucket\":false,\"parentFormat\":{\"id\":\"terms\"},\"include\":[],\"exclude\":[],\"includeIsRegex\":false,\"excludeIsRegex\":false}},\"2e2cf943-09c7-4ad6-968a-b9648f0310c4\":{\"label\":\"Unique count of sample_id\",\"dataType\":\"number\",\"operationType\":\"unique_count\",\"scale\":\"ratio\",\"sourceField\":\"sample_id\",\"isBucketed\":false,\"params\":{\"emptyAsNull\":true}}},\"columnOrder\":[\"e9dfe683-d464-45dc-92e1-f6ff031e6f9a\",\"2e2cf943-09c7-4ad6-968a-b9648f0310c4\"],\"sampling\":1,\"ignoreGlobalFilters\":false,\"incompleteColumns\":{}}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"enhancements\":{}}}]","timeRestore":false,"title":"Sample Dashboard","version":1},"coreMigrationVersion":"8.8.0","created_at":"2024-03-04T15:42:24.791Z","id":"cc252270-da3d-11ee-8d06-677a03624bec","managed":false,"references":[{"id":"138a8030-d730-11ee-9898-efd69997acab","name":"62af4052-0b97-4a24-a240-254a00b05af1:indexpattern-datasource-layer-6f2581a6-1431-4383-8acb-e964d08ea50b","type":"index-pattern"}],"type":"dashboard","typeMigrationVersion":"8.9.0","updated_at":"2024-03-04T15:42:24.791Z","version":"WzY1OCwzOV0="} {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]} EOT }
Perform
terraform apply
. Notice the following in the log: Terraform will perform the following actions:` # elasticstack_kibana_import_saved_objects.sample_test_dashbaord is tainted, so must be replaced -/+ resource "elasticstack_kibana_import_saved_objects" "sample_test_dashbaord" {
(3 unchanged attributes hidden)
}`
Versions (please complete the following information):