Error Data Source ardoq_components
dilbertside opened this issue · comments
Hello,
I have an error with the Data Source ardoq_components
, the config is as per documented
# request details for a workspace with the name "Some workspace"
data "ardoq_workspace" "someworkspace" {
name = "Some workspace"
}
# returns all components in workspace
data "ardoq_components" "all" {
# use the retrieved data from above
root_workspace = data.ardoq_workspace.someworkspace.id
}
# output all components
output "all_components" {
value = data.ardoq_components.all.components
}
Error is:
Error: components.0.fields.data_object_s: '' expected type 'string', got unconvertible type '[]interface {}', value: '[Finance]'
│
│ with data.ardoq_components.all,
│ on ardoq.tf line 36, in data "ardoq_components" "all":
│ 36: data "ardoq_components" "all" {
``
Thank you to have a look at it.
Thank you very much for this issue.
This was easily reproduced.
I was so busy with, learning go, getting the provider to a somewhat functioning level, learning about CI/CD and more...
That I forgot to test for Ardoq fields, other than text.
Currently I am stuck with the data type of string for all custom fields, so I've create a new version of the ardoq-client-go which just converts any Ardoq type to string.
I presume the field that gave you trouble was of the Ardoq type "Select multiple list"
For now I have converted this to "[Option 1 Option 2]"
Although I think a value of "Option 1,Option 2" might be better.
For now this is fixed for the data_source ardoq_component.
I will test and see the behaviour for creating components and custom fields
Version 0.1.2 is available on the Terraform reigstry.
OK with V0.1.2, all fine, no breaking errors.
I am interested to push the investigation to create ardoq components from my terraform cloud infra.
I will narrow my test-bed to a single workspace.
Thank you again for your diligence.