Hello, is it kosher to instantiate resource classe...
# typescript
Hello, is it kosher to instantiate resource classes inside
Answering myself: nope: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#apply: "you should not allocate new resources inside of your callbacks either, as it could lead to 
pulumi preview
 being wrong"
In this case, what is the proper way of instantiating a resource per each of zones returned by https://www.pulumi.com/docs/reference/pkg/aws/getavailabilityzones/ ?
perhaps it's OK to do it inside
on a promise, but not inside
on an output?
while we try and recommend not doing this, it's sometimes unavoidable, this seems like one of those cases
if you're okay with the preview being wrong, you can go with this
thanks. It's an option, but OTOH we consider reliable previews necessary