I’m trying to write a VCR-style test in Python to ...
# general
f
I’m trying to write a VCR-style test in Python to freeze all outputs and prevent regression while refactoring
l
This sounds like you're treating your Pulumi project as a unit. Speaking from experience, this isn't going to be easy, and it's not the intended use of unit tests. Projects aren't smallest-feasible-functional-units, which is what you should be targettng in unit tests.
You want a full system test for this.
You could use automation-api to create a test harness, wrapping a standalone Pulumi project and doing this sort of thing.