Closed trinitrotoluene closed 5 months ago
$transform(sst.aws.Function, (args) => {
// @ts-ignore
console.log("$transform", sst.aws.Function.__pulumiType);
results in the below - so it definitely does get registered correctly 👍
I've tried both mutating args
and returning new args from the callback - same result.
I had a crack at debugging the resource creation process to see where it's losing the information and it looks like it's here:
{}
instead of the args, so the transformation doesn't make it up to the custom SST resourcetalking to the pulumi team about this - thanks for finding it! a work around for now is to $transform non-components so the raw underlying resources eg aws.lambda.Function
- that should still work
unfortunately it won't work with link
but we can probably fix our components to work with $transform
- just have to get guidance from the pulumi team first
i made a temporary fix that should be in v0.0.281
cc @thdxr
If I stick a
console.log
in the$transform
handler I can see it get invoked, but there is no effect on any of the created functions. The secrets are not linked, nothing other than the default environment variables are set on the created lambda, and the runtime/role settings aren't respected either.sst version
is0.0.270