Closed Chriscbr closed 3 weeks ago
@hasanaburayyan I think we might have chatted about this bug before but I'm not sure if we had an issue to track it -- feel free to close if it's covered elsewhere.
Ah I think this is a duplicate of https://github.com/winglang/wing/issues/6093
I tried this:
A Wing Platform provided by my team has special presets for the Terraform "S3Bucket" class. When I'm writing in Wing, the presets don't take effect if I extend the class instead of instantiating it directly, which is unexpected.
This happened:
I ran
wing compile -t tf-aws --platform ./my-platform.js main.w
and I saw insidetarget/main.tfaws/main.tf.json
there is an S3 bucket in the configuration, but it doesn't include the custom bucket prefix.If I write "new aws.s3Bucket.S3Bucket();" then the Terraform output includes
bucket_prefix: "foo"
as expected.I expected this:
See above
Is there a workaround?
No response
Anything else?
A possible solution could be to refactor the API of Wing Platforms so instead of directly constructing instances for you, a platform provides the types directly:
Wing Version
0.74.12
Node.js Version
No response
Platform(s)
No response
Community Notes