Open Chriscbr opened 1 year ago
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
This would let us create bindings for CIVO resources and use them in Wing: https://registry.terraform.io/providers/civo/civo/latest/docs
See tf.Resource
for an untyped experience: https://github.com/winglang/winglibs/blob/main/tf/README.md
Should be pretty reasonable for most use cases.
Feature Spec
As a user, I'd like a way to generate Wing bindings for any of the 3500+ Terraform providers so I can use any Terraform resource in my preflight code with type safety, autocompletion, and other goodness. This is similar to the facility provided by CDKTF (docs) for generating bindings in TypeScript, Python, and other languages.
For example, I might be able to run a command:
and then a
.gen/pagerduty/
folder would be generated in my current project, with the bindings inside.Then in my Wing application or library I can natively use the bindings like so:
Use Cases
Using Terraform providers that do not have publicly available bindings. The Terarform team only maintains bindings for a few dozen of the most popular Terraform providers like https://www.npmjs.com/package/@cdktf/provider-aws (these can be natively used in Wing since the npm packages include JSII metadata inside them).
Implementation Notes
It should be possible to generate the CDKTF bindings for TypeScript programmatically. Here's a script that generates TypeScript bindings for the
kislerdm/neon
provider inside a.gen
directory.These TypeScript bindings would have to be part of a JSII library before they can be recognized and imported in Wing.
Component
SDK, CLI
Community Notes