You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The Class which extended cdktf.ComplexComputedList was generated, and a getter named index was generated.
In the original provider, it is defined as TypeInt, so it returns a number.
However, in cdktf.ComplexComputedList, index is defined as a string, which causes an error.
The text was updated successfully, but these errors were encountered:
…ions
resolves#634 which was caused by a terraform data source which had an attribute containing a list of items which each have a key 'index' which collided with its base class ComplexComputedList
Hey @yamamoto-febc! Thank you for providing this well described bug report containing an example which easily let me reproduce the error 👍
It is caused by a collision of the index property in the mentioned Terraform resource of the sakuracloud provider and the internal index which is used by the CDK for Terraform internally to be able to render references to its value.
I just added a pull request (#640) which renames the latter to something more specific to fix the collision.
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
cdktf & Language Versions
Affected Resource(s)
Debug Output
https://gist.github.com/yamamoto-febc/2a29df295eee3a768d8f1259747473bd
Expected Behavior
It should compile.
Actual Behavior
Unable to compile with TS2416 and TS2411 errors.
Steps to Reproduce
Generate
sacloud/sakuracloud
provider bindings and compile - See here for a ready to go example: https://github.com/yamamoto-febc/cdktf-sakuracloud-exampleIn the community provider sacloud/sakuracloud, there is a field with the key name
index
,computed:true
andTypeInt
.ref: https://github.com/sacloud/terraform-provider-sakuracloud/blob/4063b51a35a88163163b0c70cafd86702543863d/sakuracloud/data_source_sakuracloud_vpc_router.go#L101-L105
Here is the code generated using it: https://github.com/yamamoto-febc/cdktf-sakuracloud-example/blob/987794ad53d57fb596a15181d5809f06976fd4b9/.gen/providers/sakuracloud/data-sakuracloud-vpc-router.ts#L166-L169
The Class which extended
cdktf.ComplexComputedList
was generated, and a getter namedindex
was generated.In the original provider, it is defined as TypeInt, so it returns a number.
However, in cdktf.ComplexComputedList,
index
is defined as a string, which causes an error.The text was updated successfully, but these errors were encountered: