The semantics of the Pulumi runtime are probably fine, but the semantics of the DSL layer that preceeds that when mixed with the sensible semantics of the Pulumi runtime are a recipe for disaster. This is based on my extensive experience with declarative DSLs in imperative languages. The impedance mismatch is high. Nothing to do with Pulumi's internal state management, but it's beholden to javascript.