Technically yes - though it’s a little hard to hook the “on creating a resource” event currently. Making it easy to run arbitrary code on that event (and others) is tracked by
https://github.com/pulumi/pulumi/issues/1691. Fee free to add a note on that issue with your scenario.
In the meantime, you can approximate this with dynamic providers in some cases.