elastic / elastic/terraform-provider-elasticstack

[Bug] Data View Namespaces Field Null during import

Open
#671 13 comments 0 reactions 0 assignees View on GitHub
bug needs-reproduction phase-research triaged
Dominant language
Go
Stars
209
Forks
150
Avg merge
22h 33m
Merged PRs (30d)
176

Description

**Describe the bug**
When importing a data view to the terraform state file the namespaces field is set to null despite it being shared with all spaces and the api showing namespaces: ["*","default"]

**To Reproduce**
Steps to reproduce the behavior:
1. TF configuration used '...'
2. TF operations to execute to get the error '...' [e.g `terraform plan`,`terraform apply`, `terraform destroy`]
3. See the error in the output '...'
1. Import a data view
2. terraform import
3. View tfstate file
**Expected behavior**
I expect the namespaces field to match what the kibana api returns for data views.

**Debug output**
Run `terraform` command with `TF_LOG=trace` and provide extended information on TF operations. **Please ensure you redact any base64 encoded credentials from your output**.
eg
```
[DEBUG] provider.terraform-provider-elasticstack_v0.11.0: Authorization: Basic xxxxx==
```
[debug.txt](https://github.com/user-attachments/files/15972739/debug.txt)

**Screenshots**
If applicable, add screenshots to help explain your problem.
![image](https://github.com/elastic/terraform-provider-elasticstack/assets/56197436/71b0861c-bf69-4736-8dc1-40f92eac0f5e)
image

**Versions (please complete the following information):**
- OS: [e.g. Linux]
- Terraform Version [e.g. 1.0.0] 1.2.2
- Provider version [e.g. v0.1.0] v0.11.4
- Elasticsearch Version [e.g. 7.16.0] 8.7.0

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.