terraform-provider-aiven icon indicating copy to clipboard operation
terraform-provider-aiven copied to clipboard

Wrong type rendering between schema and the docs

Open z0r1k opened this issue 3 years ago • 1 comments

Hi,

In the schema (https://github.com/aiven/terraform-provider-aiven/blob/c0182fce7e2af8869d5877031a2f82ec7704c04a/aiven/templates/service_user_config_schema.json#L4508-L4511) type is defined as list of null and boolean.

I assume when property is not set default value is null and the main use-case is to have it set to true or false if one would use it. When docs are being generated aforementioned type is being rendered as string instead - https://github.com/aiven/terraform-provider-aiven/blob/c0182fce7e2af8869d5877031a2f82ec7704c04a/docs/resources/service.md#L948 This is a big misleading.

It seems to happen to other properties as well.

Ty.

z0r1k avatar Nov 10 '21 14:11 z0r1k

@z0r1k, we know about this issue, all user configuration options have the type string in Terraform. We auto-generate all of them from the JSON schema you mentioned above. And our documentation is generated based on resource schema, which is why you get this issue.

We plan to rework the generation of user configuration options which will automatically fix this issue.

ivan-savciuc avatar Jul 05 '22 10:07 ivan-savciuc

after further evaluation, due to the deprecation mandate from Hashicorp, we will be unable to change those types in v3.x, and this will only be adjusted in v4.0, which is currently an on-going project of ours

Serpentiel avatar Dec 02 '22 14:12 Serpentiel

v4 was released, and the docs were adjusted accordingly

Serpentiel avatar Mar 07 '23 13:03 Serpentiel