does pulumi have better examples of how to use, or...
# general
n
does pulumi have better examples of how to use, or work with inputs and outputs? Because the examples throughout this website are horrible demonstrations of how something should be done vs. how it works… As developers we can already see the code if we dig deep enough, but how about some real world examples. I enjoy using pulumi (when i know what im doing), but i really dread having to look something up in the pulumi docs to only find what i already know (what the code looks like)…. That being said, if you
note
things like
Copy code
During some program executions, apply doesn't run. For example, it won't run during a preview, when resource output values may be unknown. Therefore, you should avoid side-effects within the callbacks. For this reason, you should not allocate new resources inside of your callbacks either, as it could lead to pulumi preview being wrong.
☝️ then you should also show examples of what should be expected as an example of “how to do this” otherwise it’s kind of tiresome to
pulumi up
a bunch of times just to fail…
b
thanks for the terse feedback. We have lots of examples in github.com/pulumi/examples: https://github.com/pulumi/examples/search?q=apply you can filter by language in there
n
yeah i wasn’t trying to be harsh about it, just stating the fact that if you can’t test
apply
with
pulumi preview
then all you have left is to
pulumi up
, but if you have a lot of resources and it takes ~10min to deploy it up, and it fails, that’s a shame… That being said, an example of
TopicSubscription
for example is only showing the code to be used, not HOW to use it… https://www.pulumi.com/docs/reference/pkg/aws/sns/topicsubscription/#look-up Since its an
Output
im assuming something like
.apply(0 => o.arn)
should, or could work, but where’s that example? I also looked at the github link you’ve posted, and i dont feel that fulfills the necessary examples IMO either, but what do i know…