Hey all, new to Pulumi here coming from a few years of Terraform usage. One of the problems I feel Terraform hasn't solved well yet is modeling necessary imperative steps within the declarative configuration. For example, if I need to run some script with inputs from the creation of a resource, and have another resource depend on that script's output, it's certainly doable but clunky. It seems like Pulumi is in a good position to solve these problems but there's nothing really native yet.
The closest thing I could find is this
provisioners strategy. I've used this now to create a couple of provisioners: an "S3StaticReactProvisioner" that runs yarn to build a client side react app with necessary environment config baked in, and then runs aws sync to S3; a "DBProvisioner" that ensures any necessary SQL setup is performed (depends on an RDS resource) prior to spinning up an ECS Fargate task that requires it; and I'm considering an Ansible provisioner as well. Of course I could have scripts that run pulumi + psql + ansible, or other strategies through code, but I want to maintain the declarative-first approach and rely on Pulumi for intelligent dependency management.
Is Pulumi planning on expanding this concept? It seems like a great opportunity for people to build provisioners and publish them on NPM / other package distribution systems for others to take advantage of. Or are there limitations I don't understand yet that hinder this?