Question - is there a way to capture the code that...
# general
Question - is there a way to capture the code that pulumi executes ? (hopefully this makes sense and will try to explain - example., we have a js program with variables that we will pass using a custom program/script through a json file that has the names of the variables Now when we call pulumi up, Is there a way to capture the code pulumi is using to deploy ? Alternately, is it possible to recreate the code using the state ?
No, not really. You could turn debugging way up and see the results of the code running. You could instrument the plugin I suppose. Or if you're interested in the SDK calls, you could intercept the calls using wireshark or the like.
But why? Generally, if you care about the exact calls, then the using a helper layer like Terraform or Pulumi is probably the wrong direction for you.
not necessarily interested in the calls made BUT as we are developing a tool that uses Pulumi to deploy infra, we are exploring leaving behind the code (not our tool) that generated the infra...
thanks to @brave-planet-10645. he answered our questions on this topic.