-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(provider-generator): reference computed values nested in lists #1468
Conversation
a1402dd
to
46fca7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change really only addresses 1 & 3 from #1332 (comment).
That's an improvement, but it would be nice to just finish it off finally.
Also, regarding number 3,
terraform-cdk/packages/@cdktf/provider-generator/lib/get/generator/emitter/struct-emitter.ts
Line 197 in 52de5d4
`public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean)` |
IInterpolatingParent
. Functionally it works, but we are masking the compile error with terraform-cdk/packages/@cdktf/provider-generator/lib/get/generator/emitter/attributes-emitter.ts
Line 121 in 52de5d4
}(this as any, "${att.terraformName}", ${ |
This does also generate some dangling types (since the 2nd case is not implemented).
packages/@cdktf/provider-generator/lib/get/generator/models/attribute-model.ts
Outdated
Show resolved
Hide resolved
@jsteinich Number two is planned to be tackled by #993 |
aa1b3f7
to
b11bdb8
Compare
b11bdb8
to
c770dbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one remaining question. Otherwise it looks good.
packages/@cdktf/provider-generator/lib/get/generator/models/attribute-model.ts
Outdated
Show resolved
Hide resolved
This allows to test the required: false && optional: false usecase
Previously one could only reference one layer deep into a nested attribute, this lifts the restriction. In a world without JSII we would have written IInterpolatingParent = ITerraformResource | ComplexComputedList | ComplexComputedItem | ...
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Resolves #1332