pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
94 stars 17 forks source link

Failed to bind program: missing second arg #1509

Open brettdh opened 5 months ago

brettdh commented 5 months ago

What happened?

➜ ~/Downloads/cf2pulumi-v0.104.0-darwin-arm64/cf2pulumi python /tmp/infra.json
<snip>
<lots of warnings about unsupported resource types>
<snip>
2024/05/01 10:50:46 failed to bind program: program.pp:1,23-49: missing second arg; missing second arg, and 18 other diagnostic(s)

I have no idea what program.pp is, where to find it, or what the missing args mean. 🤷 Is there any way to get cf2pulumi to produce more verbose debugging output?

Example

I'm not able to share my full template JSON, and I'm not sure how to narrow down what parts of it are causing this issue, sorry.

Output of pulumi about

N/A

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

t0yv0 commented 5 months ago

Sorry you are experiencing this, I'll leave it in the backlog for our team to pick up when we work on cf2pulumi again. Unfortunately I'm not seeing any options for more verbose output. The error is coming from this line:

https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/cf2pulumi/main.go#L83

Perhaps instrumenting around there or debugging could help. PCL is a Pulumi intermediate format loosely based on HCL/Terraform but with some extensions, it appears that cf2pulumi is first translating CF to a PCL program and then tries to feed it to the PCL pipeline with the intent of converting it to a target programing language, but the PCL machinery does not consider this to be a valid program. Extracting the raw PCL syntax could be helpful.